XopcX
-
Posts
4 -
Joined
-
Last visited
Posts posted by XopcX
-
-
-
-
Am gasit un scanner de smtp-uri de linux si m-am gandit sa il postez , nu stiu cum functioneaza am vazut ca ia smtp-uri si din email si din ip .... poate ma lamuriti si pe mine
Socks checker for linux
in Programe utile
Posted
un mic script perl pentru a verifica socks
#!/usr/bin/perl
use IO::Socket::Socks;
#use strict;
#use warnings;
my $file = 'list.txt';
open (FILE, "$file") || die "Could not open $file\n";
my @data = <FILE>;
close FILE;
my $socksdata;
foreach my $socks (@data) {
eval {
my $status = 'FAILED';
local $SIG{ALRM} = sub {print ' ' . $status . "\n";goto ALARM;};
alarm 5;
chomp $socks;
print $socks;
my ($socks_ip,$socks_port) = split(/\:/,$socks);
my $socket = new IO::Socket::Socks( ProxyAddr=>"$socks_ip", ProxyPort=>"$socks_port", ConnectAddr=>"mail.goldhost.com", ConnectPort=>"25") or next;
if ($socket) {
print $socket "QUIT\r\n";
}
while (my $res = <$socket>) {
if ( $res =~ /^220/) {
$status = 'SUCCESS';
}
}
close($socket);
if ($status eq 'SUCCESS') {
$socksdata .= $socks . "\n";
}
print ' ' . $status . "\n";
alarm 0;
ALARM:
}
}
open FH, ">$file";
print FH $socksdata;
close FH;