Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
shelld3v committed Nov 6, 2022
1 parent ac000e4 commit 296e816
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
3 changes: 0 additions & 3 deletions lib/controller/controller.py
Expand Up @@ -45,7 +45,6 @@
EXTENSION_RECOGNITION_REGEX,
MAX_CONSECUTIVE_REQUEST_ERRORS,
NEW_LINE,
REFRESH_RATE,
SCRIPT_PATH,
STANDARD_PORTS,
UNKNOWN,
Expand Down Expand Up @@ -545,8 +544,6 @@ def process(self):
"Runtime exceeded the maximum set by the user"
)

time.sleep(REFRESH_RATE)

break

except KeyboardInterrupt:
Expand Down
7 changes: 3 additions & 4 deletions lib/core/fuzzer.py
Expand Up @@ -27,7 +27,6 @@
from lib.core.settings import (
DEFAULT_TEST_PREFIXES,
DEFAULT_TEST_SUFFIXES,
THREAD_WAITING_TIMEOUT,
WILDCARD_TEST_POINT_MARKER,
)
from lib.parse.url import clean_path
Expand Down Expand Up @@ -140,7 +139,7 @@ def pause(self):
# Wait for all threads to stop
for thread in self._threads:
if thread.is_alive():
self._pause_semaphore.acquire(THREAD_WAITING_TIMEOUT)
self._pause_semaphore.acquire()

def quit(self):
self._quit_event.set()
Expand Down Expand Up @@ -249,6 +248,8 @@ def thread_proc(self):
continue

finally:
time.sleep(options["delay"])

if not self._play_event.is_set():
logger.info(f'THREAD-{threading.get_ident()} paused"')
self._pause_semaphore.release()
Expand All @@ -257,5 +258,3 @@ def thread_proc(self):

if self._quit_event.is_set():
break

time.sleep(options["delay"])
4 changes: 0 additions & 4 deletions lib/core/settings.py
Expand Up @@ -120,10 +120,6 @@

MAX_CONSECUTIVE_REQUEST_ERRORS = 75

THREAD_WAITING_TIMEOUT = 6

REFRESH_RATE = 0.75

URL_SAFE_CHARS = string.punctuation

TEXT_CHARS = bytearray({7, 8, 9, 10, 12, 13, 27} | set(range(0x20, 0x100)) - {0x7F})

1 comment on commit 296e816

@cmcm951102
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why remove the sleep fucntion in "lib/controller/controller.py"??? remove it cause high CPU consumption on my pc

Please sign in to comment.