Ejemplo n.º 1
0
def xxs2(exploi):
    print(Fore.RED + " Testing:", host + exploi)
    try:
        if xi != 0:
            handle = urllib2.Handler({'http': 'http://' + '/'})
            opene = urllib2.build_opener(host + exploit, handle)
            sourc = opene.open(host + exploit).read()
        else:
            sourc = myopener.open(host + exploi).read()
            print(" Source Length:", len(sourc))
            ##Detecting WAF if Exist
            if res1.code == 406:
                print(" WAF Detected => (Mod_Security)")
            elif res1.code == 999:
                print(" WAF Detected => WebKnight")
                time.sleep(5)
            elif res1.code == 419:
                print(" WAF Detected => F5 BIG IP")
            else:
                print("\033[1;32m WAF Not Found\033[1;m")
        if re.search("xss", sourc.lower()) != None:
            print(Fore.RED + "\n[!] XSS:", host + exploi, "\n")

        else:
            print(Fore.GREEN + "[-] Not Vulnerable.")
    except (urllib2.HTTPError) as msg:
        print("[-] Error:", msg)
        pass
Ejemplo n.º 2
0
def xss(exploit):
    for link in links:
        print Fore.RED + "Testing:",link[0]+exploit
        try:
            if xi != 0:
                handler = urllib2.Handler({'http': 'http://' + '/'})
                opener = urllib2.build_opener(link[0]+exploit, handler)
                source = opener.open(link[0]+exploit).read()
            else:
                source = myopener.open(link[0]+exploit).read()
                print "Source Length:",len(source)
            if re.search("xss", source.lower()) != None:
                print Fore.RED + "\n[!] XSS:",link[0]+exploit,"\n"
            else:
                print Fore.GREEN + "[-] Not Vulnerable." 
        except(urllib2.HTTPError), msg:
            print "[-] Error:",msg
            pass
Ejemplo n.º 3
0
 def semi():
     z = v2.get()
     host = v1.get()
     payload = z
     xi = testcon()
     x = ''
     for i in payload:
         x += "&#x" + hex(ord(i))[2:] + ";"
     encoded = urllib2.quote(payload.encode("utf8"))
     en4 = host + x
     finden1 = Label(top2, text=" %s " % en4)
     finden1.place(relx=0.5, rely=0.5, anchor='center')
     if xi != 0:
         handler = urllib2.Handler({'http': 'http://' + '/'})
         opener = urllib2.build_opener(en1, handler)
         source = opener.open(en4).read()
     else:
         source = myopener.open(en4).read()
         findsource = Label(top2,
                            text=" Source Length:" + str(len(source)),
                            fg='#FF0000')
         findsource.place(relx=0.5, rely=0.5, anchor='center')
     if re.search("xss", source.lower()) != None:
         findxss = Label(top2, text=" [!]XSS:" + str(en4), fg='#FF0000')
         findxss.place(relx=0.5, rely=0.6, anchor='center')
         #print Fore.RED + "\n [!]XSS:",en1,"\n"
     else:
         findxss = Label(top2, text=" [-] Not Vulnerable.", fg='#FF0000')
         findxss.place(relx=0.5, rely=0.6, anchor='center')
         #print ""
         #print Fore.GREEN + " [-] Not Vulnerable."
     mam1 = myopener.open(en4).read()
     if z in mam1:
         findcon = Label(
             top2,
             text=" [+] Confirmed Payload Found in Web Page Code",
             fg='#FF0000')
         findcon.place(relx=0.5, rely=0.7, anchor='center')
         #print ""
         #print Fore.YELLOW + " [+] Confirmed Payload Found in Web Page Code"
         #print ""
     else:
         findcon = Label(top2, text=" [-] False Positive", fg='#FF0000')
         findcon.place(relx=0.5, rely=0.7, anchor='center')
Ejemplo n.º 4
0
 def b64():
     z = v2.get()
     host = v1.get()
     payload = z
     #xi = testcon()
     xi = 1
     encoded = base64.standard_b64encode(payload)
     en1 = host + encoded
     finden1 = Label(top2, text=" %s " % en1)
     finden1.place(relx=0.5, rely=0.5, anchor='center')
     if xi != 0:
         handler = urllib2.Handler({'http': 'http://' + '/'})
         opener = urllib2.build_opener(en1, handler)
         source = opener.open(en1).read()
     else:
         source = myopener.open(en1).read()
         findsource = Label(top2,
                            text=" Source Length:" + str(len(source)),
                            fg='#FF0000')
         findsource.place(relx=0.5, rely=0.5, anchor='center')
     if re.search("xss", source.lower()) != None:
         findxss = Label(top2, text=" [!]XSS:" + str(en1), fg='#FF0000')
         findxss.place(relx=0.5, rely=0.6, anchor='center')
         #print Fore.RED + "\n [!]XSS:",en1,"\n"
     else:
         findxss = Label(top2, text=" [-] Not Vulnerable.", fg='#FF0000')
         findxss.place(relx=0.5, rely=0.6, anchor='center')
         #print ""
         #print Fore.GREEN + " [-] Not Vulnerable."
     mam1 = myopener.open(en1).read()
     if z in mam1:
         findcon = Label(
             top2,
             text=" [+] Confirmed Payload Found in Web Page Code",
             fg='#FF0000')
         findcon.place(relx=0.5, rely=0.7, anchor='center')
         #print ""
         #print Fore.YELLOW + " [+] Confirmed Payload Found in Web Page Code"
         #print ""
     else:
         findcon = Label(top2, text=" [-] False Positive", fg='#FF0000')
         findcon.place(relx=0.5, rely=0.7, anchor='center')
Ejemplo n.º 5
0
    print (" 4. HTML Entities")
    print (" 5. Hex With Semi Coloumns")
    print (" 6. Non Encode")
    print ""
    choose = raw_input(" Choose your Encode ")
    choose = int(choose)
#Encode Payload use of Base64#
    if choose == 1:
        print""
        encoded = base64.standard_b64encode(payload)
        print ' ################## B64 String #######################'
        print ''
        en1 = host + encoded
        print en1
        if xi != 0:
            handler = urllib2.Handler({'http': 'http://' + '/'})
            opener = urllib2.build_opener(en1, handler)
            source = opener.open(en1).read()
        else:
            source = myopener.open(en1).read()
            print " Source Length:",len(source)
        if re.search("xss", source.lower()) != None:
            print Fore.RED + "\n [!]XSS:",en1,"\n"
        else:
            print ""
            print Fore.GREEN + " [-] Not Vulnerable."
        mam1 = myopener.open(en1).read()
        if z in mam1:
            print ""
            print Fore.YELLOW + " [+] Confirmed Payload Found in Web Page Code"
            print ""