Revert "Reformat project"
This reverts commit 64e3e1160aa76d191740342ab3edc68807f890fb.
This commit is contained in:
35
threshold
35
threshold
@@ -1,14 +1,14 @@
|
||||
#!/usr/bin/env python
|
||||
from twisted.internet import reactor
|
||||
from twisted.internet.ssl import DefaultOpenSSLContextFactory
|
||||
import sys
|
||||
from codecs import getwriter # fix printing odd shit to the terminal
|
||||
from signal import SIGINT, signal
|
||||
from signal import signal, SIGINT
|
||||
|
||||
# from twisted.python import log
|
||||
# from sys import stdout
|
||||
# log.startLogging(stdout)
|
||||
from sys import stderr, stdout # Import again because we want to override
|
||||
|
||||
from twisted.internet import reactor
|
||||
from twisted.internet.ssl import DefaultOpenSSLContextFactory
|
||||
from sys import stdout, stderr # Import again because we want to override
|
||||
from codecs import getwriter # fix printing odd shit to the terminal
|
||||
|
||||
stdout = getwriter("utf8")(stdout) # this is a generic fix but we all know
|
||||
stderr = getwriter("utf8")(stderr) # it's just for the retards on Rizon using
|
||||
@@ -23,11 +23,11 @@ if "--debug" in sys.argv: # yes really
|
||||
main.config["Debug"] = True
|
||||
if "--trace" in sys.argv:
|
||||
main.config["Trace"] = True
|
||||
import modules.counters
|
||||
from core.relay import Relay, RelayFactory
|
||||
from core.server import Server, ServerFactory
|
||||
from utils.loaders.command_loader import loadCommands
|
||||
from utils.logging.log import *
|
||||
from utils.loaders.command_loader import loadCommands
|
||||
from core.server import Server, ServerFactory
|
||||
from core.relay import Relay, RelayFactory
|
||||
import modules.counters
|
||||
|
||||
loadCommands()
|
||||
import core.logstash
|
||||
@@ -46,20 +46,14 @@ if __name__ == "__main__":
|
||||
),
|
||||
interface=main.config["Listener"]["Address"],
|
||||
)
|
||||
log(
|
||||
"Threshold running with SSL on %s:%s"
|
||||
% (main.config["Listener"]["Address"], main.config["Listener"]["Port"])
|
||||
)
|
||||
log("Threshold running with SSL on %s:%s" % (main.config["Listener"]["Address"], main.config["Listener"]["Port"]))
|
||||
else:
|
||||
reactor.listenTCP(
|
||||
main.config["Listener"]["Port"],
|
||||
listener,
|
||||
interface=main.config["Listener"]["Address"],
|
||||
)
|
||||
log(
|
||||
"Threshold running on %s:%s"
|
||||
% (main.config["Listener"]["Address"], main.config["Listener"]["Port"])
|
||||
)
|
||||
log("Threshold running on %s:%s" % (main.config["Listener"]["Address"], main.config["Listener"]["Port"]))
|
||||
if main.config["RelayAPI"]["Enabled"]:
|
||||
relay = RelayFactory()
|
||||
if main.config["RelayAPI"]["UseSSL"] == True:
|
||||
@@ -82,10 +76,7 @@ if __name__ == "__main__":
|
||||
relay,
|
||||
interface=main.config["RelayAPI"]["Address"],
|
||||
)
|
||||
log(
|
||||
"Threshold relay running on %s:%s"
|
||||
% (main.config["RelayAPI"]["Address"], main.config["RelayAPI"]["Port"])
|
||||
)
|
||||
log("Threshold relay running on %s:%s" % (main.config["RelayAPI"]["Address"], main.config["RelayAPI"]["Port"]))
|
||||
for net in main.network.keys():
|
||||
main.network[net].start_bots()
|
||||
modules.counters.setupCounterLoop()
|
||||
|
||||
Reference in New Issue
Block a user