-
Notifications
You must be signed in to change notification settings - Fork 204
Expand file tree
/
Copy pathLaragang.py
More file actions
74 lines (60 loc) · 3.1 KB
/
Laragang.py
File metadata and controls
74 lines (60 loc) · 3.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
import requests
from shodan import Shodan
import json
api = Shodan("shodan-key")
keyword = input("Open Keyword List : ")
output = open("ip.txt", "a")
def banner():
print(
"██╗░░░██╗██╗░░░░░████████╗██╗███╗░░░███╗░█████╗░████████╗███████╗██████╗░░█████╗░████████╗"
)
print(
"██║░░░██║██║░░░░░╚══██╔══╝██║████╗░████║██╔══██╗╚══██╔══╝██╔════╝██╔══██╗██╔══██╗╚══██╔══╝"
)
print(
"██║░░░██║██║░░░░░░░░██║░░░██║██╔████╔██║███████║░░░██║░░░█████╗░░██████╦╝██║░░██║░░░██║░░░"
)
print(
"██║░░░██║██║░░░░░░░░██║░░░██║██║╚██╔╝██║██╔══██║░░░██║░░░██╔══╝░░██╔══██╗██║░░██║░░░██║░░░"
)
print(
"╚██████╔╝███████╗░░░██║░░░██║██║░╚═╝░██║██║░░██║░░░██║░░░███████╗██████╦╝╚█████╔╝░░░██║░░░"
)
print(
"░╚═════╝░╚══════╝░░░╚═╝░░░╚═╝╚═╝░░░░░╚═╝╚═╝░░╚═╝░░░╚═╝░░░╚══════╝╚═════╝░░╚════╝░░░░╚═╝░░░"
)
def shodans():
with open(keyword, "r") as list_file:
for line in list_file:
word = line.strip()
results = api.search(word)
for result in results["matches"]:
ip = format(result["ip_str"]) + "\n"
print(ip)
output.write(ip)
def spyse():
with open(keyword, "r") as list_file:
for line in list_file:
word = line.strip()
headers = {
"accept": "application/json",
"Authorization": "Bearer 55f8ebe6-536f-4b59-863b-30627233bb69",
"Content-Type": "application/json",
}
data = (
'{"limit":100,"offset":0,"search_params":[],"query":"\\"'
+ word
+ '\\""}'
)
url = "https://api.spyse.com/v4/data/ip/search"
reqs = requests.post(url, headers=headers, data=data)
result = reqs.json()
count = 0
while count <= 100:
data = result["data"]["items"][count]["ip"]
print(data)
output.write(data + "\n")
count = count + 1
banner()
shodans()
spyse()