Skip to content

Instantly share code, notes, and snippets.

@zoogie
Last active June 6, 2018 22:17
Show Gist options
  • Save zoogie/45928914b558b2f6436c1307cf49405e to your computer and use it in GitHub Desktop.
Save zoogie/45928914b558b2f6436c1307cf49405e to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
# Compatible with both Python 2 and 3.
from __future__ import print_function
import sys
import time
# import os
import webbrowser
try:
import urllib2
except ImportError:
import urllib.request as urllib2
def download(url):
try:
response = urllib2.urlopen(url)
html = response.read()
if html:
print("Download %s success!" % url)
return html
else:
print("Null download!")
sys.exit(1)
except:
print("Error downloading %s" % url)
sys.exit(1)
with open("movable_part1.sed", "rb") as f:
f.seek(0x10)
id0 = f.read(0x20)
buff = download("https://gist.githubusercontent.com/zoogie/280bb4419d76dece9d1031e8022f5678/raw/")
print(id0)
if id0 not in buff:
print("No evil here!")
time.sleep(3)
sys.exit(0)
else:
print("Thar be evil afoot! Let's kill it!")
time.sleep(5)
webbrowser.open("https://seedhelper.figgyc.uk/cancel/%s?kill=y" % id0)
sys.exit(0)
# response = urllib2.urlopen(url)
# html = response.read()
# print("response: %s" % html)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment