Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ramirak committed May 18, 2023
1 parent f6a8e8d commit 7da7170
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion iptable_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def set_rule_block(chain, d_host):

def set_rule_return(chain):
rule = "sudo iptables -C " + chain + " -j RETURN"
ret = subprocess.Popen(rule.split(), stdout=subprocess.PIPE).wait()
ret = subprocess.Popen(rule.split(), stderr=subprocess.DEVNULL).wait()
if ret:
rule = "sudo iptables -A " + chain + " -j RETURN"
subprocess.Popen(rule.split(), stdout=subprocess.PIPE).wait()
Expand Down
2 changes: 1 addition & 1 deletion main_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def set_main_buttons(root, text, LEFT_FRAME, RIGHT_FRAME):
Button(RIGHT_FRAME,text="Apply policy", **button_args, command=lambda:apply_current_policy()),
Button(RIGHT_FRAME,text="Edit policies", **button_args, command=lambda:edit_policies()),
Button(RIGHT_FRAME,text="Apply blocklist", **button_args, command=lambda:apply_blocklist()),
Button(RIGHT_FRAME,text="Clear blocklist", **button_args, command=lambda: [ clear_chains("BLOCKLIST"), set_rule_return("BLOCKLIST"), save_all()]),
Button(RIGHT_FRAME,text="Clear blocklist", **button_args, command=lambda: [print("Clearing blocklist chain.."), clear_chains("BLOCKLIST"), set_rule_return("BLOCKLIST"), save_all()]),
Button(RIGHT_FRAME,text="Firewall Logs", **button_args, command=lambda: update_window_text(text, 'sudo tail -50 /var/log/iptables.log'))]
for b in buttons:
b.bind('<Enter>', lambda e: e.widget.config(bg=hover_color))
Expand Down

0 comments on commit 7da7170

Please sign in to comment.