Skip to content

Commit

Permalink
Fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
seanthegeek authored Dec 19, 2024
1 parent 0bdf0d6 commit b5c9c3b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions utils/rooter.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def run(*args):
stdout, stderr = p.communicate()
return stdout, stderr

def enable_ip_forwarding(sysctl="/usr/sbin/ctl"):
def enable_ip_forwarding(sysctl="/usr/sbin/sysctl"):
log.debug("Enabling IPv4 forwarding")
with open("/proc/sys/net/ipv4/ip_forward", "w+") as ip_forward:
ip_forward.write("0")
Expand Down Expand Up @@ -769,7 +769,7 @@ def drop_disable(ipaddr, resultserver_port):
parser.add_argument("socket", nargs="?", default="/tmp/cuckoo-rooter", help="Unix socket path")
parser.add_argument("-g", "--group", default="cape", help="Unix socket group")
parser.add_argument("--systemctl", default="/bin/systemctl", help="Systemctl wrapper script for invoking OpenVPN")
parser.add_argument("--sysctl", default="/usr/sbin/ctl", help=Path to sysctl")
parser.add_argument("--sysctl", default="/usr/sbin/ctl", help="Path to sysctl")
parser.add_argument("--iptables", default="/sbin/iptables", help="Path to iptables")
parser.add_argument("--iptables-save", default="/sbin/iptables-save", help="Path to iptables-save")
parser.add_argument("--iptables-restore", default="/sbin/iptables-restore", help="Path to iptables-restore")
Expand All @@ -794,7 +794,7 @@ def drop_disable(ipaddr, resultserver_port):
sys.exit("The `iptables` binary is not available, eh?!")

if not settings.sysctl or not path_exists(settings.sysctl):
sys.exit("The `iptables` binary is not available, eh?!")
sys.exit("The `sysctrl` binary is not available, eh?!")

if os.getuid():
sys.exit("This utility is supposed to be ran as root.")
Expand Down

0 comments on commit b5c9c3b

Please sign in to comment.