forked from PowerScript/KatanaFramework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install
76 lines (70 loc) · 6.65 KB
/
install
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
#!/usr/bin/env python
#HEAD#########################################################
#
# Katana Framework | install
# for install is important have internet for install the
# dependencies.
#
#
# Last Modified: 03/06/2016
#
#########################################################HEAD#
from core.Function import status_cmd
from core import Information, colors, Update
import os, time
print ""
print " "+colors.B+",:"+colors.W+" "+colors.B+":,"+colors.W+" "# ,: :,
print " "+colors.B+",/./"+colors.W+" _8_ "+colors.B+"\.\ "# /./ _8_ \.\
print " "+colors.B+",\ \\"+colors.W+"/"+colors.P+"("+colors.R+"O"+colors.P+")"+colors.W+"\\"+colors.B+"/ / "# \ \/( O )\/ /
print " "+colors.B+",\ \:::/ / "# \ \:::::/ /
print " /"+colors.O+"__"+colors.G+"---"+colors.O+"__"+colors.B+"\ "# /__---__\
print " ("+colors.O+"/__\ /__\\"+colors.B+")"+colors.W+" "# (/__\ /__\)
print " "+colors.B+"/"+colors.W+"\ .V. /"+colors.B+"\\"+colors.W+" "# /\ .V. /\
print " "+colors.B+"/"+colors.W+" \,---,/ "+colors.B+"\\"+colors.W+" "# / \,---,/ \
print " "+colors.B+"\\"+colors.W+"___TTTTT___"+colors.B+"/"+colors.W+" CODE: KATANA "# \___TTTTT___/
print " ::::\ "+colors.R+"|"+colors.W+"_____"+colors.R+"|"+colors.W+" /:::: DATE: "+Information.date+""# ::::\ "+colors.R+"|"+colors.W+"_____"+colors.R+"|"+colors.W+" /::::
print " (+ _"+colors.R+"|"+colors.W+" __"+colors.R+"|"+colors.W+"__ "+colors.R+"|"+colors.W+"_ +) CORE: "+Information.version+", BUILD: "+Information.build # (+ _"+colors.R+"|"+colors.W+" __"+colors.R+"|"+colors.W+"__ "+colors.R+"|"+colors.W+"_ +)
print " "+Information.Type+" "+colors.R+"|"+colors.W+" I_"+colors.R+"|"+colors.W+"KATANA."+colors.R+"|"+colors.W+"_I "+colors.R+"|"+colors.W+" "# "+colors.R+"|"+colors.W+" I_"+colors.R+"|"+colors.W+".ANATAK"+colors.R+"|"+colors.W+"_I "+colors.R+"|"+colors.W+"
print " "+colors.R+"|"+colors.W+" I_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+" "+colors.R+"|"+colors.W+" "# "+colors.R+"|"+colors.W+" I_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+" "+colors.R+"|"+colors.W+"
print " __________?_____________________________________ "# __________?_________________________________
print " {_"+colors.C+"B|"+colors.W+" "+colors.C+"Y|"+colors.W+" "+colors.R+"R|"+colors.W+" "+colors.W+"T|"+colors.W+" |"+colors.GR+"#################################"+colors.W+"/ "# {_"+colors.R+"|"+colors.W+" "+colors.R+"|"+colors.W+" "+colors.R+"|"+colors.W+" "+colors.R+"|"+colors.W+" I#################################/
print " ^ ^ ^ ^ ,ww "+colors.O+"FRAMEWORK"+colors.W+" ww, "# ^ ^ ^ ^ EHT KROWEMARF, dliuB
print " I_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_I "# I_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_I
print " \_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_/ "# \_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_/
print ""
print ""
if os.getuid() != 0:
print " ["+colors.R+"-"+colors.W+"] ERROR:"+colors.B+" Katana Install"+colors.B+" must be run as "+colors.R+"root"+colors.W+"."
print " ["+colors.R+"-"+colors.W+"] login as root ("+colors.R+"sudo"+colors.W+") or try "+colors.W+"sudo python install.py"+colors.W+"\n"
exit(1)
time.sleep(1)
Shortcuts="""
ln -f -r -s /usr/share/KatanaFramework/core/shorts/ktf.console /usr/bin/ktf.console ;
ln -f -r -s /usr/share/KatanaFramework/core/shorts/ktf.linker /usr/bin/ktf.linker ;
ln -f -r -s /usr/share/KatanaFramework/core/shorts/ktf.update /usr/bin/ktf.update ;
ln -f -r -s /usr/share/KatanaFramework/core/shorts/ktf.ktf /usr/bin/ktf.ktf ;
ln -f -r -s /usr/share/KatanaFramework/core/shorts/ktf.tool /usr/bin/ktf.tool ;
ln -f -r -s /usr/share/KatanaFramework/core/shorts/ktf.run /usr/bin/ktf.run
"""
Files="""
cd /usr/share/KatanaFramework/files/ ;
tar xvf /usr/share/KatanaFramework/files/exiftool.tar >/dev/null 2>&1;
tar xvf /usr/share/KatanaFramework/files/facebrok1.8.tar >/dev/null 2>&1;
tar xvf /usr/share/KatanaFramework/files/getdatareport.tar>/dev/null 2>&1;
rm -R /usr/share/KatanaFramework/files/*.tar >/dev/null 2>&1;
rm /usr/share/KatanaFramework/install >/dev/null 2>&1;
rm /usr/share/KatanaFramework/dependencies >/dev/null 2>&1;
rm /usr/share/KatanaFramework/README.md >/dev/null 2>&1
"""
print " INSTALLING"
print " ["+time.strftime('%H:%M:%S')+"]",status_cmd('sudo bash dependencies'),"Checking dependencies."
print " ["+time.strftime('%H:%M:%S')+"] Checking Updates."
print " |"
Update.update("installer")
print " |"
print " ["+time.strftime('%H:%M:%S')+"]",status_cmd('mkdir -p /usr/share/KatanaFramework'),"Creating Folder."
print " ["+time.strftime('%H:%M:%S')+"]",status_cmd('cp -r * /usr/share/KatanaFramework'),"Coping files."
print " ["+time.strftime('%H:%M:%S')+"]",status_cmd(Shortcuts),"Creating Shortcuts."
print " ["+time.strftime('%H:%M:%S')+"]",status_cmd(Files),"Extracting Files."
print " ["+time.strftime('%H:%M:%S')+"]",status_cmd('chmod -R -c 777 /usr/share/KatanaFramework/'),"Giving privileges."
print "\n if all is [OK] Katana was installed, use ktf.console\n"