Compare commits

..

No commits in common. "f759f8ed86276e86114efd322ce14ab8be03e6b8" and "d5f85fb62a219660d7eaedcde91d3e76a063a7b7" have entirely different histories.

6 changed files with 13 additions and 20 deletions

View File

@ -15,10 +15,7 @@ def get_blocklist(config, settings):
appendbad = settings["appendbad"]
whitelist = settings["whitelist"]
fprint("Downloading deny list from server")
try:
data = ssh.check_for_file(config, "BadIPs.csv", "receive")
except:
data = list()
data = ssh.check_for_file(config, "BadIPs.csv", "receive")
#fprint(data.stdout)
csvreader = csv.reader(data.stdout.split("\n"), delimiter=',', quotechar='|')
data2 = list()

View File

@ -2,7 +2,7 @@ core:
autostart: true
clockspeed: 20
interval: 10
level: 2
level: 3
localadmin: true
sftp:
filepath:

View File

@ -218,9 +218,8 @@ def mainloop(pool):
tmplist = settings["badapps"]
settings["badapps"] = list()
for x in tmplist:
if x > 4:
send_notification("Killing PID " + str(x))
kill(x)
send_notification("Killing PID " + str(x))
kill(x)
if settings["fwll"] == True:
global history
@ -237,14 +236,14 @@ def mainloop(pool):
if (badip, badport) not in history:
fprint("Firewalling " + badip + ":" + str(badport), settings)
send_notification("Firewalling " + badip + ":" + str(badport))
history.append((badip, badport))
if win32:
cmd = 'New-NetFirewallRule -DisplayName "IPPigeon Security Rule ' + badip + ':' + str(badport) + '" -Group "IPPigeon" -Direction Outbound -LocalPort Any -Protocol ' + badproto + ' -Action Block -RemoteAddress ' + badip + ' -RemotePort ' + str(badport)
run_cmd(cmd)
if linux:
cmd = "nft add rule ip ippigeon output ip daddr " + badip + " " + badproto.lower() + " dport " + str(badport) + " drop"
run_cmd(cmd)
else:
history.append((badip, badport))
settings["badapps"] = list()

View File

@ -89,8 +89,8 @@ class LoginPanel(wx.Panel):
vbox.Add(pwdText, 0, wx.ALIGN_CENTER | 100, 5)
login_button = wx.Button(self, label='Login')
login_button.Bind(wx.EVT_BUTTON, self.on_login)
#help_button = wx.Button(self, label='Help')
#help_button.Bind(wx.EVT_BUTTON, self.on_help)
help_button = wx.Button(self, label='Help')
help_button.Bind(wx.EVT_BUTTON, self.on_help)
# signup_button = wx.Button(self, label='Sign Up')
hbox.Add(login_button, 0, wx.ALL | 200, 20)
# hbox.Add(signup_button, 0, wx.ALL | 200, 20)

View File

@ -7,4 +7,4 @@ pyyaml
numpy
bcrypt
plyer
playsound==1.2.2
playsound

11
util.py
View File

@ -47,13 +47,10 @@ def time():
def kill(pid):
setup_child()
try:
if pid > 4:
fprint("Killing PID " + str(pid), settings)
os.kill(int(pid), 9)
fprint("Signal 9 sent to PID " + str(pid), settings)
except:
fprint("Unable to kill " + str(pid), settings)
if pid > 0:
fprint("Killing PID " + str(pid), settings)
os.kill(int(pid), 9)
fprint("Signal 9 sent to PID " + str(pid), settings)
def fprint(msg, settings = None):
#if not getattr(sys, "frozen", False):