From efceaa1b78cea56d1e9c691fddbddc40b7357824 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 13 Jun 2014 13:18:21 +0200 Subject: update bgt titlebot --- Reaktor/titlebot/commands/undo | 2 +- Reaktor/titlebot/commands/up | 2 +- Reaktor/titlebot/titlebot.py | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Reaktor/titlebot/commands/undo b/Reaktor/titlebot/commands/undo index a66de67f..e1b0abab 100755 --- a/Reaktor/titlebot/commands/undo +++ b/Reaktor/titlebot/commands/undo @@ -15,7 +15,7 @@ except: print("""usage: undo number (...) undos vote of one or more entries based on .list""") sys.exit(1) -voter = environ['_prefix'] +voter = environ['_prefix'].split("@")[1] voter_name = environ['_from'] for vote in votes: try: diff --git a/Reaktor/titlebot/commands/up b/Reaktor/titlebot/commands/up index 0a48bdb0..7aff5944 100755 --- a/Reaktor/titlebot/commands/up +++ b/Reaktor/titlebot/commands/up @@ -15,7 +15,7 @@ if not votes: upvotes one or more entries based on .list""") sys.exit(1) -voter = environ['_prefix'] +voter = environ['_prefix'].split("@")[1] voter_name =environ['_from'] for vote in votes: try: diff --git a/Reaktor/titlebot/titlebot.py b/Reaktor/titlebot/titlebot.py index c1eac3b0..41717484 100644 --- a/Reaktor/titlebot/titlebot.py +++ b/Reaktor/titlebot/titlebot.py @@ -6,7 +6,7 @@ debug = False # CAVEAT name should not contains regex magic name = 'bgt_titlebot' -workdir = '/tmp/state' +workdir = '/home/titlebot/state' try: mkdir(workdir) @@ -68,7 +68,8 @@ public_commands = [ # identify via direct connect { 'capname': 'identify', 'pattern': '^identify' + '\\s*(?:\\s+(?P.*))?$', - 'argv' : [ 'commands/identify' ]} + 'argv' : [ 'commands/identify' ], + 'env':{'config_filename': config_filename}} ] commands = [ default_command('reload'), -- cgit v1.2.3 From 16cde649f07ea8fe67765237c7d28ab710ddf761 Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 16 Jun 2014 17:01:39 +0200 Subject: update whois for Reaktor --- Reaktor/commands/whois | 4 ++++ 1 file changed, 4 insertions(+) create mode 100755 Reaktor/commands/whois diff --git a/Reaktor/commands/whois b/Reaktor/commands/whois new file mode 100755 index 00000000..ca6ad4d2 --- /dev/null +++ b/Reaktor/commands/whois @@ -0,0 +1,4 @@ +#!/usr/bin/python +(! type whois >/dev/null 2>/dev/null) && echo "whois does not exist" && exit 0 + +whois "${1?usage: $0 domain}" | sed -e '/^$/d' -e '/^%/d' -e '/^Nserver/d' -e 's/^\[.*/---/' -e '/^Changed/d' -e '/^Status/d' -e '/^Type/d' -e '/^PostalCode/d' -e '/^Phone/d' -e '/^Fax/d' -e '/Last update of WHOIS database/Q' -e '/ID:/d' -- cgit v1.2.3 From 12b9b3c3080ded934425f6eda59de26ec6a103eb Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 16 Jun 2014 17:25:08 +0200 Subject: add stolen domain lookup shitz --- Reaktor/commands/taken | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Reaktor/commands/taken diff --git a/Reaktor/commands/taken b/Reaktor/commands/taken new file mode 100644 index 00000000..0b7424ed --- /dev/null +++ b/Reaktor/commands/taken @@ -0,0 +1,28 @@ +#!/bin/sh +#!/bin/bash + +# domainavailable +# Fast, domain name checker to use from the shell +# Use globs for real fun: +# domainavailable blah{1..3}.{com,net,org,co.uk} +# Inspired by foca / giles: +# http://gilesbowkett.blogspot.com/2009/02/simple-bash-domain-availability.html + +trap 'exit 1' INT TERM EXIT + +for d in $@; +do +if host $d | grep "NXDOMAIN" >&/dev/null; then + if whois $d | grep -Ei "(No match|NOT FOUND|Status: free)" >&/dev/null; then + echo "$d available"; + else + if whois $d >&/dev/null;then + echo "$d taken"; + else + echo "$d - whois not available" + fi + fi +else + echo "$d taken"; +fi +done -- cgit v1.2.3 From 438a8a9f99e72dc9c8ccda3f657f9338220f4c41 Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 16 Jun 2014 17:43:20 +0200 Subject: update taken script --- Reaktor/commands/taken | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) mode change 100644 => 100755 Reaktor/commands/taken diff --git a/Reaktor/commands/taken b/Reaktor/commands/taken old mode 100644 new mode 100755 index 0b7424ed..b8beba68 --- a/Reaktor/commands/taken +++ b/Reaktor/commands/taken @@ -8,21 +8,21 @@ # Inspired by foca / giles: # http://gilesbowkett.blogspot.com/2009/02/simple-bash-domain-availability.html -trap 'exit 1' INT TERM EXIT - for d in $@; do -if host $d | grep "NXDOMAIN" >&/dev/null; then - if whois $d | grep -Ei "(No match|NOT FOUND|Status: free)" >&/dev/null; then +if host "$d" | grep "NXDOMAIN" >&/dev/null; then + w=$(whois "$d") + if ! test "$?" -eq 0 ;then + echo "$d - whois not available" + elif echo "$w" | grep -Ei "(No match|NOT FOUND|Status: free)" >&/dev/null; then echo "$d available"; + elif echo "$w"| grep -Ei "(Status: invalid)" >&/dev/null ;then + echo "$d invalid" else - if whois $d >&/dev/null;then - echo "$d taken"; - else - echo "$d - whois not available" - fi + echo "$d taken"; fi else echo "$d taken"; fi done +exit 0 -- cgit v1.2.3 From 7a308fa339fba0059dc48d525498504de0a4bd00 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 18 Jun 2014 10:28:55 +0200 Subject: make ircasy more robust --- Reaktor/IRC/ircasy.py | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/Reaktor/IRC/ircasy.py b/Reaktor/IRC/ircasy.py index 9a7f44f3..99fbc324 100644 --- a/Reaktor/IRC/ircasy.py +++ b/Reaktor/IRC/ircasy.py @@ -89,15 +89,22 @@ class asybot(asychat): self.data += data.decode() except Exception as e: print('error decoding message: ' + str(e)); + print('current data: %s' % self.data); + print('received data: %s' % data); + print('trying to decode as latin1') + self.data += data.decode('latin1') def found_terminator(self): self.log.debug('<< %s' % self.data) message = self.data self.data = '' - - _, prefix, command, params, rest, _ = \ - split('^(?::(\S+)\s)?(\S+)((?:\s[^:]\S*)*)(?:\s:(.*))?$', message) + try: + _, prefix, command, params, rest, _ = \ + split('^(?::(\S+)\s)?(\S+)((?:\s[^:]\S*)*)(?:\s:(.*))?$', message) + except Exception as e: + print("cannot split message :(\nmsg: %s"%message) + return params = params.split(' ')[1:] if command == 'PING': @@ -126,10 +133,13 @@ class asybot(asychat): self.reset_alarm() def push(self, message): - self.log.debug('>> %s' % message) - msg = (message + self.myterminator).encode() - self.log.debug('>> %s' % msg) - asychat.push(self, msg) + try: + self.log.debug('>> %s' % message) + msg = (message + self.myterminator).encode() + self.log.debug('>> %s' % msg) + asychat.push(self, msg) + except: + pass def disconnect(self): self.push('QUIT') -- cgit v1.2.3 From c2a621b04a4f1d854a2586cfe417f2dcab827f3a Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 18 Jun 2014 10:45:41 +0200 Subject: relax anonbox-uri-format check --- util/t/anonbox.net/got-some-valid-looking-email | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/t/anonbox.net/got-some-valid-looking-email b/util/t/anonbox.net/got-some-valid-looking-email index 4c3e7a11..e254687d 100755 --- a/util/t/anonbox.net/got-some-valid-looking-email +++ b/util/t/anonbox.net/got-some-valid-looking-email @@ -12,5 +12,5 @@ anonbox.net >$tempfile } | { IFS=@. read _logname subdomain domain - echo "$uri" | grep -q "^https://$domain/$subdomain/[0-9a-f]*/$" + echo "$uri" | grep -q "^https://$domain/$subdomain/[^/][^/]*/$" } -- cgit v1.2.3 From afb78a011404b3bd7fbeb84c0f0e43d0288dedbd Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 24 Jun 2014 14:53:13 +0200 Subject: update dnsrecon,view-website --- Reaktor/commands/whois | 2 +- Reaktor/repos/dnsrecon | 2 +- Reaktor/repos/view-website | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Reaktor/commands/whois b/Reaktor/commands/whois index ca6ad4d2..b0733891 100755 --- a/Reaktor/commands/whois +++ b/Reaktor/commands/whois @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/bin/sh (! type whois >/dev/null 2>/dev/null) && echo "whois does not exist" && exit 0 whois "${1?usage: $0 domain}" | sed -e '/^$/d' -e '/^%/d' -e '/^Nserver/d' -e 's/^\[.*/---/' -e '/^Changed/d' -e '/^Status/d' -e '/^Type/d' -e '/^PostalCode/d' -e '/^Phone/d' -e '/^Fax/d' -e '/Last update of WHOIS database/Q' -e '/ID:/d' diff --git a/Reaktor/repos/dnsrecon b/Reaktor/repos/dnsrecon index 31de30e4..a6a5a5e7 160000 --- a/Reaktor/repos/dnsrecon +++ b/Reaktor/repos/dnsrecon @@ -1 +1 @@ -Subproject commit 31de30e4f6674585676c841c5612a330c22de948 +Subproject commit a6a5a5e7f6d03cf3430a75d461c76ae0f76cf94f diff --git a/Reaktor/repos/view-website b/Reaktor/repos/view-website index a3892837..f62601b0 160000 --- a/Reaktor/repos/view-website +++ b/Reaktor/repos/view-website @@ -1 +1 @@ -Subproject commit a3892837aabd5d95e997c0fd2526096f685669f4 +Subproject commit f62601b09882efdd273ee2cbf6625734cf1e316a -- cgit v1.2.3