-
Notifications
You must be signed in to change notification settings - Fork 1
/
webiteclone.py
96 lines (86 loc) · 2.95 KB
/
webiteclone.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
def website_clone():
def options():
print("""
1:Html5 webisite clone
2:python3 website clone
""")
return True
def clone():
option = input ("Setool-Master~/Main Console~/website_clone//")
if option == "1":
print("[*]Html5 website clone")
url = input("Enter Url To Clone:")
#del the index.html in this place
def rm():
import os
if os.name == "posix": #linux
os.system("rm -f index.html")
return True
if os.name == "nt" : #windows
os.system("del /s /f index.html")
return True
else:
print("[*]Unknow system!")
return False
rm()
with open("index.html" , "a") as f:
f.write("<link href='iframe.css' rel='stylesheet' />")
f.write("<iframe class='iframe' src='"+url+"'"+"></iframe>")
f.close()
def portstart():
import os
if os.name == "posix":
#linux
os.system("python3 -m http.server 8080")
return True
if os.name == "nt":
#windows
os.system("python -m http.server 8080")
return True
else:
print("[*]Do not start a port on your system!")
return False
portstart()
clone()
return True
if option == "2":
print("[*]python3 website clone")
def pyclone():
import requests
url = input ("Enter CLone Url:")
re = requests.get(url)
print(type(re))
re.encoding = 'utf-8'
print(re.text)
with open("index.html" , "w") as f:
f.write(re.text)
f.close()
def osname():
import os
if os.name == "posix": #linux
import os
os.system("python3 -m http.server 8080")
return True
if os.name == "nt": #windows
import os
os.system("python -m http.server 8080")
return True
else:
print("[*]Unknow System!")
return False
osname()
pyclone()
clone()
return True
if option == "exit":
import setool as setool
setool.main()
return True
if option == "show options": #show all clone method
options()
clone()
return True
else:
clone()
return False
clone()