From 14eea1de9f193d8e31e8381ea12d34703d6d5ad3 Mon Sep 17 00:00:00 2001 From: EUcancER Date: Wed, 18 Apr 2012 11:16:21 +0200 Subject: Reaktor: add revip command --- Reaktor/commands/revip | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100755 Reaktor/commands/revip (limited to 'Reaktor/commands') diff --git a/Reaktor/commands/revip b/Reaktor/commands/revip new file mode 100755 index 00000000..1d20037d --- /dev/null +++ b/Reaktor/commands/revip @@ -0,0 +1,46 @@ +#!/usr/bin/python +# fork from darkb0t v0.4 +# modularized and extended +import sys +import os +import json +import socket +import httplib +try: + target = sys.argv[1] +except: + print "Usage: %s [target]" % sys.argv[0] + exit(0) + +print "Reverse IP Search" +print "Target: ",target +try: + hostname,aliases,ip = socket.gethostbyaddr(target) +except: + print "Cannot resolve `%s`!" % target + exit (1) +print "IP: ",ip[0] +sites = {target : "", hostname : ""} # make entries unique +for a in aliases: + sites[a] = "" +offset = 0 +appid = os.environ.get("BING_APPID",'7A0B8DA3E913BE5ECB4AF11C7BC398B43000DC1C') +while offset < 50: + url ="/json.aspx?AppId=%s&Query=ip:%s&Sources=Web+RelatedSearch+News+Image+Video&Version=2.2&Market=en-us&Web.Count=50&Web.Offset=%s&Web.Options=DisableQueryAlterations" % (appid, ip, offset) + conn = httplib.HTTPConnection("api.bing.net") + conn.request("GET", url) + res = conn.getresponse() + doc = json.load(res) + try: + results = doc["SearchResponse"]["Web"]["Results"] + conn.close() + for res in results: + sites[res['DisplayUrl']] = "" + offset += 50 + except: + break +print "Total: ", len(sites), " dns name(s)\n" +num = 1 +for s in sites: + print "["+str(num)+"/"+str(len(sites))+"] : "+s + num += 1 -- cgit v1.2.3 From 2a739377f53d7e7f9000683eff00ed40f56b14aa Mon Sep 17 00:00:00 2001 From: EUcancER Date: Wed, 18 Apr 2012 11:28:20 +0200 Subject: fix url parser --- Reaktor/commands/revip | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Reaktor/commands') diff --git a/Reaktor/commands/revip b/Reaktor/commands/revip index 1d20037d..b4920f52 100755 --- a/Reaktor/commands/revip +++ b/Reaktor/commands/revip @@ -6,6 +6,7 @@ import os import json import socket import httplib +from urlparse import urlparse try: target = sys.argv[1] except: @@ -25,7 +26,7 @@ for a in aliases: sites[a] = "" offset = 0 appid = os.environ.get("BING_APPID",'7A0B8DA3E913BE5ECB4AF11C7BC398B43000DC1C') -while offset < 50: +while offset < 300: url ="/json.aspx?AppId=%s&Query=ip:%s&Sources=Web+RelatedSearch+News+Image+Video&Version=2.2&Market=en-us&Web.Count=50&Web.Offset=%s&Web.Options=DisableQueryAlterations" % (appid, ip, offset) conn = httplib.HTTPConnection("api.bing.net") conn.request("GET", url) @@ -35,7 +36,7 @@ while offset < 50: results = doc["SearchResponse"]["Web"]["Results"] conn.close() for res in results: - sites[res['DisplayUrl']] = "" + sites[urlparse(res['Url'])[1]] = "" offset += 50 except: break -- cgit v1.2.3 From 4d756ac98601b17be326882207e42f842e23cacc Mon Sep 17 00:00:00 2001 From: EUcancER Date: Wed, 18 Apr 2012 23:16:39 +0200 Subject: Reaktor: cleanup --- Reaktor/commands/revip | 48 +-------------------------------------------- Reaktor/commands/subdomains | 1 + 2 files changed, 2 insertions(+), 47 deletions(-) mode change 100755 => 120000 Reaktor/commands/revip create mode 120000 Reaktor/commands/subdomains (limited to 'Reaktor/commands') diff --git a/Reaktor/commands/revip b/Reaktor/commands/revip deleted file mode 100755 index b4920f52..00000000 --- a/Reaktor/commands/revip +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/python -# fork from darkb0t v0.4 -# modularized and extended -import sys -import os -import json -import socket -import httplib -from urlparse import urlparse -try: - target = sys.argv[1] -except: - print "Usage: %s [target]" % sys.argv[0] - exit(0) - -print "Reverse IP Search" -print "Target: ",target -try: - hostname,aliases,ip = socket.gethostbyaddr(target) -except: - print "Cannot resolve `%s`!" % target - exit (1) -print "IP: ",ip[0] -sites = {target : "", hostname : ""} # make entries unique -for a in aliases: - sites[a] = "" -offset = 0 -appid = os.environ.get("BING_APPID",'7A0B8DA3E913BE5ECB4AF11C7BC398B43000DC1C') -while offset < 300: - url ="/json.aspx?AppId=%s&Query=ip:%s&Sources=Web+RelatedSearch+News+Image+Video&Version=2.2&Market=en-us&Web.Count=50&Web.Offset=%s&Web.Options=DisableQueryAlterations" % (appid, ip, offset) - conn = httplib.HTTPConnection("api.bing.net") - conn.request("GET", url) - res = conn.getresponse() - doc = json.load(res) - try: - results = doc["SearchResponse"]["Web"]["Results"] - conn.close() - for res in results: - sites[urlparse(res['Url'])[1]] = "" - offset += 50 - except: - break -print "Total: ", len(sites), " dns name(s)\n" -num = 1 -for s in sites: - print "["+str(num)+"/"+str(len(sites))+"] : "+s - num += 1 diff --git a/Reaktor/commands/revip b/Reaktor/commands/revip new file mode 120000 index 00000000..e2c3b7ab --- /dev/null +++ b/Reaktor/commands/revip @@ -0,0 +1 @@ +../repos/revip/revip \ No newline at end of file diff --git a/Reaktor/commands/subdomains b/Reaktor/commands/subdomains new file mode 120000 index 00000000..0489555f --- /dev/null +++ b/Reaktor/commands/subdomains @@ -0,0 +1 @@ +../repos/consolidate_dns/index \ No newline at end of file -- cgit v1.2.3 From f24f22f9d23ba525663a85ccfe5194b70e2f2364 Mon Sep 17 00:00:00 2001 From: EUcancER Date: Wed, 2 May 2012 13:57:21 +0200 Subject: Reaktor: add whatweb, update build process --- Reaktor/commands/whatweb | 5 +++++ 1 file changed, 5 insertions(+) create mode 100755 Reaktor/commands/whatweb (limited to 'Reaktor/commands') diff --git a/Reaktor/commands/whatweb b/Reaktor/commands/whatweb new file mode 100755 index 00000000..1c1d7791 --- /dev/null +++ b/Reaktor/commands/whatweb @@ -0,0 +1,5 @@ +#!/bin/sh +#wrapper for WhatWeb +whatweb_bin='../repos/whatweb/whatweb' +[ -e "$whatweb_bin" ] || ( echo "Whatweb app does not exist" && exit 1 ) +$whatweb_bin "$1" -- cgit v1.2.3 From fd50c8c919b53d7237179970224608c34075a12d Mon Sep 17 00:00:00 2001 From: EUcancER Date: Wed, 2 May 2012 14:06:26 +0200 Subject: fix whatweb wrapper --- Reaktor/commands/whatweb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Reaktor/commands') diff --git a/Reaktor/commands/whatweb b/Reaktor/commands/whatweb index 1c1d7791..c9aab295 100755 --- a/Reaktor/commands/whatweb +++ b/Reaktor/commands/whatweb @@ -1,5 +1,7 @@ #!/bin/sh #wrapper for WhatWeb -whatweb_bin='../repos/whatweb/whatweb' -[ -e "$whatweb_bin" ] || ( echo "Whatweb app does not exist" && exit 1 ) +here=$(dirname `readlink -f $0`) +whatweb_bin="$here/../repos/whatweb/whatweb" +[ -e "$whatweb_bin" ] || ( echo "!! Whatweb app does not exist" && exit 1 ) +[ "balls$1" = "balls" ] && ( echo "!! no host given" && exit 1) $whatweb_bin "$1" -- cgit v1.2.3 From 314224da2ce24cf74151726c2d038fc490bb97d9 Mon Sep 17 00:00:00 2001 From: EUcancER Date: Wed, 2 May 2012 14:44:38 +0200 Subject: Reaktor: whatweb add aggressive parameter to call --- Reaktor/commands/whatweb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Reaktor/commands') diff --git a/Reaktor/commands/whatweb b/Reaktor/commands/whatweb index c9aab295..84130d5c 100755 --- a/Reaktor/commands/whatweb +++ b/Reaktor/commands/whatweb @@ -4,4 +4,4 @@ here=$(dirname `readlink -f $0`) whatweb_bin="$here/../repos/whatweb/whatweb" [ -e "$whatweb_bin" ] || ( echo "!! Whatweb app does not exist" && exit 1 ) [ "balls$1" = "balls" ] && ( echo "!! no host given" && exit 1) -$whatweb_bin "$1" +exec $whatweb_bin -a 3 "$1" -- cgit v1.2.3