rendered paste body#!/usr/bin/perl
# -f [Load hosts from a file, use in -s mode, file must contain IP's only each in its own line]
# -b [Begin IP, use with -s mode]
# -e [End IP, use with -s mode]
# -t [Time out for sockets, use with -s mode, default is 3]
# -c [Number of threads, use with -s mode, default is 100]
use warnings;
use strict;
use Tk;
my ($vtarg, $vports, $nmap, $socket, $ftp, $ftpw, $proxy, $cisco, $rand, $banner, $verbose);
my $mw = MainWindow->new;
$mw->title("Wer2 Frontend");
$mw->Label(-text => "Targets:")->pack( );
my $targent = $mw->Entry(-selectborderwidth => 10, -textvariable => \$vtarg)->pack(-expand => 1);
$mw->Label(-text => "Ports:")->pack( );
my $portent = $mw->Entry(-selectborderwidth => 10, -textvariable => \$vports)->pack(-expand => 1);
my $cnmap = $mw->Checkbutton(-text => 'Nmap scan mode', -variable => \$nmap)->pack;
my $csocket = $mw->Checkbutton(-text => 'Perl IO::Socket scan mode', -variable => \$socket)->pack;
my $cftp = $mw->Checkbutton(-text => 'FTP Servers with anon', -variable => \$ftp)->pack;
my $cwftp = $mw->Checkbutton(-text => 'FTP Servers with anon + write', -variable => \$ftpw)->pack;
my $cproxy = $mw->Checkbutton(-text => 'Scan for Proxies', -variable => \$proxy)->pack;
my $ccisco = $mw->Checkbutton(-text => 'Cisco with enable', -variable => \$cisco)->pack;
my $crand = $mw->Checkbutton(-text => 'Random IPs', -variable => \$rand)->pack;
my $cbanner = $mw->Checkbutton(-text => 'Grab Banners', -variable => \$banner)->pack;
my $cverbose = $mw->Checkbutton(-text => 'Verbose', -variable => \$verbose)->pack;
$mw->Button(-text => "Scan!", -command => sub { scan(); })->pack;
sub scan {
my $newcmd = "./wer2" . " ";
if ($nmap == 1) { $newcmd = $newcmd . "-n" . " " }
if ($socket == 1) { $newcmd = $newcmd . "-s" . " " }
if ($ftp == 1) { $newcmd = $newcmd . "-F" . " " }
if ($ftpw == 1) { $newcmd = $newcmd . "-w" . " " }
if ($proxy == 1) { $newcmd = $newcmd . "-P" . " " }
if ($cisco == 1) { $newcmd = $newcmd . "-C" . " " }
if ($rand == 1) { $newcmd = $newcmd . "-r -1" . " " }
if ($banner == 1) { $newcmd = $newcmd . "-B" . " " }
if ($verbose == 1) { $newcmd = $newcmd . "-v" . " " }
$newcmd = $newcmd . "-p " . $vports . " ";
$newcmd = $newcmd . $vtarg;
print $newcmd;
}
MainLoop;