Skip to content

Commit

Permalink
change timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
SirGankalot committed Jun 4, 2024
1 parent b4bbea3 commit fdc98e1
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions checker/src/checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,8 @@
checker = Enochecker("whatsscam", 9696)
def app(): return checker.app

timeout = httpx.Timeout(
50.0, # Connect timeout
read=100.0, # Read timeout
write=100.0, # Write timeout
pool=50.0 # Pool timeout
)

#timeout = 5.0
timeout = 10.0


"""
Expand All @@ -72,7 +67,7 @@ async def putflag_test(
start = datetime.datetime.now()
for i in range(0, 4):
try:
email_1, password1_1 = await checker_util_func.create_user(client, logger, public_key='on')
email_1, password1_1 = await checker_util_func.create_user(client, logger, public_key='on', timeout = timeout)
break
except:
print("time taken: ", datetime.datetime.now() - start)
Expand Down Expand Up @@ -173,7 +168,6 @@ async def exploit_test(
logger: LoggerAdapter,
searcher: FlagSearcher,
) -> None:
#timeout = (5.0, 30.0)
if "@example.com" in task.attack_info:
logger.info("attack_info is good")
else:
Expand Down Expand Up @@ -250,7 +244,7 @@ async def putnoise0(

start = datetime.datetime.now()
try:
email_1, password1_1 = await checker_util_func.create_user(client, logger, public_key='on')
email_1, password1_1 = await checker_util_func.create_user(client, logger, public_key='on', timeout = timeout)
except:
print("time taken: ", datetime.datetime.now() - start)
raise MumbleException("Could not create user 1")
Expand Down Expand Up @@ -347,7 +341,7 @@ async def havoc0(
) -> None:
start = datetime.datetime.now()
try:
email_1, password1_1 = await checker_util_func.create_user(client, logger, public_key='on')
email_1, password1_1 = await checker_util_func.create_user(client, logger, public_key='on', timeout = timeout)
except:
print("time taken: ", datetime.datetime.now() - start)
raise MumbleException("Could not create user 1 with public key")
Expand Down

0 comments on commit fdc98e1

Please sign in to comment.