Skip to content

Commit b33e321

Browse files
authored
Create oxlite
1 parent 805a210 commit b33e321

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

Diff for: oxlite/oxlite

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/usr/bin/env python3
2+
3+
import sys
4+
import argparse
5+
import requests
6+
7+
class oxlite:
8+
def __init__(self,args):
9+
self.google = f"https://www.google.com/search?q={args.query}&hl=en"
10+
self.api = f"https://api.hackertarget.com/pagelinks/?q={self.google}"
11+
self.resp = requests.get(self.api).text
12+
13+
def on_connection(self):
14+
if args.output:
15+
self.output()
16+
print(self.resp + "\n")
17+
18+
def output(self):
19+
with open(f"{args.output}", "w") as file:
20+
file.write(self.resp)
21+
22+
23+
parser = argparse.ArgumentParser(description=f"0xDork Lite: Lite version of 0xdork developed by rly0nheart. https://github.com/rlyonheart")
24+
parser.add_argument("query", help="search query")
25+
parser.add_argument("-o","--outfile",help="output filename",dest="output", metavar="FILENAME")
26+
args = parser.parse_args()
27+
28+
if __name__ == "__main__":
29+
while True:
30+
try:
31+
oxlite(args).on_connection()
32+
break
33+
except KeyboardInterrupt:
34+
sys.exit()
35+
except Exception as e:
36+
print(f"An error occured: {e}")
37+
print("Retrying...")

0 commit comments

Comments
 (0)