- Daftar
- 4 Oct 1988
- Post
- ★
- Like diterima
- 9.148
Cuma mau nanya ada yg punya robot.txt nya admin finder gak ..
Kalo ada saya boleh niru .saya bikin ini untuk saya jobdesk di github tp blm bisa dr kmrn ..
Mohon bantuannya kalo ada :
Terimakasih..
Code panel .py
Kalo ada saya boleh niru .saya bikin ini untuk saya jobdesk di github tp blm bisa dr kmrn ..
Mohon bantuannya kalo ada :
Terimakasih..
Code panel .py
Code:
# -*- coding: utf-8 -*-
Alpha version
3 years ago
2
#!/usr/bin/env python3
Create admin-finder.py
4 years ago
3
Alpha version
3 years ago
4
import argparse
rewritten from scratch, working but WIP
17 months ago
5
import queue
Added event waiter, which waits for 2 or more events
3 years ago
6
rewritten from scratch, working but WIP
17 months ago
7
from lib.log import setupLogger
8
from lib.wordlist import WordListGenerator
9
from lib.worker import WorkerThread
10
from lib.connection import URLFormatter
11
from lib.connection import RobotHandler
Added event waiter, which waits for 2 or more events
3 years ago
12
13
rewritten from scratch, working but WIP
17 months ago
14
def main():
15
"""
16
A function to parse the command argument
17
And control the main program
18
"""
Alpha version
3 years ago
19
rewritten from scratch, working but WIP
17 months ago
20
logger = setupLogger()
21
parser = argparse.ArgumentParser(prog="admin-finder.py", description="Admin panel finder")
http base auth added (#10)
9 months ago
22
parser.add_argument("-u", "--url", help="Target url/website")
23
parser.add_argument("-w", "--wordlist", help="Wordlist to use, default 'wordlist.txt'")
rewritten from scratch, working but WIP
17 months ago
24
parser.add_argument("-t", "--threadcount", help="Number of threads to use")
http base auth added (#10)
9 months ago
25
parser.add_argument("-c", "--credentials", help="Basic http authentication credentials user:pass format")
Create admin-finder.py
4 years ago
26
rewritten from scratch, working but WIP
17 months ago
27
args = parser.parse_args()
Alpha version
3 years ago
28
rewritten from scratch, working but WIP
17 months ago
29
if args.url is None:
30
parser.print_help()
admin-finder.py: fixed the typo in help message
9 months ago
31
print("[-] -u URL paremeter required")
rewritten from scratch, working but WIP
17 months ago
32
exit()
Alpha version
3 years ago
33
rewritten from scratch, working but WIP
17 months ago
34
if args.threadcount is not None:
35
if not args.threadcount.isdigit():
36
print("[-] Process count parameter needs to be digit")
Merge PR#8
11 months ago
37
exit()
rewritten from scratch, working but WIP
17 months ago
38
else:
39
args.threadcount = 20
Alpha version
3 years ago
40
rewritten from scratch, working but WIP
17 months ago
41
if args.wordlist is None:
42
args.wordlist = "wordlist.txt"
43
args.url = URLFormatter(args.url).geturl()
admin-finder.py: fixed the typo in help message
9 months ago
44
http base auth added (#10)
9 months ago
45
if args.credentials:
46
if ":" not in args.credentials:
47
print("[!] Error: credential need to be in this format user:pass")
48
exit()
49
args.credentials = args.credentials.split(":")
admin-finder.py: fixed the typo in help message
9 months ago
50
http base auth added (#10)
9 months ago
51
robot_handler = RobotHandler(args.url, args.credentials)
admin-finder.py: added robot result print
14 months ago
52
result = robot_handler.scan()
Alpha version
3 years ago
53
admin-finder.py: added robot result print
14 months ago
54
if result:
55
logger.info("Detected keywords in robot file")
56
print("-" * 30)
57
print("\n".join(result))
58
print("-" * 30)
59
print("Would you like to continue scanning?")
60
choice = input("[y]/n: ")
61
if choice == "n":
62
exit()
Alpha version
3 years ago
63
rewritten from scratch, working but WIP
17 months ago
64
try:
65
workQueue = queue.Queue()
66
workerPool = []
Merge PR#8
11 months ago
67
for _ in range(int(args.threadcount)):
http base auth added (#10)
9 months ago
68
thread = WorkerThread(workQueue, args.credentials)
rewritten from scratch, working but WIP
17 months ago
69
thread.daemon = True
70
thread.start()
71
workerPool.append(thread)
Added event waiter, which waits for 2 or more events
3 years ago
72
rewritten from scratch, working but WIP
17 months ago
73
for url in WordListGenerator(args.url, filename=args.wordlist):
74
workQueue.put(url)
Added event waiter, which waits for 2 or more events
3 years ago
75
rewritten from scratch, working but WIP
17 months ago
76
logger.info("Scanner started")
Added event waiter, which waits for 2 or more events
3 years ago
77
Merge PR#8
11 months ago
78
while not workQueue.empty():
rewritten from scratch, working but WIP
17 months ago
79
pass
80
# to lock the main thread from exiting
81
except KeyboardInterrupt:
82
logger.info("Detected Ctrl + C, terminating")
83
for i in workerPool:
84
i.work = False
Added event waiter, which waits for 2 or more events
3 years ago
85
86
87
Fixed banner and single scanner
3 years ago
88
def banner():
minor print statments
2 years ago
89
print('\033[91m' + """
Fixed banner and single scanner
3 years ago
90
╔════════════════════════════════════════════╗
91
║ . . ║
92
║ ,-. ,-| ,-,-. . ,-. ," . ,-. ,-| ,-. ,-. ║
93
║ ,-| | | | | | | | | |- | | | | | |-' | ║
94
║ `-^ `-^ ' ' ' ' ' ' | ' ' ' `-^ `-' ' ║
95
║ ' the-c0d3r-0zynX ║
96
╚════════════════════════════════════════════╝
97
""" + '\033[0m')
98
Create admin-finder.py
4 years ago
99
if __name__ == "__main__":
Fixed banner and single scanner
3 years ago
100
banner()
rewritten from scratch, working but WIP
17 months ago
101
main()