#!/usr/bin/perl
## This Script is free for all. Please feel free to distribute it to all of your friends! I do not warantee this program
## in any way or for any reason, if it blows up and ruins your entire business database, I accept no responsibility!
## Please email cronus@pcis.net with any problems or comments.
## NOTE: This is not meant to run on anything but linux with perl 5.0 or greater, if you need to to run on win32
## good luck!
use IO::Socket;
my $VERSION = '1.0';
my ( $peer, $port );
##look for server argument or display usage
( $peer = $ARGV[0] ) || &usage;
##assign port description hash
my %connected = (
'tcpmux'=>1, 'compressnet'=>2, 'compressnet'=>3,
'rje'=>5, 'echo'=>7, 'discard'=>9,
'systat'=>11, 'daytime'=>13, 'qotd'=>17,
'msp'=>18, 'chargen'=>19, 'ftp-data'=>20,
'ftp'=>21, 'ssh'=>22, 'telnet'=>23,
'smtp'=>25, 'nsw-fe'=>27, 'msg-icp'=>29,
'msg-auth'=>31, 'dsp'=>33, 'time'=>37,
'rap'=>38, 'rlp'=>39, 'graphics'=>41,
'name'=>42, 'nameserver'=>42, 'nicname'=>43,
'mpm-flags'=>44, 'mpm'=>45, 'mpm-snd'=>46,
'ni-ftp'=>47, 'auditd'=>48, 'tacacs'=>49,
're-mail-ck'=>50, 'la-maint'=>51, 'xns-time'=>52,
'domain'=>53, 'xns-ch'=>54, 'isi-gl'=>55,
'xns-auth'=>56, 'xns-mail'=>58, 'ni-mail'=>61,
'acas'=>62, 'whois++'=>63, 'covia'=>64,
'tacacs-ds'=>65, 'sql*net'=>66, 'bootps'=>67,
'bootpc'=>68, 'tftp'=>69, 'gopher'=>70,
'netrjs-1'=>71, 'netrjs-2'=>72, 'netrjs-3'=>73,
'netrjs-4'=>74, 'deos'=>76, 'vettcp'=>78,
'finger'=>79, 'http'=>80, 'www'=>80,
'www-http'=>80, 'hosts2-ns'=>81, 'xfer'=>82,
'mit-ml-dev'=>83, 'ctf'=>84, 'mit-ml-dev'=>85,
'mfcobol'=>86, 'kerberos'=>88, 'su-mit-tg'=>89,
'dnsix'=>90, 'mit-dov'=>91, 'npp'=>92,
'dcp'=>93, 'objcall'=>94, 'supdup'=>95,
'dixie'=>96, 'swift-rvf'=>97, 'tacnews'=>98,
'metagram'=>99, 'newacct'=>100, 'hostname'=>101,
'gppitnp'=>103, 'cso'=>105, 'csnet-ns'=>105,
'3com-tsmux'=>106, 'rtelnet'=>107, 'snagas'=>108,
'sunrpc'=>111, 'mcidas'=>112, 'ident'=>113,
'auth'=>113, 'audionews'=>114, 'sftp'=>115,
'ansanotify'=>116, 'uucp-path'=>117, 'sqlserv'=>118,
'nntp'=>119, 'cfdptkt'=>120, 'erpc'=>121,
'smakynet'=>122, 'ntp'=>123, 'ansatrader'=>124,
'locus-map'=>125, 'nxedit'=>126, 'locus-con'=>127,
'gss-xlicen'=>128, 'pwdgen'=>129, 'cisco-fna'=>130,
'cisco-tna'=>131, 'cisco-sys'=>132, 'statsrv'=>133,
'ingres-net'=>134, 'epmap'=>135, 'profile'=>136,
'netbios-ns'=>137, 'netbios-dgm'=>138, 'netbios-ssn'=>139,
'emfis-data'=>140, 'emfis-cntl'=>141, 'bl-idm'=>142,
'imap'=>143, 'uma'=>144, 'uaac'=>145,
'iso-ip'=>147, 'jargon'=>148, 'aed-512'=>149,
'sql-net'=>150, 'hems'=>151, 'bftp'=>152,
'sgmp'=>153, 'netsc-prod'=>154, 'netsc-dev'=>155,
'sqlsrv'=>156, 'knet-cmp'=>157, 'pcmail-srv'=>158,
'nss-routing'=>159, 'sgmp-traps'=>160, 'snmp'=>161,
'snmptrap'=>162, 'cmip-man'=>163, 'cmip-agent'=>164,
'xns-courier'=>165, 's-net'=>166, 'namp'=>167,
'rsvd'=>168, 'send'=>169, 'print-srv'=>170,
'multiplex'=>171, 'xyplex-mux'=>173, 'mailq'=>174,
'vmnet'=>175, 'genrad-mux'=>176, 'xdmcp'=>177,
'nextstep'=>178, 'bgp'=>179, 'ris'=>180,
'unify'=>181, 'audit'=>182, 'ocbinder'=>183,
'ocserver'=>184, 'remote-kis'=>185, 'kis'=>186,
'aci'=>187, 'mumps'=>188, 'qft'=>189,
'gacp'=>190, 'prospero'=>191, 'osu-nms'=>192,
'srmp'=>193, 'irc'=>194, 'dn6-nlm-aud'=>195,
'dn6-smm-red'=>196, 'dls'=>197, 'dls-mon'=>198,
'smux'=>199, 'src'=>200, 'at-rtmp'=>201,
'at-nbp'=>202, 'at-3'=>203, 'at-echo'=>204,
'at-5'=>205, 'at-zis'=>206, 'at-7'=>207,
'at-8'=>208, 'qmtp'=>209, 'anet'=>212,
'ipx'=>213, 'vmpwscs'=>214, 'softpc'=>215,
'CAIlic'=>216, 'dbase'=>217, 'mpp'=>218,
'uarps'=>219, 'fln-spx'=>221, 'rsh-spx'=>222,
'cdc'=>223, 'masqdialer'=>224, 'direct'=>242,
'sur-meas'=>243, 'dayna'=>244, 'link'=>245,
'dsp3270'=>246, 'subntbcst_tftp'=>247, 'bhfhs'=>248,
'rap'=>256, 'set'=>257, 'yak-chat'=>258,
'esro-gen'=>259, 'openport'=>260, 'nsiiops'=>261,
'arcisdms'=>262, 'hdap'=>263, 'bgmp'=>264,
'http-mgmt'=>280, 'personal-link'=>281, 'cableport-ax'=>282,
'rescap'=>283, 'corerjd'=>284, 'novastorbakcup'=>308,
'entrusttime'=>309, 'bhmds'=>310, 'asip-webadmin'=>311,
'vslmp'=>312, 'magenta-logic'=>313, 'opalis-robot'=>314,
'dpsi'=>315, 'decauth'=>316, 'zannet'=>317,
'pkix-timestamp'=>318, 'ptp-event'=>319, 'ptp-general'=>320,
'pip'=>321, 'rtsps'=>322, 'pdap'=>344,
'pawserv'=>345, 'zserv'=>346, 'fatserv'=>347,
'csi-sgwp'=>348, 'mftp'=>349, 'matip-type-a'=>350,
'matip-type-b'=>351, 'bhoetty'=>351, 'dtag-ste-sb'=>352,
'bhoedap4'=>352, 'ndsauth'=>353, 'datex-asn'=>355,
=1= |