diff --git a/gens-gs.py b/gens-gs.py deleted file mode 100644 index 4976054..0000000 --- a/gens-gs.py +++ /dev/null @@ -1,67 +0,0 @@ -#!/usr/bin/python -import urllib2 -import urllib -import re -import sys -import subprocess -import shlex - -DOMAIN="http://segaretro.org" -URL="%s/Gens/GS"%(DOMAIN) -try: - r=urllib2.urlopen(URL) - html=r.read() -except urllib2.HTTPError, e: - html=e.read() - -# This odd DDOS filter seems to be disabled again -print html -sys.exit() - -jschl_vc_finder = re.compile('(?:.*)(?:.*)', re.DOTALL) -m=jschl_vc_finder.match(html) -if not m: sys.exit() - -jschl_vc=m.group("value") -#print jschl_vc - -jschl_answer_finder = re.compile("(?:.*)\$\('#jschl_answer'\).val\((?P[^)]+)\);(?:.*)", re.DOTALL) -m=jschl_answer_finder.match(html) -if not m: sys.exit() - -jschl_answer=m.group("value") -#print jschl_answer - -jschl_answer=eval("str(int(%s))"%(jschl_answer)) -#print jschl_answer - -formdata = { "act" : "jschl", "jschl_vc": jschl_vc, "jschl_answer" : jschl_answer } -#print formdata -data_encoded = urllib.urlencode(formdata) - -# It is not working with urllib2 -command="/usr/bin/wget -O- %s --post-data '%s'"%(URL,data_encoded) -#command="/usr/bin/curl %s -d '%s' -D-"%(URL,data_encoded) -args = shlex.split(command) -html = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()[0] - -url_finder = re.compile('(?:.*)href="(?P[a-zA-Z0-9/]+Gens-gs-r(?:[\d]+)\.tar\.gz)"(?:.*)', re.DOTALL) -m=url_finder.match(html) -if not m: sys.exit() - -url="%s%s"%(DOMAIN,m.group("URL")) -print "%s"%(url,url) - -""" -print "curl %s -d '%s' -D-"%(URL,data_encoded) -print "wget -O- %s --post-data '%s' | grep Source"%(URL,data_encoded) -try: - txheaders={'User-agent': 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)'} - - req=urllib2.Request(URL,data_encoded,txheaders) - r=urllib2.urlopen(req) - html=r.read() -except urllib2.HTTPError, e: - print e.info() - html=e.read() -""" diff --git a/update.sh b/update.sh index 2b92670..214345c 100644 --- a/update.sh +++ b/update.sh @@ -3,7 +3,6 @@ python frostwire.py > frostwire.html 2> frostwire.log python warsow.py > warsow.html 2> warsow.log python snowstorm.py > snowstorm.html 2> snowstorm.log python wakeonplan.py > wakeonplan.html 2> wakeonplan.log -python gens-gs.py > gens-gs.html 2> gens-gs.log python jag.py > jag.html 2> jag.log python nikki.py > nikki.html 2> nikki.log python legends.py > legends.html 2> legends.log