This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
use strict; | |
use diagnostics; | |
use File::Navigate; | |
my $nav = File::Navigate->new($ARGV[0]); | |
my @connects = @{$nav->find(qr/sshd\[\d+\]: Connection from .+ port \d/)}; | |
foreach (@connects){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
use strict; | |
use diagnostics; | |
use JSON; | |
use Data::Dumper; | |
my $sessionstore = '/home/martin/.mozilla/firefox/12345678.default/sessionstore.js'; | |
my $json_raw; | |
open my $fh_in, "<$sessionstore" or die "Can't open $sessionstore: $!\n"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
FILE=$1 | |
echo $FILE | |
WIDTH=$(identify $FILE | awk '{print $3}' | awk -F x '{print $1}') | |
HEIGHT=$(identify $FILE | awk '{print $3}' | awk -F x '{print $2}') | |
HALFWIDTH=$(expr $WIDTH / 2) | |
LEFT=$(echo $FILE | sed 's/.jpg$/.l.jpg/i') | |
RIGHT=$(echo $FILE | sed 's/.jpg$/.r.jpg/i') | |
convert $FILE -crop "${HALFWIDTH}x${HEIGHT}+0x0" $LEFT | |
convert $FILE -crop "${HALFWIDTH}x${HEIGHT}+${HALFWIDTH}x0" $RIGHT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
use strict; | |
use diagnostics; | |
my $uid = (getpwnam("saned"))[2]; | |
my $gid = (getgrnam("scanner"))[2]; | |
$( = $) = "$gid $gid"; | |
$< = $> = "$uid"; | |
if ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
use strict; | |
use diagnostics; | |
use LWP::Simple; | |
my $baseurl = 'http://127.0.0.1:9001/api/1/'; | |
my $apikey = '***'; | |
my $request_url = $baseurl.'deletePad?apikey='.$apikey.'&padID='.$ARGV[0]; | |
print "$request_url\n"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
use strict; | |
use diagnostics; | |
my @normal_chars = qw(I 1 l 0 O); | |
my @special_chars = qw(| [ ]); | |
my $length = 12; | |
print "The user hater's password generator. Have a lot of fun!\n"; | |
print "-------------------------------------------------------\n"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Disassembly | |
## WRT54G | |
Pull off the blue front bezel at one edge. The black main case is hooked below | |
the blue bezel below the side edge. | |
http://blog.irrashai.com/blog/2008/09/how-to-crack-open-a-wrt54g-router/ | |
# Serial Port |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
use strict; | |
use diagnostics; | |
use LWP::Simple; | |
use JSON; | |
my $proj = 'friendica'; | |
my $lang = 'eo'; | |
my $auth = 'user:password'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all: | |
update-initramfs -u | |
grub-mkconfig | |
update-grub | |
grub-install /dev/sdc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
use strict; | |
use diagnostics; | |
use Fcntl qw(:flock); | |
my $lockfile = '/home/.test.lock'; | |
open my $lock_fh, ">$lockfile" or die "Can't open $lockfile: $!\n"; | |
if (flock($lock_fh,LOCK_EX|LOCK_NB)){ |