Last active
February 17, 2022 21:11
-
-
Save Alekseyyy/1b61202d341919d38472c27c3e6faa38 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 + "}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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