nopasaran 0.2.93__tar.gz → 0.2.95__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {nopasaran-0.2.93 → nopasaran-0.2.95}/PKG-INFO +1 -1
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/action_primitives/dns_primitives.py +26 -22
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran.egg-info/PKG-INFO +1 -1
- {nopasaran-0.2.93 → nopasaran-0.2.95}/setup.py +1 -1
- {nopasaran-0.2.93 → nopasaran-0.2.95}/LICENSE +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/README.md +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/__init__.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/__main__.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/controllers/__init__.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/controllers/controller.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/controllers/factory.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/controllers/protocol.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/decorators.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/definitions/__init__.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/definitions/commands.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/definitions/control_channel.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/definitions/events.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/definitions/transitions.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/errors/__init__.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/errors/parsing_error.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/http_2_utils.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/interpreters/__init__.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/interpreters/action_interpreter.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/interpreters/condition_interpreter.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/interpreters/interpreter.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/interpreters/transition_interpreter.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/machines/__init__.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/machines/action_queue.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/machines/state_machine.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/parsers/__init__.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/parsers/interpreter_parser.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/parsers/state_machine_parser.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/__init__.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/action_primitives/__init__.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/action_primitives/action_primitives.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/action_primitives/certificate_primitives.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/action_primitives/client_echo_primitives.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/action_primitives/control_channel_primitives.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/action_primitives/data_channel_primitives.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/action_primitives/data_manipulation.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/action_primitives/event_primitives.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/action_primitives/http_1_request_primitives.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/action_primitives/http_1_response_primitives.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/action_primitives/http_2_client_primitives.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/action_primitives/http_2_server_primitives.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/action_primitives/http_simple_client_primitives.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/action_primitives/https_1_request_primitives.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/action_primitives/https_1_response_primitives.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/action_primitives/icmp_primitives.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/action_primitives/io_primitives.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/action_primitives/ip_primitives.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/action_primitives/nested_machine_utils.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/action_primitives/probing_primitives.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/action_primitives/replay_primitives.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/action_primitives/server_echo_primitives.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/action_primitives/signaling_primitive.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/action_primitives/tcp_primitives.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/action_primitives/timing_primitives.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/action_primitives/tls_primitives.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/action_primitives/udp_primitives.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/condition_primitives/__init__.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/condition_primitives/condition_primitives.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/condition_primitives/variable_comparisons.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/primitives.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/transition_primitives/__init__.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/transition_primitives/assignment_transitions.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/transition_primitives/transition_primitives.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/sniffers/__init__.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/sniffers/sniffer.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/tools/__init__.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/tools/checks.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/tools/echo_socket_server.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/tools/http_1_socket_server.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/tools/http_2_overwrite.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/tools/http_2_socket_base.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/tools/http_2_socket_client.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/tools/http_2_socket_server.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/tools/https_1_socket_server.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/utils.py +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran.egg-info/SOURCES.txt +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran.egg-info/dependency_links.txt +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran.egg-info/entry_points.txt +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran.egg-info/requires.txt +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran.egg-info/top_level.txt +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/setup.cfg +0 -0
- {nopasaran-0.2.93 → nopasaran-0.2.95}/tests/__init__.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: nopasaran
|
3
|
-
Version: 0.2.
|
3
|
+
Version: 0.2.95
|
4
4
|
Summary: NoPASARAN is an advanced network tool designed to detect, fingerprint, and locate network middleboxes in a unified framework.
|
5
5
|
Home-page: https://github.com/BenIlies/NoPASARAN
|
6
6
|
Author: Ilies Benhabbour
|
{nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/action_primitives/dns_primitives.py
RENAMED
@@ -386,7 +386,7 @@ class DNSPrimitives:
|
|
386
386
|
"""
|
387
387
|
dns_query = state_machine.get_variable_value(inputs[0])
|
388
388
|
new_query_type = state_machine.get_variable_value(inputs[1])
|
389
|
-
dns_query.qtype = new_query_type
|
389
|
+
dns_query.qtype = int(new_query_type)
|
390
390
|
state_machine.set_variable_value(outputs[0], dns_query)
|
391
391
|
|
392
392
|
@staticmethod
|
@@ -838,6 +838,7 @@ class DNSPrimitives:
|
|
838
838
|
|
839
839
|
dns_layer = None
|
840
840
|
|
841
|
+
# Try to extract DNS layer directly or from Raw
|
841
842
|
if hasattr(packet, 'haslayer') and packet.haslayer(DNS):
|
842
843
|
dns_layer = packet.getlayer(DNS)
|
843
844
|
elif hasattr(packet, 'haslayer') and packet.haslayer('Raw'):
|
@@ -863,9 +864,9 @@ class DNSPrimitives:
|
|
863
864
|
"answers": []
|
864
865
|
}
|
865
866
|
|
866
|
-
#
|
867
|
-
|
868
|
-
|
867
|
+
# Parse questions
|
868
|
+
try:
|
869
|
+
if getattr(dns_layer, "qdcount", 0) > 0 and getattr(dns_layer, "qd", None):
|
869
870
|
question = dns_layer.qd
|
870
871
|
formatted_response["questions"].append({
|
871
872
|
"qname": question.qname.decode() if isinstance(question.qname, bytes) else question.qname,
|
@@ -873,26 +874,29 @@ class DNSPrimitives:
|
|
873
874
|
"qtype_name": dnsatypes.get(question.qtype, f"Unknown({question.qtype})"),
|
874
875
|
"qclass": question.qclass
|
875
876
|
})
|
876
|
-
|
877
|
-
|
877
|
+
except Exception as e:
|
878
|
+
logging.error(f"[Parsing] Failed to parse DNS question: {e}")
|
878
879
|
|
879
|
-
#
|
880
|
+
# Parse answers (assuming it's a list or iterable)
|
880
881
|
try:
|
881
|
-
|
882
|
-
|
883
|
-
|
884
|
-
|
885
|
-
|
886
|
-
|
887
|
-
|
888
|
-
|
889
|
-
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
|
895
|
-
|
882
|
+
answers = dns_layer.an
|
883
|
+
if isinstance(answers, list):
|
884
|
+
answer_rrs = answers
|
885
|
+
else:
|
886
|
+
answer_rrs = [answers] # wrap single DNSRR for uniform handling
|
887
|
+
|
888
|
+
for ans in answer_rrs:
|
889
|
+
if isinstance(ans, DNSRR):
|
890
|
+
answer_info = {
|
891
|
+
"rrname": ans.rrname.decode() if isinstance(ans.rrname, bytes) else ans.rrname,
|
892
|
+
"type": ans.type,
|
893
|
+
"type_name": dnsatypes.get(ans.type, f"Unknown({ans.type})"),
|
894
|
+
"rclass": ans.rclass,
|
895
|
+
"ttl": ans.ttl,
|
896
|
+
"rdata": ans.rdata.decode() if isinstance(ans.rdata, bytes) else str(ans.rdata),
|
897
|
+
"rdlen": getattr(ans, "rdlen", None)
|
898
|
+
}
|
899
|
+
formatted_response["answers"].append(answer_info)
|
896
900
|
except Exception as e:
|
897
901
|
logging.error(f"[Parsing] Failed to parse DNS answers: {e}")
|
898
902
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: nopasaran
|
3
|
-
Version: 0.2.
|
3
|
+
Version: 0.2.95
|
4
4
|
Summary: NoPASARAN is an advanced network tool designed to detect, fingerprint, and locate network middleboxes in a unified framework.
|
5
5
|
Home-page: https://github.com/BenIlies/NoPASARAN
|
6
6
|
Author: Ilies Benhabbour
|
@@ -13,7 +13,7 @@ with open(requirements_file, "r") as f:
|
|
13
13
|
# Version will automatically be updated when pushed on the main branch
|
14
14
|
setup(
|
15
15
|
name="nopasaran",
|
16
|
-
version='0.2.
|
16
|
+
version='0.2.95',
|
17
17
|
author="Ilies Benhabbour",
|
18
18
|
author_email="ilies.benhabbour@kaust.edu.sa",
|
19
19
|
description="NoPASARAN is an advanced network tool designed to detect, fingerprint, and locate network middleboxes in a unified framework.",
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/action_primitives/action_primitives.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/action_primitives/data_manipulation.py
RENAMED
File without changes
|
{nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/action_primitives/event_primitives.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/action_primitives/icmp_primitives.py
RENAMED
File without changes
|
{nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/action_primitives/io_primitives.py
RENAMED
File without changes
|
{nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/action_primitives/ip_primitives.py
RENAMED
File without changes
|
{nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/action_primitives/nested_machine_utils.py
RENAMED
File without changes
|
{nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/action_primitives/probing_primitives.py
RENAMED
File without changes
|
{nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/action_primitives/replay_primitives.py
RENAMED
File without changes
|
File without changes
|
{nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/action_primitives/signaling_primitive.py
RENAMED
File without changes
|
{nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/action_primitives/tcp_primitives.py
RENAMED
File without changes
|
{nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/action_primitives/timing_primitives.py
RENAMED
File without changes
|
{nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/action_primitives/tls_primitives.py
RENAMED
File without changes
|
{nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/action_primitives/udp_primitives.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{nopasaran-0.2.93 → nopasaran-0.2.95}/nopasaran/primitives/transition_primitives/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|