nopasaran 0.2.103__py3-none-any.whl → 0.2.105__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.
@@ -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[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[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.103
3
+ Version: 0.2.105
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
@@ -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=A3nqlc-EPR1_iQIYo-OuXcVG2bn7MlhHmegzmSkjffw,7969
80
+ nopasaran/tools/udp_dns_socket_server.py,sha256=jdigPcNn0J2lKYY_ElxtDbx2aDO5GBfd-i5bULWGP1g,5605
81
81
  tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
82
- nopasaran-0.2.103.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
83
- nopasaran-0.2.103.dist-info/METADATA,sha256=Ptcyp4290Mm-VMUarJ0481s9IXx87gm-Z0Im8K6Xn0s,5497
84
- nopasaran-0.2.103.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
85
- nopasaran-0.2.103.dist-info/entry_points.txt,sha256=LaOz5GlWuMLjzg4KOEB5OVTattCXVW6a4nSW-WQajCw,55
86
- nopasaran-0.2.103.dist-info/top_level.txt,sha256=60R1FzpprzU8iiJ1cBMNOA0F083_lYoctFo7pzOpMwY,16
87
- nopasaran-0.2.103.dist-info/RECORD,,
82
+ nopasaran-0.2.105.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
83
+ nopasaran-0.2.105.dist-info/METADATA,sha256=em1tUajptRAxXlFoKURrV9kP96KZFXoMWLggJtjotS8,5497
84
+ nopasaran-0.2.105.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
85
+ nopasaran-0.2.105.dist-info/entry_points.txt,sha256=LaOz5GlWuMLjzg4KOEB5OVTattCXVW6a4nSW-WQajCw,55
86
+ nopasaran-0.2.105.dist-info/top_level.txt,sha256=60R1FzpprzU8iiJ1cBMNOA0F083_lYoctFo7pzOpMwY,16
87
+ nopasaran-0.2.105.dist-info/RECORD,,