start block code

formac
Cole Deck 2 years ago
parent bbb92d1fdb
commit 88b38d1492

@ -0,0 +1,16 @@
from util import find_data_file
from util import setup_child
from util import fprint
from util import run_cmd
from util import win32
from util import linux
import util
import time
import csv
import ssh
def get_blocklist(config):
setup_child()
fprint("Downloading deny list from server")
data = check_for_file(config, "BadIPs.csv", "receive")
fprint(data.stdout)

@ -14,6 +14,7 @@ import netstat
import ssh
import auth
import panel
import block
badapps = [756, 278670]
displaydata = None
@ -130,6 +131,10 @@ def mainloop(pool):
#fprint(auth.login(config, settings["username"], settings["password"], sysid))
settings["login"] = False
if settings["block"] == True:
blockdata_res = pool.apply_async(block.get_blocklist, (config,)) #, callback=blockdata_done)
settings["block"] = False
#fprint(settings["killbox"])
if len(settings["killbox"]) > 0:
fprint("Kill opportunity!")
@ -183,6 +188,7 @@ if __name__ == '__main__':
settings["continueui"] = False
settings["killbox"] = list()
settings["badapps"] = badapps
settings["block"] = True
killme = manager.Value('d', 0)
#killme = False
# launch background UI app as process

128538
output.log

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save