├── 3klector.JPEG
├── 3klector.py
├── README.md
└── requirments.txt
/3klector.JPEG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eslam3kl/3klector/23d2602667f4ac27801d565adafcaed147c7ee15/3klector.JPEG
--------------------------------------------------------------------------------
/3klector.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #coded by eslam akl - eslam3kl
3 |
4 | import requests
5 | import re
6 | from termcolor import colored
7 | import optparse
8 |
9 | print(" ")
10 | print(colored(" ____ _ _ _ ", "red", attrs=['bold']))
11 | print(colored(" (___ \| | | | | | ", "red", attrs=['bold']))
12 | print(colored(" __) | | _| | ___ ___| |_ ___ _ __ ", "red", attrs=['bold']))
13 | print(colored(" (__ <| |/ / |/ _ \/ __| __/ _ \| '__| ", "red", attrs=['bold']))
14 | print(colored(" ___) | <| | __/ (__| || (_) | | ", "red", attrs=['bold']))
15 | print(colored(" (____/|_|\_\_|\___|\___|\__\___/|_| ", "red", attrs=['bold']))
16 | print(" ")
17 | print(colored(" Coded by Eslam Akl ", "yellow", attrs=['bold']))
18 | print(colored(" Blog: https://medium.com/@eslam3kl ", "yellow", attrs=['bold']))
19 | print(colored(" GitHub: https://github.com/eslam3kl ", "yellow", attrs=['bold']))
20 | print(" ")
21 | print(colored("[+] Acquisitions results based on: ", "green", attrs=['bold']) + colored("https://index.co", 'white'))
22 | print(colored("[+] ASN results based on: ", "green", attrs=['bold']) + colored("https://www.ultratools.com", 'white'))
23 | print(colored("[+] Start collecting informations...", "red"))
24 | print(' ')
25 |
26 | #function to get user input
27 | def get_user_input():
28 | parser = optparse.OptionParser()
29 | parser.add_option("-t", "--target", dest="target", help="\tTarget Name (google, microsoft)")
30 | (options, arguments) = parser.parse_args()
31 | if not options.target:
32 | print(colored('\n(-) No target specified, use --help for more info', 'red', attrs=['bold']))
33 | print(colored('(+) Usage: python 3klector.py -t target', 'green', attrs=[]))
34 | print(" ")
35 | raise SystemExit
36 | else:
37 | return options.target
38 |
39 | #function to send request
40 | def send_request(url):
41 | headers = {"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:82.0) Gecko/20100101 Firefox/82.0"}
42 | req = requests.get(url)
43 | return req
44 |
45 |
46 | #function to get company name
47 | def get_company_name(url):
48 | response_code = send_request(url)
49 | content = response_code.content
50 | names = []
51 | companies = re.findall('(?:)(.*?)', content)
52 | for line in companies:
53 | line = line.lower()
54 | if target not in line:
55 | if line not in names:
56 | names.append(line)
57 | return names
58 |
59 | #function to get company date
60 | def get_company_date(url):
61 | response_code = send_request(url)
62 | content = response_code.content
63 | dates = []
64 | date = re.findall('(?:20)(.*?)', content)
65 | for line in date:
66 | dates.append(line)
67 | return dates
68 |
69 | #function to get ASN
70 | def get_company_asn(url):
71 | response_code = send_request(url)
72 | content = response_code.content
73 | asn_result = []
74 | asn_info = []
75 | asn_results = re.findall('(?:
)(.*?)
', content)
76 | asn_information = re.findall('(?:)(.*?)', content)
77 | for line in asn_results:
78 | if line not in asn_results:
79 | asn_results.append(line)
80 | return asn_results
81 |
82 | #function to get asn information country and owner
83 | def get_asn_info(url):
84 | response_code = send_request(url)
85 | content = response_code.content
86 | asn_info = []
87 | asn_information = re.findall('(?:)(.*?)', content)
88 | for line in asn_information:
89 | asn_info.append(line)
90 | return asn_info
91 |
92 | #function to get ip ranges from asn
93 | def get_ip_range(url):
94 | response_code = send_request(url)
95 | content = response_code.content
96 | ip = re.findall('(?:', content)
97 | return ip
98 |
99 | #DATA
100 | target = get_user_input()
101 | target_cap = target.capitalize()
102 | aq_url = "https://index.co/company/" + target +"/acquirees"
103 | asn_url = "https://www.ultratools.com/tools/asnInfoResult?domainName=" + target
104 | asn_info_url = "https://ipinfo.io/"
105 |
106 | #variables
107 | name = get_company_name(aq_url)
108 | date = get_company_date(aq_url)
109 | asn_records = get_company_asn(asn_url)
110 | asn_info = get_asn_info(asn_url)
111 | country = []
112 | owner = []
113 |
114 |
115 | #create country array
116 | for line in range(0,len(asn_info),4):
117 | country.append(asn_info[line])
118 | #create owner array
119 | for line in range(3,len(asn_info)+3,4):
120 | owner.append(asn_info[line])
121 |
122 | #print asn and it's information
123 | print(colored('\n----------------------\n [+] ASN Information\n----------------------', "red", attrs=['bold']))
124 | if asn_records:
125 | for line in range(len(asn_records)):
126 | print(colored("\n(+) ASN number: ", 'red', attrs=['bold']) + colored(asn_records[line], "white", attrs=['bold']))
127 | print(colored("(+) Country: ", 'green', attrs=['bold']) + colored(country[line], "white"))
128 | print(colored("(+) Owner: ", 'green', attrs=['bold']) + colored(owner[line], "white"))
129 | print(colored("(+) For more info: " , "green", attrs=['bold']) + colored(asn_info_url + asn_records[line], "white"))
130 | else:
131 | print(colored(" [-] ", "red", attrs=['bold']) + colored("No ASN found!", "green", attrs=['bold']))
132 | #print acquisitions and its date
133 | print(colored('\n---------------------------\n [+] Comapany acquisitions \n---------------------------', 'red', attrs=['bold']))
134 | if name:
135 | for line in range(len(name)):
136 | print(colored('(+) ', 'green', attrs=['bold']) + colored(name[line], 'white'))
137 | else:
138 | print(colored(" [-] ", 'red', attrs=['bold']) + colored('No Acquisitions found!\n', "green", attrs=['bold']))
139 |
140 |
141 |
142 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Description
2 | 3klector is an automation Recon tool which collecting information about **Acquisitions** and **ASN** which related to Big Scope company in Penetration testing/Bug Hunting process.
3 |
4 |
5 | ## Install
6 | ` pip install -r requirments.txt `
7 |
8 |
9 | ## Usage
10 | ` python 3klector.py -t target `
11 |
12 | For the target should be the comapny name like *google* or *microsoft* or something like that
13 |
14 |
15 | 
16 |
17 |
18 |
19 | ## Website used
20 | > Acquisitions results based on: https://index.co
21 | > ASN results based on: https://www.ultratools.com
22 |
23 | ------------------------------
24 |
25 | ***If you see it helpful be free to share & star & fork <3***
26 |
--------------------------------------------------------------------------------
/requirments.txt:
--------------------------------------------------------------------------------
1 | requests==2.24.0
2 | termcolor==1.1.0
3 | termcolors==0.1.0
4 |
--------------------------------------------------------------------------------