kkevsterrr / geneva Goto Github PK
View Code? Open in Web Editor NEWautomated censorship evasion for the client-side and server-side
Home Page: https://censorship.ai
License: BSD 3-Clause "New" or "Revised" License
automated censorship evasion for the client-side and server-side
Home Page: https://censorship.ai
License: BSD 3-Clause "New" or "Revised" License
hi
I don't understand one thing, in the Geneva documents it said, "Geneva runs strictly on one side of the connection (either the client or server side)". my question is, if I run Geneva on my server to make connection just use vpn's or proxy for connecting to the server????
I have OpenVPN, Wireguard and shadowsocks on the server and only shadowsocks work from Iran and many use my server right now i want to ask this before do anything.
I noticed on your website it said windows support is in alpha. Just wondering how to set it up on Windows, or if it is even useable on Windows?
i run it in server mode and with no strategy with the command python3 engine.py --server-port 2083 --strategy "\/" --server-side --log debug
for debugging, it works fine when the number of connections are low, but when it reaches about 15k of connections, the client side will fail!
Hi There,
Iranian people are under a heavy filtering service by gov. I myself accidentally and by chance connected to web and come here to say that, we needs you guys and your help.
if you can help and get some fast tip answer this issue pls.
Best Regards - Iranian People
Is there any communication info to share some points about Geneva Project with you guys?
Your email is not answering :(
command:python3 evolve.py --test-type dns --log debug --strategy "\/"
Error:
Traceback (most recent call last):
File "evolve.py", line 835, in <module>
driver(sys.argv[1:])
File "evolve.py", line 814, in driver
hall_of_fame = genetic_solve(logger, options, ga_evaluator)
File "evolve.py", line 526, in genetic_solve
population = initialize_population(logger, options, canary_id, disabled=options["disable_action"])
File "evolve.py", line 495, in initialize_population
p = generate_strategy(logger, options["in-trees"], options["out-trees"], options["in-actions"],
File "evolve.py", line 308, in generate_strategy
strat.initialize(logger, num_in_trees, num_out_trees, num_in_actions, num_out_actions, seed, disabled=disabled)
File "/root/xsd/pk/geneva/actions/strategy.py", line 75, in initialize
self.init_from_scratch(num_in_trees, num_out_trees, num_in_actions, num_out_actions, disabled=disabled)
File "/root/xsd/pk/geneva/actions/strategy.py", line 94, in init_from_scratch
out_tree.initialize(num_out_actions, self.environment_id, disabled=disabled)
File "/root/xsd/pk/geneva/actions/tree.py", line 47, in initialize
self.trigger = actions.trigger.Trigger(None, None, None, environment_id=environment_id)
File "/root/xsd/pk/geneva/actions/trigger.py", line 40, in __init__
self.trigger_type, self.trigger_proto, self.trigger_field, self.trigger_value, self.gas_remaining = Trigger.get_rand_trigger(environment_id, 1)
File "/root/xsd/pk/geneva/actions/trigger.py", line 61, in get_rand_trigger
proto, field, value = actions.utils.get_from_fuzzed_or_real_packet(environment_id, real_packet_probability, enable_options=False, enable_load=False)
File "/root/xsd/pk/geneva/actions/utils.py", line 403, in get_from_fuzzed_or_real_packet
return packet.get_random()
File "/root/xsd/pk/geneva/layers/packet.py", line 235, in get_random
layer = self.get_random_layer()
File "/root/xsd/pk/geneva/layers/packet.py", line 229, in get_random_layer
return self.layers[random.choice(list(self.layers.keys()))]
File "/usr/lib/python3.8/random.py", line 290, in choice
raise IndexError('Cannot choose from an empty sequence') from None
IndexError: Cannot choose from an empty sequence
python3 evolve.py --population 200 --generations 25 --test-type http --server forbidden.org --censor censor4 --server-side
File "/home/abe/geneva/evaluator.py", line 322, in run_docker_client
self.exec_cmd(command)
File "/home/abe/geneva/evaluator.py", line 494, in exec_cmd
subprocess.check_call(command, timeout=60)
File "/usr/lib/python3.9/subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['docker', 'exec', '--privileged', 'client_canary', 'python', 'code/plugins/plugin_client.py', '--server', '172.17.0.4', '--test-type', 'http', '--strategy', "''", '--log', 'debug', '--output-directory', 'trials/2022-06-22_11:40:18', '--server-side', '--port', '3818', '--censor', 'censor4', '--workers', '1', '--bad-word', 'ultrasurf', '--runs', '1', '--fitness-by', 'avg', '--no-engine', '--server', '172.17.0.4', '--wait-for-censor', '--host-header', "''", '--injected-http-contains', "''", '--environment-id', 'canary']' returned non-zero exit status 1.
Exception in thread Thread-1:
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
What should I do if the server is particularly memory hungry?
I'm running NetfilterQueue git version because I couldn't get pip to install it but that shouldn't matter I think.
LOG:
##$ sudo python3 engine.py --server-port 80 --strategy "[TCP:flags:PA]-duplicate(tamper{IP:len:replace:64},)-|" --log debug
2020-01-25 04:13:35 DEBUG:[ENGINE] Engine created with strategy [TCP:flags:PA]-duplicate(tamper{TCP:dataofs:replace:10}(tamper{TCP:chksum:corrupt},),)-| \/ (ID xlez5tdl) to port 80
2020-01-25 04:13:35 DEBUG:[ENGINE] Configuring iptables rules
2020-01-25 04:13:35 DEBUG:[ENGINE] iptables -A OUTPUT -p tcp --dport 80 -j NFQUEUE --queue-num 1
2020-01-25 04:13:35 DEBUG:[ENGINE] iptables -A INPUT -p tcp --sport 80 -j NFQUEUE --queue-num 2
2020-01-25 04:13:35 DEBUG:[ENGINE] iptables -A OUTPUT -p udp --dport 80 -j NFQUEUE --queue-num 1
2020-01-25 04:13:35 DEBUG:[ENGINE] iptables -A INPUT -p udp --sport 80 -j NFQUEUE --queue-num 2
2020-01-25 04:13:36 DEBUG:[ENGINE] NFQueue Initialized after 0
2020-01-25 04:13:37 ERROR:[ENGINE] Exception out of run_nfqueue() (direction=in)
Traceback (most recent call last):
File "engine.py", line 115, in run_nfqueue
nfqueue.run_socket(nfqueue_socket)
SystemError: <method 'run_socket' of 'netfilterqueue.NetfilterQueue' objects> returned NULL without setting an error
2020-01-25 04:13:37 ERROR:[ENGINE] Exception out of run_nfqueue() (direction=out)
Traceback (most recent call last):
File "engine.py", line 115, in run_nfqueue
nfqueue.run_socket(nfqueue_socket)
SystemError: <method 'run_socket' of 'netfilterqueue.NetfilterQueue' objects> returned NULL without setting an error ```
Currently Geneva engine.py
always write log to file with logging level debug regardless of --log
level parameter, but it can be problem when downloading a large file or having too many connections, the log file can grow so quickly
please add windows os support we are in Iran suffering from internet Censorship
tnx a lot
Distributing geneva as python project is desirable because it
I created a draft of how this could look like at https://github.com/VwCSXg/geneva/tree/pyproject.
It mostly works, however some tests are failing or not finishing at all and I didn't manage to run pytest
even on the main branch which is why I can`t really pin down the problems created by refactoring geneva as a package.
Help in fixing those issues would be much appreciated :)
i run :
engine.py --server-port 80 --strategy "[TCP:flags:PA]-duplicate(tamper{TCP:dataofs:replace:10}(tamper{TCP:chksum:corrupt},),)-|" --log debug
it worked fine,so.is it possible engine.py could listen and worked as service in multi ports,such as 1000:1200?
million TKS
I am trying to run the server side evaluation strategy using inbuilt censors with the help of docker.
Cmd : sudo python3 evolve.py --server-side --test-type echo --censor censor2 --log debug
But I am receiving following error:
File "/code/actions/utils.py", line 97, in parse
raise actions.tree.ActionTreeParseError("Failed to parse tree")
actions.tree.ActionTreeParseError: Failed to parse tree
This error got resolved by using this modified command:
sudo python3 evolve.py --strategy "/" --server-side --test-type echo --censor censor2 --log debug
But new error is displayed:
File "/home/chhavi/ACN/Geneva/geneva/evaluator.py", line 256, in run_test
ind.fitness = server.punish_fitness(ind.fitness, self.logger)
AttributeError: 'NoneType' object has no attribute 'punish_fitness'
I think the main cause of above errors are that engine is running from client side rather than server side.
Can you please tell me how to run server side evaluation using dockers.
I can't run it.
# python3 engine.py --server-port 80 --strategy "[TCP:flags:PA]-duplicate(tamper{TCP:dataofs:replace:10}(tamper{TCP:chksum:corrupt},),)-|" --log debug
Traceback (most recent call last):
File "engine.py", line 329, in main
log_level=args["log"])
File "engine.py", line 54, in __init__
self.strategy = actions.utils.parse(string_strategy, self.logger)
File "/root/geneva/actions/utils.py", line 74, in parse
new_tree.parse(str_action, logger)
File "/root/geneva/actions/tree.py", line 180, in parse
if not match or not match[0]:
TypeError: '_sre.SRE_Match' object is not subscriptable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "engine.py", line 338, in <module>
main(vars(get_args()))
File "engine.py", line 334, in main
eng.shutdown_nfqueue()
UnboundLocalError: local variable 'eng' referenced before assignment
Debian GNU/Linux 9.11 (stretch)
This is why we write tests :)
actions\tree.py:458: in pretty_print
DotExporter(newroot).to_picture("tree.png")
C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\anytree\exporter\dotexporter.py:268: in to_picture
check_call(cmd)
C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\subprocess.py:342: in check_call
retcode = call(*popenargs, **kwargs)
C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\subprocess.py:323: in call
with Popen(*popenargs, **kwargs) as p:
C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\subprocess.py:775: in __init__
restore_signals, start_new_session)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <subprocess.Popen object at 0x00000200239E4518>
args = 'dot C:\\Users\\GEHUGHEY\\AppData\\Local\\Temp\\tmpqik02k1j -T png -o tree.png', executable = None
preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None
startupinfo = <subprocess.STARTUPINFO object at 0x00000200239E4A20>, creationflags = 0, shell = False, p2cread = -1
p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, unused_restore_signals = True
unused_start_new_session = False
Add Windows support for Geneva
I found an issue with the location of libc.a in most Debian-based distributions. In most Debian distros, libc.a is not located in /usr/lib64/libc.a, but instead is located in /usr/lib/x86_64-linux-gnu/libc.a. This can cause issues for programs or scripts that rely on the location of libc.a.
To address this issue, I suggest updating any relevant documentation or scripts to reflect the correct location of libc.a in Debian-based distributions. Alternatively, you can use the following installation script to detect the correct location of libc.a based on the distribution being used:
#!/bin/bash
# Find the location of libc.a
LIBC_PATH=$(find /usr/lib /usr/lib64 -name libc.a | head -n 1)
# Check if libc.a was found
if [[ -z "$LIBC_PATH" ]]; then
echo "Error: libc.a not found"
exit 1
fi
echo "Using libc.a located at: $LIBC_PATH"
# Continue with the installation using the correct path to libc.a
This script uses find to search for libc.a in the /usr/lib and /usr/lib64 directories, which are the most common locations for system libraries. The head command is used to return only the first result found, which should be the correct location of libc.a.
when i run the strategies with geneva towards GFW,most of it blocked by RST+3*(RST,ACK).the others are Code 501. 501 means success?or something wrong?
Hi
python3 engine.py --server-port 80 --strategy "\/" --log debug
PIP package scapy-python3 used to provide scapy3k, which was a fork from scapy implementing python3 compatibility since 2016. This package was included in some of the Linux distros under name of python3-scapy. Starting from scapy version 2.4 (released in March, 2018) mainstream scapy supports python3. To reduce any confusion scapy3k was renamed to kamene.
You should use either pip package kamene for scapy3k (see http://github.com/phaethon/kamene for differences in use) or mainstream scapy (pip package scapy, http://github.com/secdev/scapy).
Traceback (most recent call last):
File "/home/msadr471/Documents/App/geneva/engine.py", line 28, in <module>
import layers.packet
File "/home/msadr471/Documents/App/geneva/layers/packet.py", line 4, in <module>
import layers.layer
File "/home/msadr471/Documents/App/geneva/layers/layer.py", line 8, in <module>
from scapy.all import IP, RandIP, UDP, DNS, DNSQR, Raw, TCP, fuzz
File "/home/msadr471/.local/lib/python3.10/site-packages/scapy/all.py", line 5, in <module>
raise Exception(msg)
Exception:
PIP package scapy-python3 used to provide scapy3k, which was a fork from scapy implementing python3 compatibility since 2016. This package was included in some of the Linux distros under name of python3-scapy. Starting from scapy version 2.4 (released in March, 2018) mainstream scapy supports python3. To reduce any confusion scapy3k was renamed to kamene.
You should use either pip package kamene for scapy3k (see http://github.com/phaethon/kamene for differences in use) or mainstream scapy (pip package scapy, http://github.com/secdev/scapy).
sudo python3 engine.py --server-port 80 --strategy "\/" --log debug
Traceback (most recent call last):
File "/home/msadr471/Documents/App/geneva/engine.py", line 22, in <module>
from scapy.layers.inet import IP
ModuleNotFoundError: No module named 'scapy'
what is wrong with scapy?
How do I fix this?
Hi,
I want to know if it is possible to run this on my server and connect to the server with the android client using some protocols like Shadowsocks or OpenVPN to have free internet on my android client or not ?
I ran it all night, why my fitness value has not been high?
I found an issue with the NAT logic in your code. If the source IP address of a packet is changed to the IP address of the front router itself, the router will not perform NAT because the incoming packet is not from local network. As a result, the packet will not be correctly translated.
i have tested this with different routers and didn't work
sudo python3 engine.py --sender-ip myLocalIP --forward-ip destIP --routing-ip myPublicIpOnRouter --server-port 1289 --strategy "[TCP:flags:A]-duplicate(duplicate(duplicate,duplicate),duplicate(duplicate,duplicate(duplicate(duplicate,),)))-|" --log debug
Hi guys, I install geneva successfully. How can use it with Telegram MTProto Protocol?
Thanks in advanced.
Hi, thank you for help in advance...
I get error OSError: Failed to create queue 1.
Python: 3.10.7
Kernel: archlinux 5.19.12-arch1-1-amd64
# python3 engine.py --server-port 80 --strategy "[TCP:flags:PA]-duplicate(tamper{TCP:dataofs:replace:10}(tamper{TCP:chksum:corrupt},),)-|" --log debug
/usr/lib/python3.10/site-packages/scapy/layers/ipsec.py:471: CryptographyDeprecationWarning: Blowfish has been deprecated
cipher=algorithms.Blowfish,
/usr/lib/python3.10/site-packages/scapy/layers/ipsec.py:485: CryptographyDeprecationWarning: CAST5 has been deprecated
cipher=algorithms.CAST5,
WARNING:[ENGINE] No environment ID given, one has been generated (parw9j5p)
DEBUG:[ENGINE] Engine created with strategy [TCP:flags:PA]-duplicate(tamper{TCP:dataofs:replace:10}(tamper{TCP:chksum:corrupt},),)-| \/ (ID parw9j5p) to port 80
DEBUG:[ENGINE] Configuring iptables rules
DEBUG:[ENGINE] iptables -A OUTPUT -p tcp --match tcp --dport 80 -j NFQUEUE --queue-num 2
DEBUG:[ENGINE] iptables -A INPUT -p tcp --match tcp --sport 80 -j NFQUEUE --queue-num 1
DEBUG:[ENGINE] iptables -A OUTPUT -p udp --match udp --dport 80 -j NFQUEUE --queue-num 2
DEBUG:[ENGINE] iptables -A INPUT -p udp --match udp --sport 80 -j NFQUEUE --queue-num 1
Traceback (most recent call last):
File "/opt/anti_c/geneva-master/engine.py", line 470, in <module>
main(vars(get_args()))
File "/opt/anti_c/geneva-master/engine.py", line 454, in main
with Engine(args["server_port"],
File "/opt/anti_c/geneva-master/engine.py", line 130, in __enter__
self.initialize_nfqueue()
File "/opt/anti_c/geneva-master/engine.py", line 272, in initialize_nfqueue
self.in_nfqueue.bind(self.in_queue_num, self.in_callback)
File "netfilterqueue/_impl.pyx", line 270, in netfilterqueue._impl.NetfilterQueue.bind
OSError: Failed to create queue 1.
Another question:Does geneva help me on https too?!
as the title tl;dr easy deploy and less traffic
make a v2ray like proxy tools which can bypass almost network package,except dns resolv package
port to golang which makes easier deploy
Please add instructions to add to Keenetic routers
I'm triying to test Geneva on ArchLinux and I got error: FileNotFoundError: [Errno 2] No such file or directory: b'liblibc.a'
$sudo python3 engine.py --server-port 80 --strategy "[TCP:flags:PA]-duplicate(tamper{TCP:dataofs:replace:10}(tamper{TCP:chksum:corrupt},),)-|" --log debug
python3 engine.py --server-port 80 --strategy "[TCP:flags:PA]-duplicate(tamper{TCP:dataofs:replace:10}(tamper{TCP:chksum:corrupt},),)-|" --log debug
Traceback (most recent call last):
File "/opt/Geneva/geneva/engine.py", line 22, in <module>
from scapy.layers.inet import IP
File "/opt/home/user01/.local/lib/python3.10/site-packages/scapy/layers/inet.py", line 25, in <module>
from scapy.layers.l2 import Ether, Dot3, getmacbyip, CookedLinux, GRE, SNAP, \
File "/opt/home/user01/.local/lib/python3.10/site-packages/scapy/layers/l2.py", line 17, in <module>
from scapy.ansmachine import AnsweringMachine
File "/opt/home/user01/.local/lib/python3.10/site-packages/scapy/ansmachine.py", line 16, in <module>
from scapy.sendrecv import send, sniff
File "/opt/home/user01/.local/lib/python3.10/site-packages/scapy/sendrecv.py", line 35, in <module>
import scapy.route # noqa: F401
File "/opt/home/user01/.local/lib/python3.10/site-packages/scapy/route.py", line 194, in <module>
conf.route = Route()
File "/opt/home/user01/.local/lib/python3.10/site-packages/scapy/route.py", line 27, in __init__
self.resync()
File "/opt/home/user01/.local/lib/python3.10/site-packages/scapy/route.py", line 33, in resync
from scapy.arch import read_routes
File "/opt/home/user01/.local/lib/python3.10/site-packages/scapy/arch/__init__.py", line 28, in <module>
from scapy.arch.bpf.core import get_if_raw_addr
File "/opt/home/user01/.local/lib/python3.10/site-packages/scapy/arch/bpf/core.py", line 31, in <module>
LIBC = cdll.LoadLibrary(find_library("libc"))
File "/usr/lib/python3.10/ctypes/util.py", line 330, in find_library
_get_soname(_findLib_gcc(name)) or _get_soname(_findLib_ld(name))
File "/usr/lib/python3.10/ctypes/util.py", line 147, in _findLib_gcc
if not _is_elf(file):
File "/usr/lib/python3.10/ctypes/util.py", line 99, in _is_elf
with open(filename, 'br') as thefile:
FileNotFoundError: [Errno 2] No such file or directory: b'liblibc.a'
I have been installed all requirements.txt:
python3 -m pip install -r requirements.txt
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pytest in /opt/home/solon/.local/lib/python3.10/site-packages (from -r requirements.txt (line 1)) (7.1.3)
Requirement already satisfied: scapy==2.4.3 in /opt/home/solon/.local/lib/python3.10/site-packages (from -r requirements.txt (line 2)) (2.4.3)
Requirement already satisfied: requests in /usr/lib/python3.10/site-packages (from -r requirements.txt (line 3)) (2.28.2)
Requirement already satisfied: dnspython in /usr/lib/python3.10/site-packages (from -r requirements.txt (line 4)) (2.3.0)
Requirement already satisfied: docker in /opt/home/solon/.local/lib/python3.10/site-packages (from -r requirements.txt (line 5)) (6.0.0)
Requirement already satisfied: anytree in /usr/lib/python3.10/site-packages (from -r requirements.txt (line 6)) (2.8.0)
Requirement already satisfied: graphviz in /opt/home/solon/.local/lib/python3.10/site-packages (from -r requirements.txt (line 7)) (0.20.1)
Requirement already satisfied: netifaces in /usr/lib/python3.10/site-packages (from -r requirements.txt (line 8)) (0.11.0)
Requirement already satisfied: netfilterqueue in /opt/home/solon/.local/lib/python3.10/site-packages (from -r requirements.txt (line 9)) (1.0.0)
Requirement already satisfied: cryptography==3.3.2 in /opt/home/solon/.local/lib/python3.10/site-packages (from -r requirements.txt (line 10)) (3.3.2)
Requirement already satisfied: paramiko in /opt/home/solon/.local/lib/python3.10/site-packages (from -r requirements.txt (line 11)) (2.11.0)
Requirement already satisfied: codecov in /opt/home/solon/.local/lib/python3.10/site-packages (from -r requirements.txt (line 12)) (2.1.12)
Requirement already satisfied: pytest-cov in /opt/home/solon/.local/lib/python3.10/site-packages (from -r requirements.txt (line 13)) (4.0.0)
Requirement already satisfied: tld in /opt/home/solon/.local/lib/python3.10/site-packages (from -r requirements.txt (line 15)) (0.12.6)
Requirement already satisfied: python-dotenv in /opt/home/solon/.local/lib/python3.10/site-packages (from -r requirements.txt (line 16)) (0.21.0)
Requirement already satisfied: mysql-connector in /opt/home/solon/.local/lib/python3.10/site-packages (from -r requirements.txt (line 17)) (2.2.9)
Requirement already satisfied: beautifulsoup4 in /usr/lib/python3.10/site-packages (from -r requirements.txt (line 18)) (4.11.2)
Requirement already satisfied: psutil in /usr/lib/python3.10/site-packages (from -r requirements.txt (line 20)) (5.9.4)
Requirement already satisfied: tqdm in /opt/home/solon/.local/lib/python3.10/site-packages (from -r requirements.txt (line 21)) (4.65.0)
Requirement already satisfied: six>=1.4.1 in /usr/lib/python3.10/site-packages (from cryptography==3.3.2->-r requirements.txt (line 10)) (1.16.0)
Requirement already satisfied: cffi>=1.12 in /usr/lib/python3.10/site-packages (from cryptography==3.3.2->-r requirements.txt (line 10)) (1.15.1)
Requirement already satisfied: tomli>=1.0.0 in /usr/lib/python3.10/site-packages (from pytest->-r requirements.txt (line 1)) (2.0.1)
Requirement already satisfied: py>=1.8.2 in /opt/home/solon/.local/lib/python3.10/site-packages (from pytest->-r requirements.txt (line 1)) (1.11.0)
Requirement already satisfied: iniconfig in /opt/home/solon/.local/lib/python3.10/site-packages (from pytest->-r requirements.txt (line 1)) (1.1.1)
Requirement already satisfied: packaging in /usr/lib/python3.10/site-packages (from pytest->-r requirements.txt (line 1)) (23.0)
Requirement already satisfied: attrs>=19.2.0 in /opt/home/solon/.local/lib/python3.10/site-packages (from pytest->-r requirements.txt (line 1)) (21.4.0)
Requirement already satisfied: pluggy<2.0,>=0.12 in /opt/home/solon/.local/lib/python3.10/site-packages (from pytest->-r requirements.txt (line 1)) (1.0.0)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/lib/python3.10/site-packages (from requests->-r requirements.txt (line 3)) (1.26.13)
Requirement already satisfied: idna<4,>=2.5 in /usr/lib/python3.10/site-packages (from requests->-r requirements.txt (line 3)) (3.4)
Requirement already satisfied: websocket-client>=0.32.0 in /opt/home/solon/.local/lib/python3.10/site-packages (from docker->-r requirements.txt (line 5)) (1.5.1)
Requirement already satisfied: bcrypt>=3.1.3 in /opt/home/solon/.local/lib/python3.10/site-packages (from paramiko->-r requirements.txt (line 11)) (4.0.0)
Requirement already satisfied: pynacl>=1.0.1 in /opt/home/solon/.local/lib/python3.10/site-packages (from paramiko->-r requirements.txt (line 11)) (1.5.0)
Requirement already satisfied: coverage in /opt/home/solon/.local/lib/python3.10/site-packages (from codecov->-r requirements.txt (line 12)) (6.5.0)
Requirement already satisfied: soupsieve>1.2 in /usr/lib/python3.10/site-packages (from beautifulsoup4->-r requirements.txt (line 18)) (2.4)
Requirement already satisfied: pycparser in /usr/lib/python3.10/site-packages (from cffi>=1.12->cryptography==3.3.2->-r requirements.txt (line 10)) (2.21)
Linux user01-pc 6.2.12-arch1-1
Any help is appreciated.
OS: centos 7
systemd service
`[Unit]
Description=Geneva Server
[Service]
Type=simple
User=root
WorkingDirectory=/home/centos/geneva
ExecStart=/usr/bin/python3 /home/centos/geneva/engine.py --server-port mult-ports --strategy "XXXXX"
ExecReload=/bin/kill -HUP $MAINPID
Restart=always
[Install]
WantedBy=multi-user.target`
1st run,type iptables -L,
NFQUEUE tcp -- anywhere anywhere multiport dports XXXX NFQUEUE num 2
NFQUEUE udp -- anywhere anywhere multiport dports XXXX NFQUEUE num 2
then,systemctl restart Geneva.service,
iptbables -L
NFQUEUE tcp -- anywhere anywhere multiport dports XXXX NFQUEUE num 2
NFQUEUE udp -- anywhere anywhere multiport dports XXXX NFQUEUE num 2
NFQUEUE tcp -- anywhere anywhere multiport dports XXXX NFQUEUE num 2
NFQUEUE udp -- anywhere anywhere multiport dports XXXX NFQUEUE num 2
if i do it again,systemctl restart Geneva.service,
iptbables -L showed
NFQUEUE tcp -- anywhere anywhere multiport dports XXXX NFQUEUE num 2
NFQUEUE udp -- anywhere anywhere multiport dports XXXX NFQUEUE num 2
NFQUEUE tcp -- anywhere anywhere multiport dports XXXX NFQUEUE num 2
NFQUEUE udp -- anywhere anywhere multiport dports XXXX NFQUEUE num 2
NFQUEUE tcp -- anywhere anywhere multiport dports XXXX NFQUEUE num 2
NFQUEUE udp -- anywhere anywhere multiport dports XXXX NFQUEUE num 2
After evolving new strategies , where does geneva store strategies that successfully evaded the censorship.
So i run geneva evolve with population of 300 and generation of 25 but was not able to find any working strategy. The censor basically forbids traffic by sending a RST+ACK to both directions (to client and to server). What could be the issue. Is geneva just not effective anymore?
Hello, there are quote in your README that you can run the Geneva from the server side, but i found no docs for this case.
Is there anyway to launch this on router (for example Openwrt) for avoiding DPI. How it will work as a server. May be there are some links I haven't seen.
Trying to test on a fresh Debian 11,
apt-get install build-essential python-dev libnetfilter-queue-dev libffi-dev libssl-dev iptables python3-pip
python3 -m pip install -r requirements.txt
...
Successfully built scapy mysql-connector netfilterqueue
Installing collected packages: pycparser, tomli, pluggy, packaging, iniconfig, exceptiongroup, coverage, charset-normalizer, cffi, soupsieve, requests, pytest, pynacl, cryptography, bcrypt, tqdm, tld, scapy, python-dotenv, pytest-cov, psutil, paramiko, netifaces, netfilterqueue, mysql-connector, graphviz, docker, dnspython, codecov, beautifulsoup4, anytree
Attempting uninstall: requests
Found existing installation: requests 2.25.1
Not uninstalling requests at /usr/lib/python3/dist-packages, outside environment /usr
Can't uninstall 'requests'. No files were found to uninstall.
Successfully installed anytree-2.12.1 bcrypt-4.1.2 beautifulsoup4-4.12.3 cffi-1.16.0 charset-normalizer-3.3.2 codecov-2.1.13 coverage-7.4.3 cryptography-3.3.2 dnspython-2.6.1 docker-7.0.0 exceptiongroup-1.2.0 graphviz-0.20.1 iniconfig-2.0.0 mysql-connector-2.2.9 netfilterqueue-1.1.0 netifaces-0.11.0 packaging-23.2 paramiko-3.4.0 pluggy-1.4.0 psutil-5.9.8 pycparser-2.21 pynacl-1.5.0 pytest-8.0.2 pytest-cov-4.1.0 python-dotenv-1.0.1 requests-2.31.0 scapy-2.4.3 soupsieve-2.5 tld-0.13 tomli-2.0.1 tqdm-4.66.2
trying to test
geneva (master)# python3 ./engine.py --server-port 8080 --strategy "\/" --log debug
Traceback (most recent call last):
File "/opt/app/geneva/./engine.py", line 22, in <module>
from scapy.layers.inet import IP
File "/usr/local/lib/python3.9/dist-packages/scapy/layers/inet.py", line 25, in <module>
from scapy.layers.l2 import Ether, Dot3, getmacbyip, CookedLinux, GRE, SNAP, \
File "/usr/local/lib/python3.9/dist-packages/scapy/layers/l2.py", line 17, in <module>
from scapy.ansmachine import AnsweringMachine
File "/usr/local/lib/python3.9/dist-packages/scapy/ansmachine.py", line 16, in <module>
from scapy.sendrecv import send, sniff
File "/usr/local/lib/python3.9/dist-packages/scapy/sendrecv.py", line 35, in <module>
import scapy.route # noqa: F401
File "/usr/local/lib/python3.9/dist-packages/scapy/route.py", line 194, in <module>
conf.route = Route()
File "/usr/local/lib/python3.9/dist-packages/scapy/route.py", line 27, in __init__
self.resync()
File "/usr/local/lib/python3.9/dist-packages/scapy/route.py", line 33, in resync
from scapy.arch import read_routes
File "/usr/local/lib/python3.9/dist-packages/scapy/arch/__init__.py", line 28, in <module>
from scapy.arch.bpf.core import get_if_raw_addr
File "/usr/local/lib/python3.9/dist-packages/scapy/arch/bpf/core.py", line 31, in <module>
LIBC = cdll.LoadLibrary(find_library("libc"))
File "/usr/lib/python3.9/ctypes/util.py", line 341, in find_library
_get_soname(_findLib_gcc(name)) or _get_soname(_findLib_ld(name))
File "/usr/lib/python3.9/ctypes/util.py", line 147, in _findLib_gcc
if not _is_elf(file):
File "/usr/lib/python3.9/ctypes/util.py", line 99, in _is_elf
with open(filename, 'br') as thefile:
FileNotFoundError: [Errno 2] No such file or directory: b'liblibc.a'
and it seems the lib has been installed
find / -name libc.a
/usr/lib/x86_64-linux-gnu/libc.a
and it seems relevant to #61
python3 -m pip install -r requirements.txt
produces multiple errors when run on Debian 10.
building 'netfilterqueue' extension
creating build
creating build/temp.linux-x86_64-3.7
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.7m -c netfilterqueue.c -o build/temp.linux-x86_64-3.7/netfilterqueue.o
netfilterqueue.c: In function ‘__pyx_f_14netfilterqueue_6Packet_set_nfq_data’:
netfilterqueue.c:2150:68: warning: passing argument 2 of ‘nfq_get_payload’ from incompatible pointer type [-Wincompatible-pointer-types]
__pyx_v_self->payload_len = nfq_get_payload(__pyx_v_self->_nfa, (&__pyx_v_self->payload));
~^~~~~~~~~~~~~~~~~~~~~~~
In file included from netfilterqueue.c:440:
/usr/include/libnetfilter_queue/libnetfilter_queue.h:122:67: note: expected ‘unsigned char **’ but argument is of type ‘char **’
extern int nfq_get_payload(struct nfq_data *nfad, unsigned char **data);
~~~~~~~~~~~~~~~~^~~~
netfilterqueue.c: In function ‘__pyx_pf_14netfilterqueue_6Packet_4get_hw’:
netfilterqueue.c:2533:17: warning: implicit declaration of function ‘PyString_FromStringAndSize’; did you mean ‘PyBytes_FromStringAndSize’? [-Wimplicit-function-declaration]
__pyx_t_3 = PyString_FromStringAndSize(((char *)__pyx_v_self->hw_addr), 8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 111, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~
PyBytes_FromStringAndSize
netfilterqueue.c:2533:15: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
__pyx_t_3 = PyString_FromStringAndSize(((char *)__pyx_v_self->hw_addr), 8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 111, __pyx_L1_error)
^
netfilterqueue.c: In function ‘__Pyx_PyCFunction_FastCall’:
netfilterqueue.c:6436:13: error: too many arguments to function ‘(PyObject * (*)(PyObject *, PyObject * const*, Py_ssize_t))meth’
return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs, NULL);
~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
netfilterqueue.c: In function ‘__Pyx__ExceptionSave’:
netfilterqueue.c:7132:21: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
*type = tstate->exc_type;
^~~~~~~~
curexc_type
netfilterqueue.c:7133:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
*value = tstate->exc_value;
^~~~~~~~~
curexc_value
netfilterqueue.c:7134:19: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
*tb = tstate->exc_traceback;
^~~~~~~~~~~~~
curexc_traceback
netfilterqueue.c: In function ‘__Pyx__ExceptionReset’:
netfilterqueue.c:7141:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
tmp_type = tstate->exc_type;
^~~~~~~~
curexc_type
netfilterqueue.c:7142:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
tmp_value = tstate->exc_value;
^~~~~~~~~
curexc_value
netfilterqueue.c:7143:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
tmp_tb = tstate->exc_traceback;
^~~~~~~~~~~~~
curexc_traceback
netfilterqueue.c:7144:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
tstate->exc_type = type;
^~~~~~~~
curexc_type
netfilterqueue.c:7145:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
tstate->exc_value = value;
^~~~~~~~~
curexc_value
netfilterqueue.c:7146:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
tstate->exc_traceback = tb;
^~~~~~~~~~~~~
curexc_traceback
netfilterqueue.c: In function ‘__Pyx__GetException’:
netfilterqueue.c:7201:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
tmp_type = tstate->exc_type;
^~~~~~~~
curexc_type
netfilterqueue.c:7202:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
tmp_value = tstate->exc_value;
^~~~~~~~~
curexc_value
netfilterqueue.c:7203:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
tmp_tb = tstate->exc_traceback;
^~~~~~~~~~~~~
curexc_traceback
netfilterqueue.c:7204:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
tstate->exc_type = local_type;
^~~~~~~~
curexc_type
netfilterqueue.c:7205:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
tstate->exc_value = local_value;
^~~~~~~~~
curexc_value
netfilterqueue.c:7206:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
tstate->exc_traceback = local_tb;
^~~~~~~~~~~~~
curexc_traceback
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Failed building wheel for netfilterqueue
Running setup.py clean for netfilterqueue
Running setup.py bdist_wheel for mysql-connector ... done
Stored in directory: /home/andy/.cache/pip/wheels/8c/83/a1/f8b6d4bb1bd6208bbde1608bbfa7557504bed9eaf2ecf8c175
Running setup.py bdist_wheel for slackclient ... done
Stored in directory: /home/andy/.cache/pip/wheels/b0/c7/4e/23104e3c04bf4248a1f9e24d82978e910e3ae4761e00f878e5
Running setup.py bdist_wheel for psutil ... done
Stored in directory: /home/andy/.cache/pip/wheels/39/a0/f5/c4fa280463e29aea07797acb5312358fefb067c1f4f98e11b1
Successfully built scapy netifaces mysql-connector slackclient psutil
Failed to build netfilterqueue
slackclient 1.3.1 has requirement websocket-client<0.55.0,>=0.35, but you'll have websocket-client 0.57.0 which is incompatible.
Installing collected packages: attrs, py, zipp, importlib-metadata, pluggy, iniconfig, pyparsing, packaging, toml, more-itertools, pytest, scapy, dnspython, websocket-client, docker, anytree, graphviz, netifaces, netfilterqueue, pycparser, cffi, cryptography, bcrypt, pynacl, paramiko, coverage, codecov, pytest-cov, tld, python-dotenv, mysql-connector, slackclient, soupsieve, beautifulsoup4, psutil, tqdm
The scripts py.test and pytest are installed in '/home/andy/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
The scripts UTscapy and scapy are installed in '/home/andy/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Running setup.py install for netfilterqueue ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-s341lk2z/netfilterqueue/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-4o45wq9_/install-record.txt --single-version-externally-managed --compile --user --prefix=:
running install
running build
running build_ext
building 'netfilterqueue' extension
creating build
creating build/temp.linux-x86_64-3.7
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.7m -c netfilterqueue.c -o build/temp.linux-x86_64-3.7/netfilterqueue.o
netfilterqueue.c: In function ‘__pyx_f_14netfilterqueue_6Packet_set_nfq_data’:
netfilterqueue.c:2150:68: warning: passing argument 2 of ‘nfq_get_payload’ from incompatible pointer type [-Wincompatible-pointer-types]
__pyx_v_self->payload_len = nfq_get_payload(__pyx_v_self->_nfa, (&__pyx_v_self->payload));
~^~~~~~~~~~~~~~~~~~~~~~~
In file included from netfilterqueue.c:440:
/usr/include/libnetfilter_queue/libnetfilter_queue.h:122:67: note: expected ‘unsigned char **’ but argument is of type ‘char **’
extern int nfq_get_payload(struct nfq_data *nfad, unsigned char **data);
~~~~~~~~~~~~~~~~^~~~
netfilterqueue.c: In function ‘__pyx_pf_14netfilterqueue_6Packet_4get_hw’:
netfilterqueue.c:2533:17: warning: implicit declaration of function ‘PyString_FromStringAndSize’; did you mean ‘PyBytes_FromStringAndSize’? [-Wimplicit-function-declaration]
__pyx_t_3 = PyString_FromStringAndSize(((char *)__pyx_v_self->hw_addr), 8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 111, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~
PyBytes_FromStringAndSize
netfilterqueue.c:2533:15: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
__pyx_t_3 = PyString_FromStringAndSize(((char *)__pyx_v_self->hw_addr), 8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 111, __pyx_L1_error)
^
netfilterqueue.c: In function ‘__Pyx_PyCFunction_FastCall’:
netfilterqueue.c:6436:13: error: too many arguments to function ‘(PyObject * (*)(PyObject *, PyObject * const*, Py_ssize_t))meth’
return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs, NULL);
~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
netfilterqueue.c: In function ‘__Pyx__ExceptionSave’:
netfilterqueue.c:7132:21: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
*type = tstate->exc_type;
^~~~~~~~
curexc_type
netfilterqueue.c:7133:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
*value = tstate->exc_value;
^~~~~~~~~
curexc_value
netfilterqueue.c:7134:19: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
*tb = tstate->exc_traceback;
^~~~~~~~~~~~~
curexc_traceback
netfilterqueue.c: In function ‘__Pyx__ExceptionReset’:
netfilterqueue.c:7141:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
tmp_type = tstate->exc_type;
^~~~~~~~
curexc_type
netfilterqueue.c:7142:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
tmp_value = tstate->exc_value;
^~~~~~~~~
curexc_value
netfilterqueue.c:7143:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
tmp_tb = tstate->exc_traceback;
^~~~~~~~~~~~~
curexc_traceback
netfilterqueue.c:7144:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
tstate->exc_type = type;
^~~~~~~~
curexc_type
netfilterqueue.c:7145:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
tstate->exc_value = value;
^~~~~~~~~
curexc_value
netfilterqueue.c:7146:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
tstate->exc_traceback = tb;
^~~~~~~~~~~~~
curexc_traceback
netfilterqueue.c: In function ‘__Pyx__GetException’:
netfilterqueue.c:7201:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
tmp_type = tstate->exc_type;
^~~~~~~~
curexc_type
netfilterqueue.c:7202:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
tmp_value = tstate->exc_value;
^~~~~~~~~
curexc_value
netfilterqueue.c:7203:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
tmp_tb = tstate->exc_traceback;
^~~~~~~~~~~~~
curexc_traceback
netfilterqueue.c:7204:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
tstate->exc_type = local_type;
^~~~~~~~
curexc_type
netfilterqueue.c:7205:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
tstate->exc_value = local_value;
^~~~~~~~~
curexc_value
netfilterqueue.c:7206:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
tstate->exc_traceback = local_tb;
^~~~~~~~~~~~~
curexc_traceback
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-s341lk2z/netfilterqueue/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-4o45wq9_/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-install-s341lk2z/netfilterqueue/
ubuntu@instance-20200501-0913:~/geneva$ sudo python3 engine.py --server-port 80 --strategy "[TCP:flags:PA]-duplicate(tamper{TCP:dataofs:replace:10}(tamper{TCP:chksum:corrupt},),)-|" --log debug
2020-08-24 13:18:59 WARNING:[ENGINE] No environment ID given, one has been generated (w2rlta48)
2020-08-24 13:18:59 DEBUG:[ENGINE] Engine created with strategy [TCP:flags:PA]-duplicate(tamper{TCP:dataofs:replace:10}(tamper{TCP:chksum:corrupt},),)-| \/ (ID w2rlta48) to port 80
2020-08-24 13:18:59 DEBUG:[ENGINE] Configuring iptables rules
2020-08-24 13:18:59 DEBUG:[ENGINE] iptables -A OUTPUT -p tcp --dport 80 -j NFQUEUE --queue-num 2
2020-08-24 13:18:59 DEBUG:[ENGINE] iptables -A INPUT -p tcp --sport 80 -j NFQUEUE --queue-num 1
2020-08-24 13:18:59 DEBUG:[ENGINE] iptables -A OUTPUT -p udp --dport 80 -j NFQUEUE --queue-num 2
2020-08-24 13:18:59 DEBUG:[ENGINE] iptables -A INPUT -p udp --sport 80 -j NFQUEUE --queue-num 1
2020-08-24 13:18:59 DEBUG:[ENGINE] NFQueue Initialized after 0
2020-08-24 13:19:00 ERROR:[ENGINE] Exception out of run_nfqueue() (direction=in)
Traceback (most recent call last):
File "engine.py", line 197, in run_nfqueue
nfqueue.run_socket(nfqueue_socket)
SystemError: <method 'run_socket' of 'netfilterqueue.NetfilterQueue' objects> returned NULL without setting an error
2020-08-24 13:19:00 ERROR:[ENGINE] Exception out of run_nfqueue() (direction=out)
Traceback (most recent call last):
File "engine.py", line 197, in run_nfqueue
nfqueue.run_socket(nfqueue_socket)
SystemError: <method 'run_socket' of 'netfilterqueue.NetfilterQueue' objects> returned NULL without setting an error
OS: Ubuntu 20.04
Any idea on what I can do to help to debug the issue?
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.