Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# submitter.py
# this was written to solve the "Are you fast enough?" challenge
# By Aleksey
# - github.com/Alekseyyy
# - medium.com/@EpsilonCalculus
import time
from selenium.webdriver import Firefox
from selenium.webdriver.firefox.options import Options
from selenium.webdriver.common.keys import Keys
# Configure the browser
options = Options()
options.set_headless()
assert options.headless
my_browser = Firefox(options=options)
my_browser.get("http://timesink.be/speedy/index.php")
# Get the random string
the_key = my_browser.find_element_by_id("rndstring")
the_key = the_key.text
# Submit the random string
submission = my_browser.find_element_by_id("inputfield")
submission.send_keys(the_key)
submission.send_keys(Keys.ENTER)
time.sleep(0.5)
# Display the flag
src = my_browser.page_source
flag = src[src.find("{") + 1 : src.find("}")]
print("brixelCTF{" + flag + "}")
# crawl_simulate.py
# this was written to solve the "Browsercheck" challenge
# By Aleksey
# - github.com/Alekseyyy
# - medium.com/@EpsilonCalculus
# this is what I'm ripping off...
# - https://stackoverflow.com/questions/24226781/changing-user-agent-in-python-3-for-urrlib-request-urlopen
# - https://ourcodeworld.com/articles/read/812/how-to-create-an-html-file-viewer-with-wxpython
import wx
from wx import html
from urllib import request
class MyHTMLFrame(wx.Frame):
def __init__(self, parent, title, haxedpage):
wx.Frame.__init__(
self,
parent,
-1,
title,
size = (600, 400)
)
thisHtml = html.HtmlWindow(self)
if "gtk2" in wx.PlatformInfo:
html.SetStandardFonts()
thisHtml.SetPage(haxedpage)
my_request = request.Request(
url="http://timesink.be/browsercheck/",
data = None,
headers = {
"User-Agent": "Mozilla/5.0 (compatible; Ask Jeeves/Teoma; +http://about.ask.com/en/docs/about/webmasters.shtml)"
}
)
page = request.urlopen(my_request)
page = page.read().decode()
renderer = wx.App()
renderedPage = MyHTMLFrame(None, "EntropyThot Rulz :D", page)
renderedPage.Show()
renderer.MainLoop()
# implementation.py
# this was written to solve the "Keep walking..." challenge
# By Aleksey
# - github.com/Alekseyyy
# - medium.com/@EpsilonCalculus
x, y, p = 1, 1, 1
a = None
while x <= 525:
a = x * y + p + 3
p = a
x += 1
y += 1
print("brixelCTF{" + str(a) + "}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment