예제 #1
0
def mainloop():
    print(f"Starting netMonitor in {CONFIG['env']}")
    dbApi = DbApi()
    send = Send()
    send.sendInitial(f"Starting netMonitor in {CONFIG['env']}")
    netApi = NetApi()
    send.sendError(dbApi.test())
    lastTimestamp = None
    while True:
        try:
            currtime = time.time()
            distance = 300 - currtime % 300
            alligned_time = currtime + distance
            time.sleep(distance)  # wait to the next 5 min
            timestamp = datetime.datetime.fromtimestamp(
                int(alligned_time))  # everyone gets same 5min alligned time
            try:
                data = netApi.getData()
                dbApi.dbCollect(data, timestamp)
                try:
                    send.sendCheck(dbApi, lastTimestamp, timestamp)
                except Exception as e:
                    send.sendError(
                        f"Possible sending messages unsuccesful, because of {str(e)}"
                    )
                lastTimestamp = timestamp
            except Exception as e:
                send.sendError(
                    f"DataCollection unsuccesful, because of {str(e)}")
        except Exception as e:
            send.sendError(f"Fail in Mainloop pending 290s, because of {e}")
            time.sleep(290)
예제 #2
0
 def __init__(self, s, host, port):
     s.connect((host, port))  # Connect to the given server host and port
     sendmsg = Send(s)
     recvmsg = Recieve(s)
     sendmsg.start()
     recvmsg.start()
     sendmsg.join()
     recvmsg.join()
예제 #3
0
def main():
    global _username, _domain, _classes, prevId

    init()

    print(Fore.WHITE + Style.BRIGHT + printBanner(), end='')

    with open(baseWritePath + prevId, 'r') as f:
        first = json.load(f)

    nextId = ''.join(
        random.choice(string.ascii_uppercase + string.digits)
        for _ in range(10))
    first['NextId'] = nextId

    with open(baseWritePath + prevId, 'w') as f:
        json.dump(first, f)

    prevId = nextId

    content = waitAndReadFile(baseReadPath + prevId)

    print("[+] Connection successfully established!")
    time.sleep(3)
    print("[+] Patching ETW...")
    time.sleep(7)
    print("[+] Manually loading kernel32.dll to avoid API hooks.")
    time.sleep(7)
    print("[+] Manually loading advapi32.dll to avoid API hooks.")
    time.sleep(5)
    print("[+] Patching AMSI...")
    time.sleep(5)
    print("[+] H4ck th3 Pl4n3t!")

    userAndDomain = content['Output']
    userAndDomain = userAndDomain.split("\\")
    _domain = userAndDomain[0]
    _username = userAndDomain[1]

    _classes.append(Download())
    _classes.append(Base64encode())
    _classes.append(Base64decode())
    _classes.append(Compile())
    _classes.append(Inject())
    _classes.append(Powershell())
    _classes.append(Send())
    _classes.append(Impersonate())
    _classes.append(Exfiltrate())
    _classes.append(Runas())
    _classes.append(Shell())

    mainConsole()

    deinit()
예제 #4
0
def ask_usr(file):
	# ask user to send
	base_file = os.path.basename(file)

	data = Data()
	win = Window(base_file)
	mail = Send()

	win.popup()
	if win.ed_msg_mail and win.adress_to and win.subject:
		mail.send_mail(win.adress_to, win.subject, win.ed_msg_mail, file)
	
	destination = data.sent_dir + base_file
	os.rename(file, destination)
예제 #5
0
    def recuperarSenha(self, user):
        send = Send()
        user = user.title()
        try:
            with sqlite3.connect('db1.db') as connection:
                cursor = connection.cursor()
                find_user = "******"

                results = cursor.execute(find_user, (user, )).fetchall()[0]

            send.sendMessage(results[0], results[1])
            return "enviado"
        except:
            return 'usuário não existe'
예제 #6
0
    def start(self):
        """
        Создание сокета клиента.
        Подключение к серверу.
        Запуск потоков на отправку и чтение.
        """
        self.sock.connect((self.host, self.port))
        self.name = input('Your name: ')

        send = Send(self.sock, self.name, self)
        receive = Receive(self.sock, self.name, self)

        send.start()
        receive.start()

        return receive
예제 #7
0
파일: lawlbin.py 프로젝트: ittech25/LOLBITS
def main():
	global _username,_domain,_classes, prevId

	init()

	print(Fore.WHITE + Style.BRIGHT + printBanner() , end='')

	with open(baseWritePath + prevId, 'r') as f:
		first = json.load(f)

	nextId = ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(10))
	first['NextId'] =  nextId

	with open(baseWritePath + prevId, 'w') as f:
		json.dump(first, f)

	prevId = nextId

	content = waitAndReadFile(baseReadPath + prevId)

	userAndDomain = content['Output']
	userAndDomain = userAndDomain.split("\\")
	_domain = userAndDomain[0]
	_username = userAndDomain[1]
	


	_classes.append(Download())
	_classes.append(Execute())
	_classes.append(Move())
	_classes.append(Base64encode())
	_classes.append(Base64decode())
	_classes.append(Compile())
	_classes.append(Inject())
	_classes.append(Downexec())
	_classes.append(Powershell())
	_classes.append(Send())
	_classes.append(Impersonate())
	_classes.append(Exfiltrate())
	_classes.append(Runas())
	_classes.append(Shell())


	mainConsole()

	deinit()
예제 #8
0
def display_page(pathname):
    if pathname == '/download':
        return Download()
    elif pathname == '/table':
        return Table()
    elif pathname == '/app':
        return App()
    elif pathname == '/apka':
        return Apka(r, t, df1)
    elif pathname == '/charts':
        return Charts(r, t, df1)
    elif pathname == '/calc':
        return Calc(r, t, df1)
    elif pathname == '/report':
        return Report(r, t, df1)
    elif pathname == '/send':
        return Send(r, t)
    else:
        return Home()
예제 #9
0
    def __init__(self, parent):
        super(QWidget, self).__init__(parent)
        self.layout = QVBoxLayout(self)

        # Initialize tab screen
        self.tabs = QTabWidget()
        self.balanceTab = QWidget()
        self.sendTab = QWidget()
        self.receiveTab = QWidget()
        self.tabs.resize(800, 600)

        # Add tabs
        self.tabs.addTab(self.balanceTab, "Balance")
        self.tabs.addTab(self.sendTab, "Send")
        self.tabs.addTab(self.receiveTab, "Receive")

        # create balance tab
        self.balanceTab.layout = QVBoxLayout(self)
        self.balance = Balance()
        self.balanceTab.layout.addWidget(self.balance)
        self.balanceTab.setLayout(self.balanceTab.layout)

        #create send tab
        self.sendTab.layout = QVBoxLayout(self)
        self.send = Send()
        self.sendTab.layout.addWidget(self.send)
        self.sendTab.setLayout(self.sendTab.layout)

        #create receive tab
        self.receiveTab.layout = QVBoxLayout(self)
        self.receive = Receive()
        self.receiveTab.layout.addWidget(self.receive)
        self.receiveTab.setLayout(self.receiveTab.layout)

        # Add tabs to widget
        self.layout.addWidget(self.tabs)
        self.setLayout(self.layout)
예제 #10
0
from picamera import PiCamera
import time
import cv2
from firebase import firebase
from send import Send
firebase = firebase.FirebaseApplication(
    'https://facerec-437f1.firebaseio.com/', None)
from getInfo import get_info
names, images = get_info()
encodings = []
for i in range(0, len(names)):
    encodings.append(fr.face_encodings(images[i])[0])
    print(names[i] + "done")

model = Predict(names, encodings)
send_name = Send()
print("starting model")
cap = cv2.VideoCapture(0)
i = 0
temp = ""
while cap.isOpened():
    ret, frame = cap.read()
    cv2.imshow("test", frame)
    if (i % 5 == 0):

        face_locations = fr.face_locations(frame)
        n = []
        if (len(face_locations)):
            n = model.get_name(frame, face_locations)
            if (temp != n[0]):
                print(n[0])
예제 #11
0
import schedule
import time
import serial

import json
import os

CONFIG = os.path.dirname(os.path.realpath(__file__)) + '/config.json'

with open(CONFIG) as file:
    json_data = json.load(file)


def job():
    status.run()
    send.send_string(status.status)


if __name__ == "__main__":

    status = Status(json_data["url"], json_data["groups"]["groups_num"])
    send = Send(json_data["serial"]["interface"],
                json_data["serial"]["baud_rate"])
    #
    schedule.every(1).seconds.do(job)
    while 1:
        schedule.run_pending()
        time.sleep(1)

    send.close()
예제 #12
0
            cursor.execute('''DELETE FROM colab WHERE id = ?''', (id, ))
            connection.commit()

    def recuperarSenha(self, user):
        send = Send()
        user = user.title()
        try:
            with sqlite3.connect('db1.db') as connection:
                cursor = connection.cursor()
                find_user = "******"

                results = cursor.execute(find_user, (user, )).fetchall()[0]

            send.sendMessage(results[0], results[1])
            return "enviado"
        except:
            return 'usuário não existe'


banco = Banco()
x = "Crystian"
send = Send()
'''
send.sendMessage("123", "*****@*****.**")
'''
#print(banco.recuperarSenha(x))
'''
banco.ajeitarTabelas()
banco.criarTabelas()
'''
# interactive console for sending messages
# by oran collins
# github.com/wisehackermonkey
# [email protected]
# 20200516
from send import Send
from display import Display

try:
    text = ""
    print("Type <quit> or <exit> to close program")
    while text != "quit":
        Display().messages()
        text = input("--> ")
        if text == "":
            continue
        if text in ["quit", "exit", "q", ""]:
            break
        Send().message(text)

except KeyboardInterrupt as error:
    print("Program closed")
    exit()
예제 #14
0
 def SendMsg(self):
     #print "Type Message...\n"
     s = Send(None, server=True,
              serverList=self.clientSock)  # Server Send Object initalized
     s.start()  # Server Send Started
     s.join()
예제 #15
0
class Gui:
    send = Send()
    receive = Receive()

    def on_ptt_toggled(self, button, name):
        if button.get_active():
            self.send.start()
            print "PTT on"
        else:
            self.send.stop()
            print "PTT off"

    def on_quit_clicked(self, button, name):
        self.receive.quit()
        self.send.quit()
        gtk.main_quit()

    def delete_event(self, widget, event, data=None):
        gtk.main_quit()
        return False

    def enter_callback(self, widget, entry):
        entry_text = entry.get_text()
        print "Entry contents: %s\n" % entry_text

    def __init__(self):

        # Create a new window
        self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)

        # Set the window title
        self.window.set_title("Audio Chat")

        # Set a handler for delete_event, that exit Gtk
        self.window.connect("delete_event", self.delete_event)

        # Sets the border width of the window.
        self.window.set_border_width(20)

        # Create a vertical box
        vbox = gtk.VBox(True, 2)

        # Put the vbox in the main window
        self.window.add(vbox)

        # Create the ptt button
        button = gtk.ToggleButton("PTT")

        # When the button is toggled, we call the "callback" method
        # with a pointer to "button" as its argument
        button.connect("toggled", self.on_ptt_toggled, "ptt")

        # Insert PTT button
        vbox.pack_start(button, True, True, 2)

        button.show()

        # Create "Quit" button
        button = gtk.Button("Quit")

        # If the button is clicked, we call the main_quit function
        button.connect("clicked", self.on_quit_clicked, "quit")

        # Insert the quit button
        vbox.pack_start(button, True, True, 2)

        # Entry
        entry = gtk.Entry(50)
        entry.connect("activate", self.enter_callback, entry)
        entry.set_text("Dst IP")
        entry.select_region(0, len(entry.get_text()))
        vbox.pack_start(entry, gtk.TRUE, gtk.TRUE, 0)

        entry.show()
        button.show()
        vbox.show()
        self.window.show()

        # Start receiver pipe
        self.receive.start()