Skip to content

Commit

Permalink
New core
Browse files Browse the repository at this point in the history
  • Loading branch information
RedToor committed Dec 26, 2016
1 parent f48f5d2 commit aa39d4b
Show file tree
Hide file tree
Showing 26 changed files with 553 additions and 740 deletions.
8 changes: 4 additions & 4 deletions LINETIME
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
* 23/12/16
Added New Dependence : bs4, html parsing.
APIs and Core separates.
improvement in the function Global variables
* 25/12/16
New Core : 1.0.0.1 Build:0068
Updated all modules.
New Developer structure

* 21/12/16
Added New Banner : Chapecoense commemoration
Expand Down
16 changes: 16 additions & 0 deletions core/APIs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env python2
#HEAD#########################################################
#
# Katana Framework | APIs Instance
# Last Modified: 24/12/2016
#
#########################################################HEAD#

from core.Function import *
printk = printk()
NET = NET()
UTIL = UTIL()
GRAPHICAL = GRAPHICAL()
COM = COM()
SYSTEM = SYSTEM()
WEB = WEB()
37 changes: 37 additions & 0 deletions core/Config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env python
#HEAD#########################################################
#
# Katana Framework | Configuration
# Last Modified: 24/12/2016
#
#########################################################HEAD#

### SETTING FRAMEWORK ###

# Verbose Mode
"""Show all the alert messages."""
VERBOSE =True

# Errors Log
"""Saves all error events in a log."""
ERROR_LOG =False

# Enable Auto-load Session
"""Load last session in the module"""
AUTO_LOAD_SESSION =True

# Apache Folder
"""Path of Apache2"""
PATCH_WWW ="/var/www/html/"

# Enable Xterm
"""It shows processes that are running through wires, shown with xterm"""
XTERM_OPTION =False

# SESSIONS SAVE
"""Not save Sessions"""
SAVE_SESSIONS =False


### END SETTING FRAMEWORK ###

36 changes: 3 additions & 33 deletions core/Default.py
Original file line number Diff line number Diff line change
@@ -1,41 +1,11 @@
#!/usr/bin/env python
#HEAD#########################################################
#
# Katana Framework | Default
# Settings and Default Variables of Framework, here you can
# change value of variables for adapter to your system.
#
#
# Last Modified: 08/10/2016
# Katana Framework | Default parameters
# Last Modified: 23/12/2016
#
#########################################################HEAD#


### SETTING FRAMEWORK ###

# Verbose Mode
"""Show all the alert messages."""
VERBOSE =True

# Errors Log
"""Saves all error events in a log."""
ERROR_LOG =False

# Enable Auto-load Session
"""Load last session in the module"""
AUTO_LOAD_SESSION =True

# Apache Folder
"""Path of Apache2"""
PATCH_WWW ="/var/www/html/"

# Enable Xterm
"""It shows processes that are running through wires, shown with xterm"""
XTERM_OPTION =False

### END SETTING FRAMEWORK ###


# DEFAULT VARIABLES
"""Names of main files"""
KTFCONSOLE ="ktf.console"
Expand All @@ -61,7 +31,7 @@
CHANNEL_TARGET ="9"
ESSID_TARGET ="FUCK-ME"
MY_IP ="192.168.1.225"
GATEWAY_ADR ="192.168.1.254"
GATEWAY ="192.168.1.254"
EMAIL ="root@localhost"
USERNAME ="root"
PASSWORD ="toor"
Expand Down
38 changes: 21 additions & 17 deletions core/Design.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
#HEAD#########################################################
#
# Katana Framework | Design
# Last Modified: 23/08/2016
# Last Modified: 24/12/2016
#
#########################################################HEAD#

import time
import Information
from Default import VERBOSE
from Config import VERBOSE

colors=['\033[0m', # 0} WHITE
'\033[31m', # 1} RED
Expand All @@ -33,22 +33,9 @@
help =colors[0]+"["+colors[7]+"hlp"+colors[0]+"]"
warning =colors[0]+"["+colors[7]+colors[3]+"war"+colors[0]+"]"
runing =colors[0]+"["+colors[2]+"run"+colors[0]+"]"
waitkey =colors[0]+"["+colors[8]+"key"+colors[0]+"]"
wait =colors[0]+"["+colors[8]+"wait"+colors[0]+"]"
press =colors[0]+"["+colors[8]+"press-key"+colors[0]+"]"

Got=colors[0]+"["+colors[8]+"-->"+colors[0]+"]"
Nrs=colors[0]+"["+colors[1]+"nrs"+colors[0]+"]"

def printAlert(typ, msg):
if typ == 0 :
if VERBOSE==True:print " "+information+" "+str(msg)
if typ == 1 : print " "+error+" "+str(msg)
if typ == 2 : print " "+help+" "+str(msg)
if typ == 3 : print " "+success+" "+str(msg)
if typ == 4 : print " "+Nrs+" "+str(msg)
if typ == 5 : print " "+step+" "+str(msg)
if typ == 6 : print " "+warning+" "+str(msg)
if typ == 7 : print " "+Got+" "+str(msg)
if typ == 8 : return " "+waitkey+" "+str(msg)

def MainPrompt() :return colors[7]+" [ktf]:"+colors[0]
def ClientPrompt(module,client) :return colors[0]+" [ktf]("+colors[7]+colors[1]+module+colors[0]+":"+colors[9]+client+colors[0]+"):"+colors[0]
Expand All @@ -64,6 +51,23 @@ def helpAUX() :print " "+help+" Auxiliar module support"
def NoDeviceFound(device) :print " "+error+" The device '"+device+"' not was Found.\n"
def CommandNotFound() :print " "+warning+" Invalid parameter use show 'help' for more information"+colors[0]
def functionNotFound() :print " "+warning+" The function not Exists"+colors[0]
def FunctionNoEnableForThisModule() :print " "+error+" This Commands just work in ktf.console mode."

class printk():
def inf(self,msg):
if VERBOSE==True:print " "+information+" "+str(msg)
def err(self,msg):
print " "+error+" "+str(msg)
def suff(self,msg):
print " "+success+" "+str(msg)
def step(self,msg):
print " "+step+" "+str(msg)
def war(self,msg):
print " "+warning+" "+str(msg)
def wait(self,msg):
print " "+wait+" "+str(msg)
def pkey(self,msg):
return " | "+press+" "+str(msg)+"\n |"

class DESIGN:

Expand Down
2 changes: 1 addition & 1 deletion core/Errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#########################################################HEAD#

from Design import *
from Default import ERROR_LOG
from Config import ERROR_LOG
from Internal import SaveErrorLog

import sys
Expand Down
Loading

0 comments on commit aa39d4b

Please sign in to comment.