13 Years of Service
40%

Pequeño script hecho a base de una api de windows para visualizar redes wifi
Code:
> 1.
## 0verWifi Scan v0.1 ##
2.
3.
# Coded by The X-C3LL (Twitter -> @TheXC3LL)
4.
# Http://0verl0ad.blogspot.com
5.
6.
7.
# Feel free to modify anything ;-)
8.
9.
10.
11.
use Win32::Wlan::API qw(WlanOpenHandle WlanEnumInterfaces WlanGetAvailableNetworkList);
12.
13.
14.
my %lista_auth = (
15.
1 => 'OPEN',
16.
2 =>'SHARED_KEY',
17.
3 => 'WPA',
18.
4 => 'WPA_PSK',
19.
5 => 'WPA_NONE',
20.
6 => 'WPA2',
21.
7 => 'WPA2'
22.
);
23.
24.
my %lista_cifra = (
25.
0 => 'NONE',
26.
1 => 'WEP40',
27.
2 => 'TKIP',
28.
4 => 'CCMP',
29.
5 => 'WEP104',
30.
256 => 'WPA',
31.
257 => 'WEP'
32.
);
33.
34.
my $handle = WlanOpenHandle();
35.
my @lista_inter = WlanEnumInterfaces($handle);
36.
my $adaptador = $lista_inter[0]->{guuid};
37.
my @redes = WlanGetAvailableNetworkList($handle,$adaptador);
38.
39.
system("cls");
40.
&intro;
41.
print "\n\nSSID" . " " x 16 . "Signal" . " " x 5 . "Security" ." " x 4 ."Auth" . " " x 6 . "Cipher\n" . "=" x 60 . "\n";
42.
foreach $red (@redes){
43.
my $separacion = " " x (20 - $red->{ssid_len});
44.
print $red->{ssid} . $separacion . $red->{signal_quality} . "dbm" . " " x 6 . &secur($red->{security_enabled}) . " " x 5 . &aa . " " x (10 - length(&aa)) . &cifra . " \n";
45.
}
46.
47.
48.
49.
sub secur {
50.
51.
if (@_ == "1"){
52.
53.
return "Enabled";
54.
} else {
55.
return "Disabled";
56.
}
57.
58.
59.
}
60.
61.
sub aa {
62.
$i = %lista_auth->{ $red->{default_auth_algorithm} } ;
63.
return $i;
64.
}
65.
66.
sub cifra {
67.
$c = %lista_cifra->{ $red->{default_cipher_algorithm} };
68.
return $c;
69.
}
70.
71.
72.
sub intro {
73.
print q(
74.
_______ __ __ .__ _____ .__
75.
\ _ \ ___ __ ____ _______ / \ / \|__|_/ ____\|__|
76.
/ /_\ \\ \/ /_/ __ \ \_ __ \\ \/\/ /| |\ __\ | |
77.
\ \_/ \\ / \ ___/ | | \/ \ / | | | | | |
78.
\_____ / \_/ \___ >|__| \__/\ / |__| |__| |__|
79.
\/ \/ \/
80.
_________
81.
/ _____/ ____ _____ ____
82.
\_____ \ _/ ___\ \__ \ / \
83.
/ \ \ \___ / __ \_| | \
84.
/_______ / \___ >/____ /|___| /
85.
\/ \/ \/ \/
86.
87.
88.
89.
90.
);
91.
}