==> Creating clean working copy [build]...done
==> Making package: fakeap 0.3.2-2 (Mon May 16 16:31:21 EDT 2016)
==> Retrieving sources...
-> Found fakeap-0.3.2.tar.gz
==> Validating source files with sha512sums...
fakeap-0.3.2.tar.gz ... Passed
==> Making package: fakeap 0.3.2-2 (Mon May 16 16:31:21 EDT 2016)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Found fakeap-0.3.2.tar.gz
==> WARNING: Skipping verification of source file PGP signatures.
==> Validating source files with sha512sums...
fakeap-0.3.2.tar.gz ... Passed
==> Extracting sources...
-> Extracting fakeap-0.3.2.tar.gz with bsdtar
==> Starting prepare()...
#!/usr/bin/perl
#
#!/usr/bin/perl
# fakeap - Create fake 802.11b Access Points
#!/usr/bin/perl
# Stuart Stock and Ken Beames, Black Alchemy Weapons Lab
#!/usr/bin/perl
# $Id: fakeap.pl,v 1.3 2002/08/31 20:56:42 shstock Exp $
#!/usr/bin/perl
#
#!/usr/bin/perl
# Copyright (c) 2002 Black Alchemy Enterprises. All rights reserved.
#!/usr/bin/perl
# This code is released under the GNU Public License.
#!/usr/bin/perl
# --------------------------------------------------------------------
#!/usr/bin/perl
# Notes:
#!/usr/bin/perl
#
#!/usr/bin/perl
# Requires the CVS version (as of 7/31/2002) of the Prism2/2.5/3 Host AP
#!/usr/bin/perl
# driver to switch BSSID (MAC address). If you use an older version,
#!/usr/bin/perl
# the MAC address change will appear to work, but the beacons will retain
#!/usr/bin/perl
# the original address.
#!/usr/bin/perl
#!/usr/bin/perl
use strict;
#!/usr/bin/perl
use warnings;
#!/usr/bin/perl
use Getopt::Long;
#!/usr/bin/perl
use Time::HiRes;
#!/usr/bin/perl
#!/usr/bin/perl
use vars
#!/usr/bin/perl
qw( $sleep_opt $channel_opt $mac_opt $essid_opt $words_opt
#!/usr/bin/perl
$interface_opt $vendors_opt $wep_opt $key_opt $power_opt );
#!/usr/bin/perl
#!/usr/bin/perl
my $MAX_CHANNEL = 11; # Noth America. Change for other regions.
#!/usr/bin/perl
my $IWCONFIG = "/sbin/iwconfig"; # Change as needed
#!/usr/bin/perl
my $IFCONFIG = "/sbin/ifconfig"; # Change as needed
#!/usr/bin/perl
my $CRYPTCONF = "/usr/local/bin/hostap_crypt_conf"; # Change as needed
#!/usr/bin/perl
#!/usr/bin/perl
my @words = ( "Access Point", "tsunami", "host", "airport", "linksys" );
#!/usr/bin/perl
my @vendors = ( "00:00:0C:", "00:00:CE:", "00:00:EF:" );
#!/usr/bin/perl
#!/usr/bin/perl
# catch ctrl-c
#!/usr/bin/perl
#
#!/usr/bin/perl
$SIG{INT} = \&int_catcher;
#!/usr/bin/perl
#!/usr/bin/perl
# int_catcher
#!/usr/bin/perl
#
#!/usr/bin/perl
# args: none
#!/usr/bin/perl
# rets: none
#!/usr/bin/perl
#
#!/usr/bin/perl
# Signal catcher. Prints message and exits.
#!/usr/bin/perl
#!/usr/bin/perl
sub int_catcher {
#!/usr/bin/perl
print "\n";
#!/usr/bin/perl
print "-------------------------------------------------------------------------\n";
#!/usr/bin/perl
print "Run complete\n\n";
#!/usr/bin/perl
#!/usr/bin/perl
exit;
#!/usr/bin/perl
#!/usr/bin/perl
}
#!/usr/bin/perl
#!/usr/bin/perl
# usage
#!/usr/bin/perl
#
#!/usr/bin/perl
# args: none
#!/usr/bin/perl
# rets: none
#!/usr/bin/perl
#
#!/usr/bin/perl
# Prints arguments and exits
#!/usr/bin/perl
#!/usr/bin/perl
sub usage {
#!/usr/bin/perl
print "Usage: fakeap.pl --interface wlanX [--channel X] [--mac XX:XX...]\n";
#!/usr/bin/perl
print " [--essid NAME] [--words FILENAME] [--sleep N] [--vendors FILENAME]\n";
#!/usr/bin/perl
print " [--wep N] [--key KEY] [--power N]\n\n";
#!/usr/bin/perl
#!/usr/bin/perl
print " --channel X Use static channel X\n";
#!/usr/bin/perl
print " --essid NAME Use static ESSID NAME\n";
#!/usr/bin/perl
print " --mac XX:XX... Use static MAC address XX:...\n";
#!/usr/bin/perl
print " --words FILE Use FILE to create ESSIDs \n";
#!/usr/bin/perl
print " --sleep N Sleep N Ssec between changes, default 0.25\n";
#!/usr/bin/perl
print " --vendor FILE Use FILE to define vendor MAC prefixes \n";
#!/usr/bin/perl
print " --wep N Use WEP with probability N where 0 < N <= 1\n";
#!/usr/bin/perl
print " --key KEY Use KEY as the WEP key. Passed raw to iwconfig\n";
#!/usr/bin/perl
print " --power N Vary Tx power between 1 and N. In milliwatts\n";
#!/usr/bin/perl
print "\n";
#!/usr/bin/perl
}
#!/usr/bin/perl
#!/usr/bin/perl
# load_words
#!/usr/bin/perl
#
#!/usr/bin/perl
# args: none
#!/usr/bin/perl
# rets: none
#!/usr/bin/perl
#
#!/usr/bin/perl
# Load the user specified word list into @words
#!/usr/bin/perl
#!/usr/bin/perl
sub load_words {
#!/usr/bin/perl
@words = ();
#!/usr/bin/perl
#!/usr/bin/perl
open( my $FH, "<$words_opt" ) or die "Could not open $words_opt: $!\n";
#!/usr/bin/perl
while ( my $line = <$FH> ) {
#!/usr/bin/perl
chomp $line;
#!/usr/bin/perl
push @words, $line;
#!/usr/bin/perl
}
#!/usr/bin/perl
close $FH;
#!/usr/bin/perl
#!/usr/bin/perl
return;
#!/usr/bin/perl
}
#!/usr/bin/perl
#!/usr/bin/perl
# load_vendors
#!/usr/bin/perl
#
#!/usr/bin/perl
# args: none
#!/usr/bin/perl
# rets: none
#!/usr/bin/perl
#
#!/usr/bin/perl
# Loads vendor mac prefix file into @vendors
#!/usr/bin/perl
#!/usr/bin/perl
sub load_vendors {
#!/usr/bin/perl
@vendors = ();
#!/usr/bin/perl
#!/usr/bin/perl
open( my $FH, "<$vendors_opt" ) or die "Could not open $vendors_opt: $!\n";
#!/usr/bin/perl
while ( my $line = <$FH> ) {
#!/usr/bin/perl
chomp $line;
#!/usr/bin/perl
$line =~ /^(\w\w:\w\w:\w\w)/;
#!/usr/bin/perl
push @vendors, "$1:";
#!/usr/bin/perl
}
#!/usr/bin/perl
close $FH;
#!/usr/bin/perl
#!/usr/bin/perl
return;
#!/usr/bin/perl
}
#!/usr/bin/perl
#!/usr/bin/perl
# gen_essid
#!/usr/bin/perl
#
#!/usr/bin/perl
# args: none
#!/usr/bin/perl
# rets: scalar string $word
#!/usr/bin/perl
#
#!/usr/bin/perl
# Returns a string suitable for use as an ESSID. Picks it randomly from
#!/usr/bin/perl
# @words
#!/usr/bin/perl
#!/usr/bin/perl
sub gen_essid {
#!/usr/bin/perl
return $words[ int( rand $#words ) ];
#!/usr/bin/perl
}
#!/usr/bin/perl
#!/usr/bin/perl
# gen_channel
#!/usr/bin/perl
#
#!/usr/bin/perl
# args: none
#!/usr/bin/perl
# rets: scalar int $channel
#!/usr/bin/perl
#
#!/usr/bin/perl
# Returns a number between 1 and $MAX_CHANNEL
#!/usr/bin/perl
#!/usr/bin/perl
sub gen_channel {
#!/usr/bin/perl
return int( rand $MAX_CHANNEL ) + 1;
#!/usr/bin/perl
}
#!/usr/bin/perl
#!/usr/bin/perl
# gen_power
#!/usr/bin/perl
#
#!/usr/bin/perl
# args: none
#!/usr/bin/perl
# rets: scalar int $channel
#!/usr/bin/perl
#
#!/usr/bin/perl
# Returns a number between 1 and $power_opt or Def if $power_opt is not set
#!/usr/bin/perl
#!/usr/bin/perl
sub gen_power {
#!/usr/bin/perl
return int( rand $power_opt ) + 1 if $power_opt;
#!/usr/bin/perl
return "Def";
#!/usr/bin/perl
}
#!/usr/bin/perl
#!/usr/bin/perl
# gen_mac
#!/usr/bin/perl
#
#!/usr/bin/perl
# args: none
#!/usr/bin/perl
# rets: none
#!/usr/bin/perl
#
#!/usr/bin/perl
# Returns a random MAC address with first three octets from @vendors
#!/usr/bin/perl
# last three random.
#!/usr/bin/perl
#!/usr/bin/perl
sub gen_mac {
#!/usr/bin/perl
#!/usr/bin/perl
return sprintf(
#!/usr/bin/perl
"%s%02X:%02X:%02X",
#!/usr/bin/perl
$vendors[ int( rand $#vendors ) ],
#!/usr/bin/perl
int( rand 256 ),
#!/usr/bin/perl
int( rand 256 ),
#!/usr/bin/perl
int( rand 256 )
#!/usr/bin/perl
);
#!/usr/bin/perl
#!/usr/bin/perl
}
#!/usr/bin/perl
#!/usr/bin/perl
# pick_wep
#!/usr/bin/perl
#
#!/usr/bin/perl
# args: none
#!/usr/bin/perl
# rets: string Y|N
#!/usr/bin/perl
#
#!/usr/bin/perl
# Returns N if wep_opt is not set otherwise returns
#!/usr/bin/perl
# Y with probability $wep_opt
#!/usr/bin/perl
#!/usr/bin/perl
sub pick_wep {
#!/usr/bin/perl
$wep_opt = 0 if not $wep_opt;
#!/usr/bin/perl
#!/usr/bin/perl
return "Y" if ( rand(1) < $wep_opt );
#!/usr/bin/perl
return "N";
#!/usr/bin/perl
#!/usr/bin/perl
}
#!/usr/bin/perl
#!/usr/bin/perl
################################################################
#!/usr/bin/perl
#
#!/usr/bin/perl
# Main
#!/usr/bin/perl
#
#!/usr/bin/perl
print "fakeap 0.3.1 - Wardrivring countermeasures\n";
#!/usr/bin/perl
print "Copyright (c) 2002 Black Alchemy Enterprises. All rights reserved\n\n";
#!/usr/bin/perl
#!/usr/bin/perl
GetOptions(
#!/usr/bin/perl
"channel=i" => \$channel_opt,
#!/usr/bin/perl
"essid=s" => \$essid_opt,
#!/usr/bin/perl
"words=s" => \$words_opt,
#!/usr/bin/perl
"mac=s" => \$mac_opt,
#!/usr/bin/perl
"sleep=s" => \$sleep_opt,
#!/usr/bin/perl
"power=i" => \$power_opt,
#!/usr/bin/perl
"wep=s" => \$wep_opt,
#!/usr/bin/perl
"key=s" => \$key_opt,
#!/usr/bin/perl
"interface=s" => \$interface_opt,
#!/usr/bin/perl
"vendors=s" => \$vendors_opt
#!/usr/bin/perl
);
#!/usr/bin/perl
#!/usr/bin/perl
usage() and exit if not $interface_opt;
#!/usr/bin/perl
usage() and exit if ( $words_opt and $essid_opt ); # mutually exclusive
#!/usr/bin/perl
#!/usr/bin/perl
print "Using interface $interface_opt:\n";
#!/usr/bin/perl
print "Sleeping $sleep_opt sec\n" if $sleep_opt;
#!/usr/bin/perl
print "Static channel $channel_opt\n" if $channel_opt;
#!/usr/bin/perl
print "Static ESSID $essid_opt\n" if $essid_opt;
#!/usr/bin/perl
print "Static MAC $mac_opt\n" if $mac_opt;
#!/usr/bin/perl
print "Generating ESSIDs from $words_opt\n" if $words_opt;
#!/usr/bin/perl
print "Using WEP with probability $wep_opt\n" if $wep_opt;
#!/usr/bin/perl
print "Using supplied WEP key $key_opt\n" if $key_opt;
#!/usr/bin/perl
print "Vary Tx power up to $power_opt\n" if $power_opt;
#!/usr/bin/perl
#!/usr/bin/perl
load_words() if $words_opt;
#!/usr/bin/perl
print "Using $#words words for ESSID generation\n";
#!/usr/bin/perl
#!/usr/bin/perl
load_vendors() if $vendors_opt;
#!/usr/bin/perl
print "Using $#vendors vendors for MAC generation\n";
#!/usr/bin/perl
#!/usr/bin/perl
print
#!/usr/bin/perl
"-------------------------------------------------------------------------\n";
#!/usr/bin/perl
#!/usr/bin/perl
for ( my $i = 0 ; ; $i++ ) {
#!/usr/bin/perl
my $essid = $essid_opt || gen_essid();
#!/usr/bin/perl
my $channel = $channel_opt || gen_channel();
#!/usr/bin/perl
my $mac = $mac_opt || gen_mac();
#!/usr/bin/perl
my $sleep = $sleep_opt || 0.25;
#!/usr/bin/perl
my $wep = pick_wep();
#!/usr/bin/perl
my $power = gen_power();
#!/usr/bin/perl
#!/usr/bin/perl
if ($wep_opt) {
#!/usr/bin/perl
system( $CRYPTCONF, "-p", $interface_opt, "ff:ff:ff:ff:ff:ff", "none" )
#!/usr/bin/perl
if $wep eq "N";
#!/usr/bin/perl
system( $IWCONFIG, $interface_opt, "key",
#!/usr/bin/perl
$key_opt ? $key_opt : "s:fakeap", "open" )
#!/usr/bin/perl
if $wep eq "Y";
#!/usr/bin/perl
}
#!/usr/bin/perl
#!/usr/bin/perl
#!/usr/bin/perl
system( $IFCONFIG, $interface_opt, "down" );
#!/usr/bin/perl
system( $IWCONFIG, $interface_opt, "ESSID", $essid );
#!/usr/bin/perl
printf( $IWCONFIG, $interface_opt, "ESSID", $essid );
#!/usr/bin/perl
system( $IWCONFIG, $interface_opt, "channel", $channel );
#!/usr/bin/perl
printf( $IWCONFIG, $interface_opt, "channel", $channel );
#!/usr/bin/perl
system( $IFCONFIG, $interface_opt, "hw", "ether", $mac );
#!/usr/bin/perl
printf( $IFCONFIG, $interface_opt, "hw", "ether", $mac );
#!/usr/bin/perl
system( $IWCONFIG, $interface_opt, "txpower", $power . "mW" ) if $power_opt;
#!/usr/bin/perl
printf( $IWCONFIG, $interface_opt, "txpower", $power . "mW" ) if $power_opt;
#!/usr/bin/perl
system( $IFCONFIG, $interface_opt, "up" );
#!/usr/bin/perl
#!/usr/bin/perl
printf( "%i: ESSID=%-15s chan=%02i Pwr=%-3s WEP=%s MAC=%s \r",
#!/usr/bin/perl
$i, $essid, $channel, $power, $wep, $mac );
#!/usr/bin/perl
#!/usr/bin/perl
Time::HiRes::sleep($sleep);
#!/usr/bin/perl
}
==> Entering fakeroot environment...
==> Starting package()...
==> Tidying install...
-> Removing libtool files...
-> Purging unwanted files...
-> Removing static library files...
-> Stripping unneeded symbols from binaries and libraries...
-> Compressing man and info pages...
==> Checking for packaging issue...
==> Creating package "fakeap"...
-> Generating .PKGINFO file...
-> Generating .BUILDINFO file...
error: invalid option '--noprogressbar'
-> Generating .MTREE file...
-> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: fakeap 0.3.2-2 (Mon May 16 16:31:22 EDT 2016)
==> Cleaning up...