forked from PowerScript/KatanaFramework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.py
79 lines (72 loc) · 6.61 KB
/
install.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
#!/usr/bin/env python
#
# About Author :
#
# Founder : Javier Franco (RedToor)
# Location : Colombia
# Email : redtoor[at]inbox.ru
# Project In Github : https://github.com/redtoor/katana
#
# ------- Katana Installation Script. --------
#
# Description File: The file Script Make a Folder in (usr/share) named katana
# for install katana framework, copy all file to the folder
# and make shortcups for fast access and after give privileges
# a All files of project.
#
# you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version. @ LICENSE
#
from core.Setting import *
from core import info
from core import colors
from core import ping
import os
import 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: "+info.date+""# ::::\ "+colors.R+"|"+colors.W+"_____"+colors.R+"|"+colors.W+" /::::
print " (+ _"+colors.R+"|"+colors.W+" __"+colors.R+"|"+colors.W+"__ "+colors.R+"|"+colors.W+"_ +) CORE: "+info.version+", BUILD: "+info.build # (+ _"+colors.R+"|"+colors.W+" __"+colors.R+"|"+colors.W+"__ "+colors.R+"|"+colors.W+"_ +)
print " "+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+" I"+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/katana/core/ShortCuts/ktf.console /usr/bin/ktf.console ;
ln -f -r -s /usr/share/katana/core/ShortCuts/ktf.linker /usr/bin/ktf.linker ;
ln -f -r -s /usr/share/katana/core/ShortCuts/ktf.update /usr/bin/ktf.update ;
ln -f -r -s /usr/share/katana/core/ShortCuts/ktf.run /usr/bin/ktf.run ;
"""
Files="""
cd /usr/share/katana/files;tar -xf /usr/share/katana/files/exiftool.tar >/dev/null 2>&1;
cd /usr/share/katana/files;tar -xf /usr/share/katana/files/facebrok.tar >/dev/null 2>&1;
cd /usr/share/katana/files;tar -xf /usr/share/katana/files/getdatareport.tar >/dev/null 2>&1;
cd /usr/share/katana/files;tar -xf /usr/share/katana/files/hulk.tar >/dev/null 2>&1;rm -R *.tar
"""
print colors.W+" \033[1m\033[41mKatana framework\033[49m date {"+time.strftime('%c')+"}"
print colors.W+"\n Creating Folder. ", ping.status_cmd('mkdir -p '+PATCH_INTALL+'katana', "\t\t\t\t\t\t")
print " Coping files. ", ping.status_cmd('cp -r * '+PATCH_INTALL+'katana', "\t\t\t\t\t\t")
print " Creating Shortcuts. ", ping.status_cmd(Shortcuts, "\t\t\t\t\t\t")
print " Extracting Files. ", ping.status_cmd(Files, "\t\t\t\t\t\t")
print " Giving privileges. ", ping.status_cmd('chmod -R -c 777 /usr/share/katana/',"\t\t\t\t\t\t")
print "\n Done, Enjoy. !!!\n"