-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ADD : CLOUDFLARE DUMP IP'S AND PROXIES REQUESTS.
- Loading branch information
1 parent
5c17a8d
commit f3ec7b6
Showing
4 changed files
with
97 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,23 @@ | ||
{ | ||
"base" : { | ||
"host": "synk.io", | ||
"url": "https://snyk.io/", | ||
"endpoint": "website-scanner/", | ||
"scanner": "wp-admin/admin-ajax.php" | ||
"base": { | ||
"statMapper": { | ||
"host": "synk.io", | ||
"url": "https://snyk.io/", | ||
"endpoint": "website-scanner/", | ||
"scanner": "wp-admin/admin-ajax.php" | ||
}, | ||
"cloudFlare": { | ||
"host": "search.censys.io", | ||
"url": "https://search.censys.io", | ||
"endpoint": "/_search", | ||
"scanner": null | ||
}, | ||
"proxies": { | ||
"host": "free-proxy-list.net", | ||
"url": "https://free-proxy-list.net/", | ||
"endpoint": null, | ||
"scanner": null | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import requests | ||
import json | ||
import re | ||
import sys | ||
from regex import CF_PARSE_SUB_AND_DOMAIN,CF_IP | ||
from gen_proxies import proxies_chain | ||
end = '\033[1;0m' | ||
red = '\033[1;91m' | ||
|
||
f = open('../db/vulners.json') | ||
DB_LOAD = json.load(f) | ||
URL = DB_LOAD["base"]["cloudFlare"]["url"]+DB_LOAD["base"]["cloudFlare"]["endpoint"] | ||
|
||
def parse_sub_and_domain(data): | ||
matched = re.findall(CF_PARSE_SUB_AND_DOMAIN,data) | ||
try: | ||
return matched | ||
except Exception as err: | ||
return None | ||
|
||
def parse_ip(data): | ||
matched = re.findall(CF_IP,data) | ||
try: | ||
return matched | ||
except Exception as err: | ||
return None | ||
|
||
def cloud_grap(url,target): | ||
success = False | ||
while not success: | ||
for p in proxies_chain(): | ||
proxy = { | ||
"https": p | ||
} | ||
params = { | ||
"resource":"hosts", | ||
"sort":"RELEVANCE", | ||
"per_page":"25", | ||
"virtual_hosts":"EXCLUDE", | ||
"q":url | ||
} | ||
try: | ||
res = requests.get(url,params=params,timeout=4,proxies=proxy) | ||
if parse_ip(res.text) is not None: | ||
print(parse_ip(res.text)) | ||
if parse_sub_and_domain(res.text) is not None: | ||
success = True | ||
print(parse_sub_and_domain(res.text)) | ||
break | ||
except Exception as error: | ||
print("%sProxy FAIL: %s%s"%(red,p,end)) | ||
|
||
# cloud_grap(URL,"") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import requests | ||
import re | ||
import json | ||
from regex import PROXY_PARSE | ||
|
||
f = open('../db/vulners.json') | ||
DB_LOAD = json.load(f) | ||
URL = DB_LOAD["base"]["proxies"]["url"] | ||
|
||
def get_proxies(): | ||
headers = { | ||
"User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:98.0) Gecko/20100101 Firefox/98.0" | ||
} | ||
res = requests.get(URL,headers=headers) | ||
return res.text | ||
|
||
def proxies_chain(): | ||
proxies = [] | ||
matched = re.findall(PROXY_PARSE,get_proxies()) | ||
for m in matched: | ||
proxies.append(m[0]+":"+m[1]) | ||
return proxies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters