User Tag List

Results 1 to 5 of 5

Thread: Web Directory Crawler

  1. #1

    Default Web Directory Crawler

    Dead useful when defacing. I'm not gonna provide the file as it's very private and I worked mad hard on it

    Code:
    #!/usr/bin/perl
    ####1. open the file
    #####2 read from the file
    #######3 take the strings that it reads make HTTP requests based on content
    ########4 analyze the response
    #########5 if one is found, write to a file  
    use strict; ##like #include <stdin.h> in C
    use warnings; ##like #include <stdin.h> in C
    use Net::HTTP; ##like #include <stdin.h in C
    use Getopt::Std; ##like #include <stdin.h in          
    my ($code, $mess); ## strings (variables)
    my (%h, %options); ##strings (variables)
     
    getopts('l:t:', \%options); #(sets options)
     
    my $list = $options{l} || die "Usage: $0 -l <list> -t <target>\n"; ##strings (variables)
    my $target = $options{t} || die "Usage: $0 -l <list> -t <target>\n"; ##strings (variables)
      
    open(LIST, "<", $list) || die "open(): error: $!.\n"; # opens the list and puts it in variable $list
     
    print "Searching for files on $target...\n"; #just prints that on screen
     
    while(defined(my $line = <LIST>)) # reads the $list and puts it in a $line and reads it line by line until the end
    {
            chomp $line; #chomp removes /n (enteer)
            my $request = Net::HTTP -> new (Host => $target) || die "Net::HTTP new(): error: [email protected]\n"; #ask me
            $request -> write_request(GET => $line, 'User-Agent' => "Windows XP"); #ask me
            ($code, $mess, %h) = $request -> read_response_headers;#ask me
            if($code == 200 || $code == 302) #errors it reads to tell if its alive
            {
                 print "Found file: $line\n"; #prints it if its found
            }
    }
    print "Done, exiting...\n"; #prints it
    close LIST;
    exit;

  2. #2
    Member soul's Avatar
    Join Date
    Apr 2008
    Location
    Dhaka, Bangladesh, Bangladesh
    Posts
    474

    Default

    what is this ?

    I'll start again
    And whatever pain may come
    Today this ends
    I'm forgiving what I've done

  3. #3

    Default

    It's the code that goes along with the file. You can deface forums and stuff.

  4. #4
    VIP Member
    • 's Gadgets
      • Motherboard:
      • Gigabyte
      • CPU:
      • Q6600
      • RAM:
      • 3GB DDR II
      • Hard Drive:
      • 320GB
      • Graphics Card:
      • 8600GT :(
      • Speakers/HPs:
      • Cosonic
      • Keyboard:
      • A4Tech
      • Mouse:
      • A4Tech
      • Controller:
      • Logitech RumblePad
      • ISP:
      • BDCom
      • Download Speed:
      • 20KB/s
      • Upload Speed:
      • 3MB/s
    xk::v (G展mmjaw)'s Avatar
    Join Date
    Feb 2008
    Location
    Dhaka
    Posts
    3,551

    Default

    i wonder if its so personal.. why ur providing it in the first place.. lolz..
    http://banglagamer.com/forums/image.php?type=sigpic&userid=19&dateline=1231856079

  5. #5

    Default

    Maybe there's an unknown programmer around here who wants to get a head start. Compiling their own executable is their own problem though.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 0.17439 seconds with 13 queries.