Kkevsterrr / geneva

automated censorship evasion for the client-side and server-side
https://censorship.ai
BSD 3-Clause "New" or "Revised" License
1.94k stars 183 forks source link

Error: PermissionError: [Errno 1] Operation not permitted #28

Closed byteshiva closed 3 years ago

byteshiva commented 3 years ago

I'm using eth to run below engine but throws permission denied error.

Note: I'm using python virtualenv environment and running as a non-root user.

$python3 engine.py --server-port 80 --strategy "[TCP:flags:PA]-duplicate(tamper{TCP:dataofs:replace:10}(tamper{TCP:chksum:corrupt},),)-|" --log debug
2021-08-30 21:07:04 WARNING:[ENGINE] No environment ID given, one has been generated (6kgpb2xu)
Traceback (most recent call last):
  File "engine.py", line 444, in main
    eng = Engine(args["server_port"],
  File "engine.py", line 103, in __init__
    self.strategy = actions.utils.parse(string_strategy, self.logger)
  File "/home/xyz/geneva/actions/utils.py", line 93, in parse
    success = new_tree.parse(str_action, logger)
  File "/home/xyz/geneva/actions/tree.py", line 208, in parse
    self.action_root = self.do_parse(self.action_root, tree, logger)
  File "/home/xyz/geneva/actions/tree.py", line 143, in do_parse
    action_obj = actions.action.Action.parse_action(action_string, self.direction, logger)
  File "/home/xyz/geneva/actions/action.py", line 149, in parse_action
    outs = Action.get_actions("out")
  File "/home/xyz/geneva/actions/action.py", line 126, in get_actions
    clsmembers = inspect.getmembers(sys.modules["actions."+action], predicate=check_action)
  File "/home/xyz/.asdf/installs/python/3.8.0/lib/python3.8/inspect.py", line 363, in getmembers
    if not predicate or predicate(value):
  File "/home/xyz/geneva/actions/action.py", line 122, in check_action
    obj().applies(direction) and \
  File "/home/xyz/geneva/actions/trace.py", line 39, in __init__
    self.socket = conf.L3socket(iface=actions.utils.get_interface())
  File "/home/xyz/geneva/venv/lib/python3.8/site-packages/scapy/arch/linux.py", line 467, in __init__
    self.ins = socket.socket(socket.AF_PACKET, socket.SOCK_RAW, socket.htons(type))  # noqa: E501
  File "/home/xyz/.asdf/installs/python/3.8.0/lib/python3.8/socket.py", line 231, in __init__
    _socket.socket.__init__(self, family, type, proto, fileno)
PermissionError: [Errno 1] Operation not permitted

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "engine.py", line 463, in <module>
    main(vars(get_args()))
  File "engine.py", line 459, in main
    eng.shutdown_nfqueue()
UnboundLocalError: local variable 'eng' referenced before assignment
Kkevsterrr commented 3 years ago

Looks like you don't have permission to run this - please re-run it with sudo. Hope this helps!