-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSidlister2.K.py
56 lines (48 loc) · 2.22 KB
/
Sidlister2.K.py
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
import sublist3r
from subprocess import Popen, PIPE
import pyfiglet # Import the pyfiglet library
import sys # Import the sys module for exit
def show_intro():
# Create ASCII art for "Tool By Siddharth Kumar" with smaller font size
intro_message = pyfiglet.figlet_format("Tool By Siddharth Kumar", font="small")
# Use cowsay and fortune to display a fun introduction
p1 = Popen(["fortune"], stdout=PIPE)
p2 = Popen(["cowsay", "-f", "dragon"], stdin=p1.stdout, stdout=PIPE)
p1.stdout.close()
output = p2.communicate()[0]
print(output.decode("utf-8"))
print(intro_message) # Display the ASCII art
def save_to_html(subdomains, output_file):
sorted_subdomains = sorted(subdomains) # Sort the subdomains alphabetically
with open(output_file, 'w') as file:
file.write("<html><head><title>Subdomain Enumeration Results</title>")
file.write('<style>'
'body { background-color: #f0f0f0; font-family: Arial, sans-serif; }'
'h1 { color: #333; }'
'p { font-style: italic; }'
'ul { list-style-type: circle; }'
'li { color: #007bff; }'
'</style>')
file.write("</head><body>")
file.write("<h1>Sidlister's Subdomain Enumeration Results</h1>")
file.write("<p>Tool by Siddharth Kumar</p>")
file.write("<ul>")
for subdomain in sorted_subdomains:
file.write(f'<li>{subdomain}</li>')
file.write("</ul>")
file.write("</body></html>")
print(f"Results saved to {output_file}")
def main():
try:
show_intro() # Display the 3D intro
domain = input("Enter the domain name without protocol names (http/https)-: ")
output_file = "mephisto_results.html"
# Use Sublist3r to enumerate subdomains
subdomains = sublist3r.main(domain, 40, None, None, False, False, False, None)
# Save the results to an HTML file with sorted and styled subdomains
save_to_html(subdomains, output_file)
except KeyboardInterrupt: # Catch Ctrl+C
print("\033[91mGoodbye\033[0m") # Display "Goodbye" in red color
sys.exit(0) # Exit the program gracefully
if __name__ == "__main__":
main()