nopasaran 0.2.102__py3-none-any.whl → 0.2.104__py3-none-any.whl

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.
@@ -13,7 +13,7 @@ class TCPDNSResponsePrimitives:
13
13
  @parsing_decorator(input_args=3, output_args=0)
14
14
  def start_tcp_dns_server(inputs, outputs, state_machine):
15
15
  server = state_machine.get_variable_value(inputs[0])
16
- listening_ip = int(state_machine.get_variable_value(inputs[1]))
16
+ listening_ip = state_machine.get_variable_value(inputs[1])
17
17
  port = int(state_machine.get_variable_value(inputs[2]))
18
18
  server.start(listening_ip, port)
19
19
 
@@ -13,7 +13,7 @@ class UDPDNSResponsePrimitives:
13
13
  @parsing_decorator(input_args=3, output_args=0)
14
14
  def start_udp_dns_server(inputs, outputs, state_machine):
15
15
  server = state_machine.get_variable_value(inputs[0])
16
- listening_ip = int(state_machine.get_variable_value(inputs[1]))
16
+ listening_ip = state_machine.get_variable_value(inputs[1])
17
17
  port = int(state_machine.get_variable_value(inputs[2]))
18
18
  server.start(listening_ip, port)
19
19
 
@@ -124,13 +124,13 @@ class TCPDNSSocketServer:
124
124
  logging.warning(f"No handler for response_type: {response_type}")
125
125
  return query_record.reply()
126
126
 
127
- reverse_qtype = {QTYPE[k]: k for k in QTYPE if isinstance(k, int)}
128
- rtype = reverse_qtype.get(response_type)
129
- if rtype is None:
130
- logging.warning(f"Unsupported response_type: {response_type}")
131
- return query_record.reply()
132
-
133
127
  try:
128
+ # Get the numeric type directly from the string using QTYPE
129
+ rtype = QTYPE.get(response_type)
130
+ if rtype is None:
131
+ logging.warning(f"Unsupported response_type: {response_type}")
132
+ return query_record.reply()
133
+
134
134
  logging.debug(f"Calling handler for type {response_type}")
135
135
  rdata = handler()
136
136
  logging.debug(f"Handler produced rdata: {rdata}")
@@ -76,13 +76,13 @@ class UDPDNSSocketServer:
76
76
  logging.warning(f"No handler for response_type: {response_type}")
77
77
  return query_record.reply()
78
78
 
79
- reverse_qtype = {QTYPE[k]: k for k in QTYPE if isinstance(k, int)}
80
- rtype = reverse_qtype.get(response_type)
81
- if rtype is None:
82
- logging.warning(f"Unsupported response_type: {response_type}")
83
- return query_record.reply()
84
-
85
79
  try:
80
+ # Get the numeric type directly from the string using QTYPE
81
+ rtype = QTYPE.get(response_type)
82
+ if rtype is None:
83
+ logging.warning(f"Unsupported response_type: {response_type}")
84
+ return query_record.reply()
85
+
86
86
  logging.debug(f"Calling handler for type {response_type}")
87
87
  rdata = handler()
