Skip to content

Instantly share code, notes, and snippets.

View Abhinickz's full-sized avatar
💻
Full Stack Developer

Abhishek Bhasker Abhinickz

💻
Full Stack Developer
View GitHub Profile
@Abhinickz
Abhinickz / test.pl
Last active April 12, 2017 08:16
test
#!/usr/bin/perl
use strict; use warnings; use Data::Dumper; $Data::Dumper::Sortkeys = 1;
#no warnings 'uninitialized';
print "Hello World!";
#!/usr/bin/perl
use strict; use warnings;
my $data = [ 1, 2, 3, 4 ];
eval {
require Data::Dumper;
Data::Dumper->import();
print Dumper($data);
1;
@Abhinickz
Abhinickz / format_file_find.pl
Created April 12, 2017 08:16
File::Find use with the tabbed format data!!!
#!/usr/bin/perl
use strict; use warnings; use Data::Dumper;
use File::Find;
$| = 1;
find(\&wanted, './');
sub wanted {
my $file_type = `file -bi $_`;
chomp($file_type);
@Abhinickz
Abhinickz / whatsapp_phone_enumerator_floated_div.js
Created May 12, 2017 19:03
PoC WhatsApp enumeration of phonenumbers, profile pics, about texts and online statuses (floated div)
/*
PoC WhatsApp enumeration of phonenumbers, profile pics, about texts and online statuses
Floated div edition
01-05-2017
(c) 2017 - Loran Kloeze - loran@ralon.nl
This script creates a UI on top of the WhatsApp Web interface. It enumerates certain kinds
of information from a range of phonenumbers. It doesn't matter if these numbers are part
of your contact list. At the end a table is displayed containing phonenumbers, profile pics,
about texts and online statuses. The online statuses are being updated every
@Abhinickz
Abhinickz / convert id_rsa to pem
Created May 24, 2017 19:48 — forked from mingfang/convert id_rsa to pem
Convert id_rsa to pem file
openssl rsa -in ~/.ssh/id_rsa -outform pem > id_rsa.pem
chmod 700 id_rsa.pem

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@Abhinickz
Abhinickz / async_example_AnyEvent.pl
Created March 17, 2018 07:53
Perl Async Example: Use AnyEvent to run two separate code simultaneously in while (1) condition.
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
use AnyEvent;
my $count = {
cache => 0,
main_loop => 0,
};
@Abhinickz
Abhinickz / sigtrap.pl
Created April 20, 2018 09:58
Perl sigtrap to capture signal, print and exit.
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
use sigtrap qw(handler signal_handler normal-signals);
my $time = 0;
while(1){
@Abhinickz
Abhinickz / git-change-commit-messages.md
Created June 21, 2018 20:57 — forked from nepsilon/git-change-commit-messages.md
How to change your commit messages in Git? — First published in fullweb.io issue #55

How to change your commit messages in Git?

At some point you’ll find yourself in a situation where you need edit a commit message. That commit might already be pushed or not, be the most recent or burried below 10 other commits, but fear not, git has your back 🙂.

Not pushed + most recent commit:

git commit --amend

This will open your $EDITOR and let you change the message. Continue with your usual git push origin master.

@Abhinickz
Abhinickz / sudo_expect.pl
Created September 19, 2018 06:40
Sudo start process: when password is required
#!/usr/bin/perl
use strict; use warnings; use Data::Dumper;
use Expect;
my $expect = Expect->new;
my $command = 'sudo service ssh start';
my $timeout = 500;
my $password = "password";
$expect->raw_pty(1);