github twitter facebook email
Xss Bot
Jul 7, 2019
One minute read
# bot.py

from selenium import webdriver
import sys

flag = sys.argv[1]
url = 'asdf'

options = webdriver.ChromeOptions()
options.add_argument('headless')
options.add_argument('window-size=1920x1080')
options.add_argument('disable-gpu')
options.add_argument('--disable-xss-auditor')

driver = webdriver.Chrome('chromedriver', chrome_options=options)
driver.get(url + '9999999')
driver.add_cookie({'name': 'flag', 'value' : flag, 'path' : '/'})
driver.get(url + str(sys.argv[2]))
driver.quit()

# runner.py

import os
from time import sleep
import requests
flag = open('/flag', 'r').read()
flag = flag.replace('\n','')
max = 1

while 1:
    maxF = 1# Case by case
    tmp  = int(maxF)
    print '-'*50
    print '%d ~ %d' % (max, tmp)
    for i in range(max, tmp+1):
        print '%d' % i
        os.system('timeout 3 python bot.py ' + flag + ' ' + str(i))
    
    max = tmp+1
    print 'Sleep..'
    sleep(180)


Back to posts


comments powered by Disqus