Author Topic: [Python]FuzzyWeb  (Read 915 times)

0 Members and 3 Guests are viewing this topic.

Offline DeXtreme

  • Peasant
  • *
  • Posts: 95
  • Cookies: 8
  • I was there and you never knew.
    • View Profile
    • My Designs
[Python]FuzzyWeb
« on: May 29, 2013, 03:14:10 am »
This script discovers useful and vulnerable directories and pages by sending HTTP requests to a list of such pages from a text file,and reading the response code.

Code: (Python) [Select]
import httplib
import time
import threading

#open textfile containing pages
f=open("pages2.txt","r")

#screenlock for threads
screenlock=threading.Semaphore(value=1)

def fuzz(name,page):
    try:
        con=httplib.HTTPConnection(str(name))
        screenlock.acquire()
        print "Checking "+page+"\n"

        #send request
        con.request("GET",str(page))
 
        #check response
        res=con.getresponse()
        if res.status==200:
            print page+" "+"found\n"
            found+=1
        else:
            print res.status,res.reason+"\n"
    except Exception,prob:
        print prob
    finally:
        con.close
        screenlock.release()
       

site=raw_input("Website:")

#read list of files and directories
pages=f.read()
pages=pages.split(",")
for page in pages:

    #create thread for each page
    t=threading.Thread(target=fuzz,args=(site,page))
    t.start()
   
f.close()

This is my list of directories and files.(Need a better one)
« Last Edit: June 26, 2013, 12:55:15 am by DeXtreme »

Offline BalaHoho

  • NULL
  • Posts: 2
  • Cookies: 0
    • View Profile
Re: [Python]FuzzyWeb
« Reply #1 on: June 24, 2013, 03:28:36 pm »
I think here you can change

Code: (Python) [Select]
"""
        res=con.getresponse()
        if str(res.status)=="200":
"""
->
"""

       res=con.getresponse()
       if res.status==200:
"""
I think U Know :)
« Last Edit: June 24, 2013, 03:45:14 pm by RedBullAddicted »

Offline DeXtreme

  • Peasant
  • *
  • Posts: 95
  • Cookies: 8
  • I was there and you never knew.
    • View Profile
    • My Designs
Re: [Python]FuzzyWeb
« Reply #2 on: June 26, 2013, 12:54:33 am »
I think here you can change

Code: (Python) [Select]
"""
        res=con.getresponse()
        if str(res.status)=="200":
"""
->
"""

       res=con.getresponse()
       if res.status==200:
"""
I think U Know :)

Oops i totally forgot about that.Thanks ;D