Notice: Undefined variable: string_attributes in /share/www/mediawiki/extensions/SyntaxHighlight_GeSHi/geshi/geshi.php on line 2353

Notice: Undefined variable: string_attributes in /share/www/mediawiki/extensions/SyntaxHighlight_GeSHi/geshi/geshi.php on line 2353

Notice: Undefined variable: string_attributes in /share/www/mediawiki/extensions/SyntaxHighlight_GeSHi/geshi/geshi.php on line 2353
Work:Scan Domains Ports - Zoelife4U Wiki

Work:Scan Domains Ports

From Zoelife4U Wiki
Jump to: navigation, search

Usage:

perl ports.pl domain.com ##

Where ## is the port number

#!/usr/bin/perl -w
 
use strict;
use warnings;
 
use IO::Socket;
 
my $port = $ARGV['1'];
my $domain = $ARGV['0'];
my $sock = new IO::Socket::INET (PeerAddr => $domain,
                         PeerPort => $port,
                         Proto => 'tcp');
if ($sock){
    close $sock;
    print "Scanning $domain : TCP $port is open\n";
    #port = $port + 1;
    }   
else{
    print "Scanning $domain : TCP $port is closed\n";
    #port = $port + 1;
    }
Personal tools
Online Users
Zoelife4U: