what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

rwkg.pl.txt

rwkg.pl.txt
Posted Sep 5, 2005
Authored by BlackAngels

Random WEP/WPA key generation utility. Written in perl.

tags | tool, perl, wireless
SHA-256 | ba7f33ecc22c05fdbb1bd3b3dff6347a257593e711902b2bb03e70e4c225c394

rwkg.pl.txt

Change Mirror Download
#!/usr/bin/perl

##
# RWKG
# Random WEP/WPA Keys Generator
#
# This tool generate a random string of
# allowed ascii characters and convert it
# to hex format (5/13/16/29 characters are
# necessary to create 64/128/152/256 bits
# WEP keys, 8-63 characters strings instead
# to create WPA/PSK keys).
#
# Code for SecurityWireless.info proof use only.
#
# Legal notes :
# BlackAngels staff refuse all responsabilities
# for an incorrect or illegal use of this software
# or for eventual damages to others systems.
##


# Variables
$keytype = $ARGV[ 0 ];
$keydimension = $ARGV[ 1 ];
$string = " !#\$\%\\&()*+,-./0123456789:;<=>?\@ABCDEFGHIJKLMNOPQRSTUVWXYZ\[^]_abcdefghijklmnopqrstuvwxyz{~|}";
@chars = split(//,$string);
$n = @chars - 1;


# Random WEP/WPA Keys Generator
if ($keytype eq "WEP") {
if ($keydimension eq 64) { $key = generate(5); }
elsif ($keydimension eq 128) { $key = generate(13); }
elsif ($keydimension eq 152) { $key = generate(16); }
elsif ($keydimension eq 256) { $key = generate(29); }
else { usage(); }

print "\n\n[*] Generating WEP key ...\n";
$type = "WEP";
}
elsif ($keytype eq "WPA") {
if ($keydimension >= 8 && $keydimension <= 63) {
if ($keydimension <= 20) { print "\nWarning: WPA/PSK keys with a length of less then 20 characters, could be simply found via bruteforce attack ..."; }
$key = generate($keydimension)
}
else { usage(); }

print "\n\n[*] Generating WPA/PSK key ...\n";
$type = "WPA/PSK";
}
else { usage(); }

$hex = unpack('H*', $key);
print "\n[+] Random $type key";
print "\n [-] ASCII Value -> $key";
print "\n [-] Hex Value -> $hex\n\n";


# Subroutines
sub generate
{
my ($len) = @_;
for ($i=0;$i<$len;$i++) {
$index = int(rand $n);
$key = $key . $chars[$index];
}
return $key;
exit(1);
}

sub usage
{
print "\nUsage :\n";
print "perl rwkg.pl <key type> <key dimension>\n";
print "Key types allowed: WEP, WPA\n";
print "Key dimension WEP allowed values: 64, 128, 152, 256\n";
print "Key dimension WPA/PSK allowed values: 8/63\n";
print "Code for SecurityWireless.info proof use only\n\n";
exit(1);
}
Login or Register to add favorites

File Archive:

December 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Dec 1st
    0 Files
  • 2
    Dec 2nd
    41 Files
  • 3
    Dec 3rd
    25 Files
  • 4
    Dec 4th
    0 Files
  • 5
    Dec 5th
    0 Files
  • 6
    Dec 6th
    0 Files
  • 7
    Dec 7th
    0 Files
  • 8
    Dec 8th
    0 Files
  • 9
    Dec 9th
    0 Files
  • 10
    Dec 10th
    0 Files
  • 11
    Dec 11th
    0 Files
  • 12
    Dec 12th
    0 Files
  • 13
    Dec 13th
    0 Files
  • 14
    Dec 14th
    0 Files
  • 15
    Dec 15th
    0 Files
  • 16
    Dec 16th
    0 Files
  • 17
    Dec 17th
    0 Files
  • 18
    Dec 18th
    0 Files
  • 19
    Dec 19th
    0 Files
  • 20
    Dec 20th
    0 Files
  • 21
    Dec 21st
    0 Files
  • 22
    Dec 22nd
    0 Files
  • 23
    Dec 23rd
    0 Files
  • 24
    Dec 24th
    0 Files
  • 25
    Dec 25th
    0 Files
  • 26
    Dec 26th
    0 Files
  • 27
    Dec 27th
    0 Files
  • 28
    Dec 28th
    0 Files
  • 29
    Dec 29th
    0 Files
  • 30
    Dec 30th
    0 Files
  • 31
    Dec 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close