Initiliazation
This commit is contained in:
2
vv1/ssh/config.py
Normal file
2
vv1/ssh/config.py
Normal file
@@ -0,0 +1,2 @@
|
||||
class Config:
|
||||
serv_url: str = "127.0.0.1:7775"
|
||||
17
vv1/ssh/constants.py
Normal file
17
vv1/ssh/constants.py
Normal file
@@ -0,0 +1,17 @@
|
||||
class Consts:
|
||||
banner: str = """
|
||||
_
|
||||
\`*-.
|
||||
) _`-.
|
||||
. : `. .
|
||||
: _ ' \
|
||||
; *` _. `*-._
|
||||
`-.-' `-.
|
||||
; ` `.
|
||||
:. . \
|
||||
. \ . : .-' .
|
||||
' `+.; ; ' :
|
||||
: ' | ; ;-.
|
||||
; ' : :`-: _.`* ;
|
||||
[bug] .*' / .*' ; .*`- +' `*'
|
||||
`*-* `*-* `*-*'"""
|
||||
24
vv1/ssh/main.py
Normal file
24
vv1/ssh/main.py
Normal file
@@ -0,0 +1,24 @@
|
||||
import base64
|
||||
|
||||
from utils.logger import *
|
||||
from utils.conn import *
|
||||
from utils.mod import *
|
||||
from constants import *
|
||||
|
||||
__name__ = "AngelC2"
|
||||
__version__ = "0.1.0"
|
||||
__authors__ = "hk21"
|
||||
|
||||
|
||||
class Angel:
|
||||
def __init__(self):
|
||||
Logger()
|
||||
Utils.clear_shell()
|
||||
print(Consts.banner)
|
||||
|
||||
log.info("welc to angel net shell, fellow kitten!")
|
||||
Conn()
|
||||
|
||||
|
||||
if __name__ == base64.b64decode(b"QW5nZWxDMg==").decode("utf-8"):
|
||||
Angel()
|
||||
18
vv1/ssh/utils/conn.py
Normal file
18
vv1/ssh/utils/conn.py
Normal file
@@ -0,0 +1,18 @@
|
||||
import socket
|
||||
|
||||
from utils.logger import *
|
||||
from config import *
|
||||
|
||||
|
||||
class Conn:
|
||||
def __init__(self):
|
||||
log.info("Attempting to connect...")
|
||||
self.connect()
|
||||
|
||||
def connect(self):
|
||||
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as self.s:
|
||||
ip, port = Config.serv_url.split(":")
|
||||
self.s.connect((ip, int(port)))
|
||||
self.s.sendall("cont".encode("utf-8"))
|
||||
data = self.s.recv(1024)
|
||||
log.warning(data.decode("utf-8"))
|
||||
18
vv1/ssh/utils/logger.py
Normal file
18
vv1/ssh/utils/logger.py
Normal file
@@ -0,0 +1,18 @@
|
||||
import logging
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class Logger:
|
||||
def __init__(self):
|
||||
logging.basicConfig(
|
||||
format="%(levelname)s:%(asctime)s - %(message)s",
|
||||
datefmt="%m/%d/%Y %I:%M:%S %p",
|
||||
)
|
||||
log.setLevel(logging.INFO)
|
||||
form = logging.Formatter(
|
||||
"%(levelname)s:%(asctime)s - %(message)s", datefmt="%m/%d/%Y %I:%M:%S %p"
|
||||
)
|
||||
file_handler = logging.FileHandler("angel.log")
|
||||
file_handler.setFormatter(form)
|
||||
log.addHandler(file_handler)
|
||||
11
vv1/ssh/utils/mod.py
Normal file
11
vv1/ssh/utils/mod.py
Normal file
@@ -0,0 +1,11 @@
|
||||
import os
|
||||
from sys import platform
|
||||
|
||||
|
||||
class Utils:
|
||||
@staticmethod
|
||||
def clear_shell():
|
||||
if platform == "win32":
|
||||
os.system("cls")
|
||||
else:
|
||||
os.system("clear")
|
||||
Reference in New Issue
Block a user