Skip to content

Commit 38a240a

Browse files
committed
raise errors instead of exitting
1 parent 8151077 commit 38a240a

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# <img src="https://github.com/nxenon/h2spacex/assets/61124903/fd6387bf-15e8-4a5d-816b-cf5e079e07cc" width="20%" valign="middle" alt="H2SpaceX" />&nbsp;&nbsp; H2SpaceX
22

3-
[![pypi: 1.1.0](https://img.shields.io/badge/pypi-1.1.0-8c34eb.svg)](https://pypi.org/project/h2spacex/)
3+
[![pypi: 1.1.2](https://img.shields.io/badge/pypi-1.1.2-8c34eb.svg)](https://pypi.org/project/h2spacex/)
44
[![Python: 3.10](https://img.shields.io/badge/Python->=3.10-blue.svg)](https://www.python.org)
55
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-006112.svg)](https://github.com/nxenon/h2spacex/blob/main/LICENSE)
66

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "h2spacex"
7-
version = "1.1.0"
7+
version = "1.1.2"
88
authors = [
99
{ name="nxenon", email="[email protected]" },
1010
]

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setup(
77
name='h2spacex',
8-
version='1.1.0',
8+
version='1.1.2',
99
description='HTTP/2 Single Packet Attack low level library based on Scapy',
1010
package_dir={"": "src"},
1111
packages=find_packages(where="src"),

src/h2spacex/h2_connection.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def __thread_response_frame_parsing(self, _timeout=0.5, print_responses=False):
7474
self.read_response_from_socket_with_time(_timeout=_timeout)
7575

7676
except KeyboardInterrupt:
77-
exit()
77+
return
7878

7979
self.is_threaded_response_finished = True
8080

@@ -90,7 +90,7 @@ def start_thread_response_parsing(self, _timeout=0.5, print_responses=False):
9090
Thread(target=self.__thread_response_frame_parsing, args=(_timeout, print_responses,)).start()
9191
except KeyboardInterrupt:
9292
self.is_threaded_response_finished = None
93-
exit()
93+
return
9494

9595
def _create_socks_socket(self):
9696
"""

src/h2spacex/h2_frames.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ def create_ping_frame(ping_data='12345678', is_ack=0):
331331

332332
if len(ping_data) != 8:
333333
logger.logger_print('ping frame payload must be 8 in length! --> ' + ping_data + ' is invalid!')
334-
exit()
334+
raise ValueError('ping frame payload must be 8 in length! --> ' + ping_data + ' is invalid!')
335335

336336
if is_ack:
337337
ping_frame = h2.H2Frame(flags={'A'})

src/h2spacex/h2_tls_connection.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def setup_connection(self):
2323
except Exception as e:
2424
t = '# Error in setting the connection up : ' + str(e)
2525
logger.logger_print(t)
26-
exit(1)
26+
raise e
2727

2828
else:
2929
self.is_connection_closed = False

0 commit comments

Comments
 (0)