Skip to content

Instantly share code, notes, and snippets.

View joet3ch's full-sized avatar

Joe Nicosia joet3ch

View GitHub Profile
#!/usr/bin/perl
#Parser
use warnings;
use strict;
my $output_filename='output_parser.log'; #file where you want the output
die "\n\t$output_filename file already exists!\n\n" if (-e $output_filename);
sub output {
#!/usr/local/bin/expect -f
set force_conservative 1 ;# set to 1 to force conservative mode even if
;# script wasn't run conservatively originally
if {$force_conservative} {
set send_slow {1 .1}
proc send {ignore arg} {
sleep .1
exp_send -s -- $arg
}
#!/usr/bin/python
import sys
import os
file01 = open('/path/file01.txt', 'r')
read01 = file01.readlines()
file02 = open('/path/file02.txt', 'r')
read02 = file02.readlines()
#!/usr/bin/perl
use strict;
use Net::DNS;
use Data::Dumper;
use Net::Netmask;
my $argnum;
foreach $argnum (0 .. $#ARGV) {
#!/usr/bin/perl
use IO::Socket;
use JOE;
#Dynamic DNS updater using public IP
#getip.pl
#hosts and queries to get the page that says ur ip
$host = "checkip.dyndns.org";
$port = 8245;
$str = "GET /index.php\015\012\015\012";
#!/usr/bin/perl
use strict;
open(DID, ">>/home/joet3ch/iDid.txt");
my $time = &gettime();
sub gettime {
my @timearray = (my $_sec,my $_min,my $_hour,my $_mday,my $_mon,my $_year,my $_wday,my $_yday,my $_isdst) = localtime(time);
#!/usr/bin/perl
use strict;
use File::Tail;
my @errors = ('Bad protocol version identification','Failed password','Did not receive identification string');
my $line;
my $file = File::Tail->new("/var/log/everything.log");
while (defined($line=$file->read)) {
#!/usr/bin/perl
use strict;
use File::Tail;
use DBI;
my $server = 'localhost';
my $db = 'apache';
my $username = 'root';
my $password = '';
#!/usr/bin/php
<?php
// set PHP include path
$newIncludePath = array();
$newIncludePath[] = '/opt/apps/zend_framework/';
$newIncludePath[] = 'include';
$newIncludePath[] = get_include_path();
$newIncludePath = implode(PATH_SEPARATOR, $newIncludePath);