def __init__(self, _form, _resulturl=None, _post={}, _data="", _helper=class_helper.helper()): try: _helper.print_disclaimer() self.helper = _helper self.stream = None self.random = None self.bbcode = class_bbcode.bbcode(_helper) self.bbcode.create_bbcode_list() self.post = _post self.data = _data self.skip = False self.form = _form self.start_hash = str( hashlib.sha1(str(random.randint(0, 10000))).hexdigest()) self.end_hash = str( hashlib.sha1(str(random.randint(0, 10000))).hexdigest()) self.random = str(random.randint(11111111, 99999999)) #self.helper.verbose(1,self.helper.ansi.BLUE+"Welcome to nazo - the BBCode XSS Vulnerability scanner"+self.helper.ansi.END) except: _helper.error("nazo.__init__()") _helper.error(traceback.format_exc())
def __init__(self, _helper=class_helper.helper()): try: self.helper = _helper self.helper.verbose(2, "init BBCode Class") self._supported = 0 self.tag_in_img = False # FORMAT: (tag name, typ, useable, valid data list) # tag - Tag name (b,u,i,...) # typ - # 1: [b][/b] # 2: [b=a][/b] # usable is 1 if tag is recognized # -1 if unsure # list with special valid data self.bbcode_list = [] self.bbcode_list_injection = [] self.bbcodes = [ ("b", 0, []), ("i", 0, []), ("u", 0, []), ("left", 0, []), ("right", 0, []), ("center", 0, []), ("img", 0, ["test.png", "http://www.asd.com/test.png"]), ("code", 0, []), ("php", 0, []), ("html", 0, []), ("highlight", 0, []), ("noparse", 0, []), ("attach", 0, []), ("bug", 0, []), ("pgn3", 0, []), ("email", 0, ["*****@*****.**"]), ("url", 0, ["test.com", "www.test.com", "http://www.test.com"]), ("thread", 0, []), ("post", 0, []), ("thread", 0, []), ("video", 0, [ "6GAD9pmYqXQ", "http://www.youtube.com/watch?v=6GAD9pmYqXQ", "www.youtube.com/watch?v=6GAD9pmYqXQ" ]), ("thread", 0, []), ("quote", 0, []), ("pgn2", 0, []), ("email", 1, ["*****@*****.**"]), ("url", 1, ["test.com", "www.test.com", "http://www.test.com"]), ("thread", 1, []), ("post", 1, []), ("thread", 1, []), ("video", 1, [ "6GAD9pmYqXQ", "http://www.youtube.com/watch?v=6GAD9pmYqXQ", "www.youtube.com/watch?v=6GAD9pmYqXQ" ]), ("thread", 1, []), ("quote", 1, []), ("pgn2", 1, []), ("threadvb", 1, []), ("wiki", 1, []), ("color", 1, ["green", "#ff0000"]), ("size", 1, ["+2", "big", "12pt", "1.5em"]), ("font", 1, ["courier", "arial"]) ] except: _helper.error("bbcode.__init__()") _helper.error(traceback.format_exc())
def __init__(self,_form,_resulturl=None,_post={},_data="",_helper=class_helper.helper()): try: _helper.print_disclaimer() self.helper = _helper self.stream = None self.random = None self.bbcode = class_bbcode.bbcode(_helper) self.bbcode.create_bbcode_list() self.post = _post self.data = _data self.skip = False self.form = _form self.start_hash = str(hashlib.sha1(str(random.randint(0,10000))).hexdigest()); self.end_hash = str(hashlib.sha1(str(random.randint(0,10000))).hexdigest()); self.random = str(random.randint(11111111,99999999)) #self.helper.verbose(1,self.helper.ansi.BLUE+"Welcome to nazo - the BBCode XSS Vulnerability scanner"+self.helper.ansi.END) except: _helper.error("nazo.__init__()") _helper.error(traceback.format_exc())
import threading, urllib, urllib2, cookielib, re, html5lib, random, hashlib, class_helper, sys, traceback from html5lib import treebuilders, treewalkers from optparse import OptionParser from class_nazo import nazo helper = class_helper.helper() helper.print_nazo() try: _version = "0.1.0" # Option Parser stuff parser = OptionParser() parser.add_option("-V", "--version", help="shows version number", action="store_true", default=False) parser.add_option("-r", "--random", help="randomize BBCode lists", action="store_true", default=False) parser.add_option("-u", "--url", help="form action URL", type="str", action="store", default="") parser.add_option("-d", "--data", help="HTML input name for request",
def __init__(self,_helper=class_helper.helper()): try: self.helper = _helper self.helper.verbose(2,"init BBCode Class") self._supported = 0 self.tag_in_img = False # FORMAT: (tag name, typ, useable, valid data list) # tag - Tag name (b,u,i,...) # typ - # 1: [b][/b] # 2: [b=a][/b] # usable is 1 if tag is recognized # -1 if unsure # list with special valid data self.bbcode_list = [] self.bbcode_list_injection = [] self.bbcodes = [ ("b", 0,[]), ("i", 0,[]), ("u", 0,[]), ("left", 0,[]), ("right", 0,[]), ("center", 0,[]), ("img", 0,["test.png","http://www.asd.com/test.png"]), ("code", 0,[]), ("php", 0,[]), ("html", 0,[]), ("highlight", 0,[]), ("noparse", 0,[]), ("attach", 0,[]), ("bug", 0,[]), ("pgn3", 0,[]), ("email", 0,["*****@*****.**"]), ("url", 0,["test.com","www.test.com","http://www.test.com"]), ("thread", 0,[]), ("post", 0,[]), ("thread", 0,[]), ("video", 0,["6GAD9pmYqXQ","http://www.youtube.com/watch?v=6GAD9pmYqXQ","www.youtube.com/watch?v=6GAD9pmYqXQ"]), ("thread", 0,[]), ("quote", 0,[]), ("pgn2", 0,[]), ("email", 1,["*****@*****.**"]), ("url", 1,["test.com","www.test.com","http://www.test.com"]), ("thread", 1,[]), ("post", 1,[]), ("thread", 1,[]), ("video", 1,["6GAD9pmYqXQ","http://www.youtube.com/watch?v=6GAD9pmYqXQ","www.youtube.com/watch?v=6GAD9pmYqXQ"]), ("thread", 1,[]), ("quote", 1,[]), ("pgn2", 1,[]), ("threadvb", 1,[]), ("wiki", 1,[]), ("color", 1,["green","#ff0000"]), ("size", 1,["+2","big","12pt","1.5em"]), ("font", 1,["courier","arial"]) ] except: _helper.error("bbcode.__init__()") _helper.error(traceback.format_exc())
import threading, urllib, urllib2, cookielib, re, html5lib, random, hashlib, class_helper,sys,traceback from html5lib import treebuilders, treewalkers from optparse import OptionParser from class_nazo import nazo helper = class_helper.helper() helper.print_nazo() try: _version = "0.1.0" # Option Parser stuff parser = OptionParser() parser.add_option("-V", "--version", help="shows version number", action="store_true", default=False) parser.add_option("-r", "--random", help="randomize BBCode lists", action="store_true", default=False) parser.add_option("-u", "--url", help="form action URL", type="str", action="store", default="") parser.add_option("-d", "--data", help="HTML input name for request", type="str", action="store", default=None) parser.add_option("-v", "--verbose", help="set a verbose level", type="int", action="store", default=1) parser.add_option("-e", "--error", help="set a error level", action="store_true", default=False) parser.add_option("-l", "--logfile", help="create a log file", type="str", action="store", default="log") parser.add_option("-p", "--post", help="additional post request variables", type="str", action="store", default=None) (options, args) = parser.parse_args() #print options if options.version == True: helper.print_version(_version) exit(1) #cj = cookielib.CookieJar() #opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))