Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
# -*- coding: utf-8 -*-
import vueScanForm
from selenium import webdriver
def detect(url, payloads, cookie = {}, localStorage = {}):
f = open("database\\xssLogo.txt", 'r')
xssLogo = f.read()
f.close()
print(xssLogo)
print("VueXssDetect: loading...")
option = webdriver.ChromeOptions()
option.add_argument('headless')
driver = webdriver.Chrome(options = option)
driver.get(url)
if localStorage:
for eachKey in localStorage.keys():
driver.execute_script("localStorage.setItem('%s', '%s')" % (eachKey, localStorage[eachKey]))
driver.refresh()
params = vueScanForm.vueGetParams(url, cookie, localStorage)
areas = []
for each in params:
if 'name' in each:
try:
areas.append(driver.find_element_by_id(each['name']))
except:
pass
elif 'id' in each:
try:
areas.append(driver.find_element_by_name(each['id']))
except:
continue
buttonName = input("Please give me the submit button's tag:")
contents = driver.find_elements_by_class_name("v-btn__content")
submitButton = None
for eachContent in contents:
if eachContent.text == buttonName:
submitButton = eachContent.find_element_by_xpath('..')
break
for area in areas:
for payload in payloads:
area.clear()
area.send_keys(payload)
submitButton.click()