88
88
  logging.debug(f"Handler produced rdata: {rdata}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nopasaran
3
- Version: 0.2.102
3
+ Version: 0.2.104
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
@@ -52,12 +52,12 @@ nopasaran/primitives/action_primitives/replay_primitives.py,sha256=pRMq6eZsm82rf
52
52
  nopasaran/primitives/action_primitives/server_echo_primitives.py,sha256=CSw99moDTUqWnwJ19kcLmsRsUZfsysWk50N8pJWqcbo,6660
53
53
  nopasaran/primitives/action_primitives/signaling_primitive.py,sha256=4gmG3r5lXX1KsicPwepGTrnouNpc6j0Bkf8pV5jJTmw,6634
54
54
  nopasaran/primitives/action_primitives/tcp_dns_request_primitives.py,sha256=sJGSc0bl7LtE_dFE0ezj1HWvY-cWEIUBQuXaQAVk2K0,1328
55
- nopasaran/primitives/action_primitives/tcp_dns_response_primitives.py,sha256=kxePHX62tdKpcce--RsbC9pRwNVg-v_z_lKAEioiwP0,1728
55
+ nopasaran/primitives/action_primitives/tcp_dns_response_primitives.py,sha256=8NpalonWkFZHp466AeFuomtUpjE51f4rcoOdhMbSG9k,1723
56
56
  nopasaran/primitives/action_primitives/tcp_primitives.py,sha256=H4lpqeL5uhqqwC0RYrelO0BlrTocrfGl4dbd6FUi5FI,16909
57
57
  nopasaran/primitives/action_primitives/timing_primitives.py,sha256=hq4Q2_9nbL9ihf5TRAMRPWZuybqP4CXZxfstelAF6R8,980
58
58
  nopasaran/primitives/action_primitives/tls_primitives.py,sha256=UZ-bwYBDCVxPrZjodGTTdICYGjfA9WPymIAqaOeaZYI,6163
59
59
  nopasaran/primitives/action_primitives/udp_dns_request_primitives.py,sha256=p-FsvWJUDTOI34oeuV46oPh8FEvT0LR23lc_oAwuNI8,1328
60
- nopasaran/primitives/action_primitives/udp_dns_response_primitives.py,sha256=MpuVE66QIa6U2T1WjCel4cPfqdO4UipeLLCM1DxBzYY,1743
60
+ nopasaran/primitives/action_primitives/udp_dns_response_primitives.py,sha256=qmh_AnwayX9gfA6qC8hQn-KmggZeubkqlCMnveSgryM,1738
61
61
  nopasaran/primitives/action_primitives/udp_primitives.py,sha256=SHYzi1FS4EEIssSwMEUOTyQlSnyung8iWR6LzJLrarM,7533
62
62
  nopasaran/primitives/condition_primitives/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
63
63
  nopasaran/primitives/condition_primitives/condition_primitives.py,sha256=-AQdtK_lQfy7Qo3CVVII8MKPKtE9nvea2fh8sDOjdlc,307
@@ -76,12 +76,12 @@ nopasaran/tools/http_2_socket_base.py,sha256=KDfkU4Nr_TXxqzp1-ZHec_UawfDZ5oIIj-J
76
76
  nopasaran/tools/http_2_socket_client.py,sha256=5mmc8FuT2dNVAihbMdvyytVwME_xSc7mez_jwU3YZOA,6256
77
77
  nopasaran/tools/http_2_socket_server.py,sha256=8W-bxmdoGyK5moxpC87V1EGuZ9jJpIKhokvZrDV84kk,5551
78
78
  nopasaran/tools/https_1_socket_server.py,sha256=ytLVYdH5je4L6ElCKKhhsbU_53gT6QF9l5ym7q5TMmo,8162
79
- nopasaran/tools/tcp_dns_socket_server.py,sha256=SoocyqybKYeU0Oq4Zjk2bkekWWQ2GGmZYUc6MbvSIyE,7968
80
- nopasaran/tools/udp_dns_socket_server.py,sha256=5V-iELbdqM1zGSpZU2T8HqkHgiQqZtKXaSO-MqnSeaI,5604
79
+ nopasaran/tools/tcp_dns_socket_server.py,sha256=smZVhE8m1sLW1NsPxB13EN3Ox87t9pBOIR9ScWiRMwk,7973
80
+ nopasaran/tools/udp_dns_socket_server.py,sha256=6LHIeczpn_QZZWSOhZBDqS_zSkLUMW6Ywr3yKsMqZe4,5609
81
81
  tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
82
- nopasaran-0.2.102.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
83
- nopasaran-0.2.102.dist-info/METADATA,sha256=8t0cs78NA8q-fX3Gsn_yMXc_CF2xv44hGyYcko18b9Y,5497
84
- nopasaran-0.2.102.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
85
- nopasaran-0.2.102.dist-info/entry_points.txt,sha256=LaOz5GlWuMLjzg4KOEB5OVTattCXVW6a4nSW-WQajCw,55
86
- nopasaran-0.2.102.dist-info/top_level.txt,sha256=60R1FzpprzU8iiJ1cBMNOA0F083_lYoctFo7pzOpMwY,16
87
- nopasaran-0.2.102.dist-info/RECORD,,
82
+ nopasaran-0.2.104.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
83
+ nopasaran-0.2.104.dist-info/METADATA,sha256=iQ5HflMdRKpAS7wKRmOqFlnqrx0V0zc1smfiHC7vzn8,5497
84
+ nopasaran-0.2.104.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
85
+ nopasaran-0.2.104.dist-info/entry_points.txt,sha256=LaOz5GlWuMLjzg4KOEB5OVTattCXVW6a4nSW-WQajCw,55
86
+ nopasaran-0.2.104.dist-info/top_level.txt,sha256=60R1FzpprzU8iiJ1cBMNOA0F083_lYoctFo7pzOpMwY,16
87
+ nopasaran-0.2.104.dist-info/RECORD,,