Well i finnaly got my script working from a few hours ago. But When i say working what i mean is, IF the ip is vuln then it confirms it and quits the script (yay) But if its not vuln, the script just stays. Here is the script itself.

Beginning of script :3</p

use IO::Socket; use strict; print "Connecting :D\n"; my $socket = IO::Socket::INET->new( PeerAddr => '23.113.161.164', # 38.124.108.67 <-- NON vuln ip fo +r testing PeerPort => 123, # 23.113.161.164 <-- This IS a vul +n ip! Proto => 'udp', Timeout => 1); die "Sockets fucking hate you: $!\n" unless $socket; print "Were in, put on the masks\n"; my $payload = "\x97\x00\x00\x00\xAA\x00\x00\x00"; my $good = "\x97\x00\x00\x00"; $socket->send($payload) or die "Nothing got sent."; my $data; $socket->recv($data,4); my $response = substr($data,0,8); $response = reverse($response); if ($response == $good) { print "Success bro!\n"; } else { print "Your whole life is a lie and you are a failure\n"; exit(); }

End of script :3

In the script i included 1 vuln ip, and 1 non-vuln ip. I have tested this with multiple IP's and every NON vuln ip just hangs. All replys are welcomed :D

In reply to Timeout not working for IO::Socket by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.