From 397208108aebe171abded46aa4892aa32e6ff41d Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 14 Nov 2011 03:33:19 +0100 Subject: //too_old: add script to fetch 28C3 tickets --- too_old/mechanize_tickets.py | 53 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 too_old/mechanize_tickets.py diff --git a/too_old/mechanize_tickets.py b/too_old/mechanize_tickets.py new file mode 100644 index 00000000..1f12a996 --- /dev/null +++ b/too_old/mechanize_tickets.py @@ -0,0 +1,53 @@ +#!/usr/bin/python +import mechanize +import cookielib +import time,sys +USERNAME = 'momo' +PASSWORD = '' + + +def main(): + try: + br = init_browser() + while not do_login(br): + print ("Could Not Login, retrying!") + while not fetch_ticket(br): + time.sleep(0.2) + print ("Could not fetch ticket, retrying!") + except Exception,e: + print ("Caught Exception: %s" % str(e)) + exit (1) + print ("We won? yay") + exit(0) + +def init_browser(): + br = mechanize.Browser() + br.open("https://presale.events.ccc.de/order") + cj = cookielib.LWPCookieJar() + br.set_cookiejar(cj) + br.addheaders = [('User-agent', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071615 Fedora/3.0.1-1.fc9 Firefox/3.0.1')] + return br +def do_login(br): + br.select_form(nr=0) + br.form['account[username]'] = USERNAME + br.form['account[password]'] = PASSWORD + br.submit() + ret = br.response().read() + if 'Signed in successfully.' in ret: + if not "Confirm Order" in ret: + print("Something else is wrong, cannot find 'Confirm Order' button!") + raise Exception("Cannot find Confirm Order button") + return True + else: return False + +def fetch_ticket(br): + br.select_form(nr=0) + br.submit() + ret = br.response().read() + if not 'There are currently not enough tickets available.' in ret: + print ("we won? Better sleep some time to be sure") + return True + else: return False + +if __name__ == "__main__": + main() -- cgit v1.2.3 From 9d7c537fd978f4848480b189ddb21f3b44eedec0 Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 14 Nov 2011 03:34:18 +0100 Subject: //census: update Readme --- census/README.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/census/README.md b/census/README.md index e45d39c1..2842368d 100644 --- a/census/README.md +++ b/census/README.md @@ -1,13 +1,23 @@ -ARPING Users +Census (formerly known as ARPING Users) ========== This is a simplified python script which checks the available subnet for computers online and returns a list of users which are online based on their mac-address +The initial idea was to find known users in the given network, now it finds and stores everyone in the given network and might try to resolve these addresses into names. This is why the name `census` is coined for the project. -arping_users.py: - call `python arping_users.py v` for verbose output -> print all discovered hosts +Return Data +---------- +after trying to reach all hosts in the selected subnets the script spits out th e following data: +
+    { "timestamp" : 12345678, "data" : { "ip1" : ["mac1","mac2","macn"] } 
+
+ +Census is meant to be put into a cronjob or some kind of wrapper scripts as it is currently really really (2-3 minutes) slow. SNMPWALK Command =============== +For historic reasons, this is the snmpwalk command to pull the currently registered mac-addresses on the firewall: +
 snmpwalk -c shammunity 10.42.0.1 1.3.6.1.2.1.3.1.1.2
+
-- cgit v1.2.3 From 1f61333b2ae21ccb985e7321f07c2c5c94eb8a4c Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 14 Nov 2011 03:36:31 +0100 Subject: //cholerab/news/Candidate: add 28c3 ticket fetcher --- cholerab/news/Candidate | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cholerab/news/Candidate b/cholerab/news/Candidate index 31d2c670..00c64361 100644 --- a/cholerab/news/Candidate +++ b/cholerab/news/Candidate @@ -100,8 +100,14 @@ Nachdem Gedaechnistausch von Fuerkrebs und Urkrebs hat es ja wie beschrieben die Der Graphengenerator fuer KD;RP (siehe [ɐ]ist ueberarbeitet worden und bietet seit dem 2011-10-23 die moeglichkeit Statistiken zu dem Netzwerk und einzelnen Nodes auszugeben. Hervorzuheben ist hierbei die funktionalitaet die Availability von Nodes zu beschreiben, also wie wahrscheinlich es ist einen Knoten X zu einem Zeitpunkt Y im Darknet anzutreffen. Zusaetzlich wurde die Stats-generator engine ueberarbeitet und laeuft nun besonders bei grossen /var/log/syslog files schneller [⠣]. +## TODO 10. Ticket-fetcher fuer den 28C2 + +Da die 28C3 Presales Tickets rar sind und Leute anfangen das einkaufen zu automatisieren kann nicht auf das glueck des tuechtigen gehofft werden, sondern auch fuer den shack wird automatisiert. Herausgekommen ist ein Skript[Բ] (basierend auf einem anderen Skript[в] welches aber zu hart gesuckt hat) welches sich auf der Presales seite einloggt und dort den "Confirm Order" button drueckt. Das ganze wird in eine ELoop gepackt und den Tickets steht nun nichts mehr im wege. Gebaut wurde das Skript in der nacht am 14.November (T-10H) bis zur naechsten Presales Runde fuer den 28C3. + [⠣] https://github.com/krebscode/painload/commit/822c43a763aa61c1accce3768090d066048faaff [⌅] man dd +[в] http://pastebin.com/SRwtNwKS [Ȳ] http://shackspace.de/wiki/doku.php?id=project:krebs#fuerkrebs +[Բ] https://github.com/krebscode/painload/blob/master/too_old/mechanize_tickets.py [Ƀ] https://github.com/krebscode/painload/tree/master/census [ɐ] http://euer.krebsco.de/graphs/retiolum/retiolum_1.svg -- cgit v1.2.3