forked from 0xInfection/TIDoS-Framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.py
More file actions
executable file
·96 lines (81 loc) · 2.94 KB
/
Copy pathinstall.py
File metadata and controls
executable file
·96 lines (81 loc) · 2.94 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#-:-:-:-:-:-:-:-:-:-:-:-:#
# TIDoS Framework #
#-:-:-:-:-:-:-:-:-:-:-:-:#
#This module requires TIDoS Framework
#https://github.com/0xInfection/TIDoS-Framework
from __future__ import print_function
import sys
import os
import time
import subprocess
from sys import stdout
from core.Core.colors import *
from core.Core.arts import tidosrules_art
def install():
os.system("clear")
time.sleep(1)
print(B+" [!] Gathering info...")
time.sleep(1)
print(GR+" [*] Checking your resources...")
time.sleep(1.5)
if os.geteuid() == 0:
print(G+" [!] No problems found.")
print(G+" [!] Checkup complete. Launching the installer...")
else:
sys.exit(color.PURPLE+" [-] Run this script as ROOT !!!\033[0m")
sys.exit()
time.sleep(1)
os.system("clear")
try:
header = color.BOLD + """
\033[37m---------------------------------
< TIDoS \033[1;36mInstaller!!\033[1;36m >
---------------------------------"""
print(header)
for line in tidosrules_art.splitlines():
if line:
time.sleep(0.1)
print(C + line)
time.sleep(0.1)
print(color.BOLD+" \033[33m`--' "+color.END)
time.sleep(0.7)
print(O+'\nPreparing for installation...')
time.sleep(0.5)
print(GR+'Finalising options...')
time.sleep(0.5)
raw_input(G+"\nPress 'Enter' to start the installation...")
Preinstall="rm -v -rf /opt/tidos/ && rm -v -f /usr/bin/tidos"
print(B+ '\nChecking for pre-installations...')
time.sleep(0.5)
print(GR+'Removing any trace of pre-installations...'+O+'')
time.sleep(0.5)
os.system(Preinstall)
print(GR+'Setting necessary permissions...'+O+'')
time.sleep(0.5)
os.system('chmod -v +x dependencies')
print(GR+'Processing dependencies...'+O+'')
time.sleep(0.7)
os.system('sudo bash dependencies')
print(GR+'Creating directories...'+O+'')
time.sleep(0.5)
os.system('mkdir -v -p /opt/tidos/')
print(GR+'Copying new files...'+O+'')
time.sleep(0.5)
os.system('cp -r -v * /opt/tidos/')
print(GR+'Creating shortcuts...'+O+'')
time.sleep(0.5)
os.system('cp -v runon.sh /usr/bin/tidos')
print(GR+'Giving priviledges...'+O+'')
time.sleep(0.7)
os.system('chmod -R 750 /opt/tidos/*')
os.system('chmod -v 755 /usr/bin/tidos')
time.sleep(1.5)
print(G+"\n [+] Setup successful!")
print(C+" [+] Execute "+B+'tidos'+C+" now to launch the tool...")
time.sleep(0.5)
print(''+GR+" [+] Also note that the next time you want to run this tool, just simply execute "+O+'tidos'+GR+" in terminal.\n")
sys.exit()
except KeyboardInterrupt: # incase user wants to exit
print(R+'\n [-] Installation aborted...\n')