Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: Writing a port scanner...

  1. #11
    Jaded Network Admin nebulus200's Avatar
    Join Date
    Jun 2002
    Posts
    1,356
    Hmm....when I actually started using the script I ran across some things that didn't work quite right, so here is the updated fixed script with the original functionality (some of which I removed from the one I posted)

    /nebulus
    There is only one constant, one universal, it is the only real truth: causality. Action. Reaction. Cause and effect...There is no escape from it, we are forever slaves to it. Our only hope, our only peace is to understand it, to understand the 'why'. 'Why' is what separates us from them, you from me. 'Why' is the only real social power, without it you are powerless.

    (Merovingian - Matrix Reloaded)

  2. #12
    Senior Member tampabay420's Avatar
    Join Date
    Aug 2002
    Posts
    953

    Code from 2600

    #The following code was taken out of an old 2600 I found under my bed :-)
    #Print's Header information from a http request.

    use HTTP::Response;
    use LWP::UserAgent;
    my $au = new LWP::UserAgent;
    $au->agent('891681651651_981651651651');
    my $req = new HTTP::Request(GET, "http://$ARGV[0]");
    print $headers = $au->request($req)->headers_as_string;
    yeah, I\'m gonna need that by friday...

  3. #13
    Senior Member tampabay420's Avatar
    Join Date
    Aug 2002
    Posts
    953
    For those of you that like the code and are using it, i thought it would be helpful if you guys had a list of the ports and common services associated with those ports... You can find a lit of such services here at http://www.hackerwhacker.com/portslist.html ... I hope this helps...
    yeah, I\'m gonna need that by friday...

  4. #14
    Senior Member
    Join Date
    Nov 2002
    Posts
    186
    I just added a little feature to your code that is useful to me, sending the output to a file. You could always redirect it, but I figure things should all be contained in the code. It's just a simple:
    open(PORTS, ">ports.log") || die "Can't open output file.\n";
    then adding PORTS between the print statement and the text like
    print PORTS "::$port [passed]::\n";

    For you sys admins, this could even be exteneded to naming the file "$ENV{'computername'}-ports.log" (in win2k anyway)(choose the proper environment var. for your OS), saving it to a shared folder and deploying it as part of the login script. It would have to run at night or something since it takes some time....
    Lots of great uses for this scanner. Excellent work!
    \"When you say best friends, it means friends forever\" Brand New
    \"Best friends means I pulled the trigger
    Best friends means you get what you deserve\" Taking Back Sunday
    Visit alastairgrant.ca

  5. #15
    Is this code not for windows.If you know any C# could you try to do your next tutorial in this language.That is about the only language I am familiar with besides some smaller languages.

  6. #16
    Banned
    Join Date
    Jul 2002
    Posts
    877
    Cool What did you write it in, man? Looks like perl, the thing about me is that once I get used to a language I get bored of it then completly forget everything I've learned once I've managed to move onto something else. lol

  7. #17
    Junior Member
    Join Date
    Dec 2002
    Posts
    3
    I haven't developed too many tools until now, but this is a nice addition to my small, but expanding collection.

    THX for the info.
    Goose
    --------
    That was like masturbating with a cheesegrater: slightly pleasurable, but mostly painful.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •