Skip to content

Commit

Permalink
put in get flag to check if mistake resolves
Browse files Browse the repository at this point in the history
  • Loading branch information
SirGankalot committed May 24, 2024
1 parent 0a8dbed commit 40260c9
Showing 1 changed file with 32 additions and 22 deletions.
54 changes: 32 additions & 22 deletions checker/src/checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ async def exploit_test(
async def putnoise0(
task: PutnoiseCheckerTaskMessage,
db: ChainDB,
logger: LoggerAdapter,
logger: LoggerAdapter
) -> None:
try:
client = AsyncClient(
Expand Down Expand Up @@ -344,33 +344,43 @@ async def getnoise0(
task: GetnoiseCheckerTaskMessage,
db: ChainDB,
logger: LoggerAdapter,
conn: AsyncSocket,
) -> None:
try:
client = AsyncClient(
base_url=f"http://{task.address}:{SERVICE_PORT}",
#timeout=timeout
)
except:
raise MumbleException("Could not connect to service")
try:
email, password, note = await db.get("userdata")
except KeyError:
raise MumbleException("Missing database entry from putnoise")
for i in range(0, 2):
try:
client = AsyncClient(
base_url=f"http://{task.address}:{SERVICE_PORT}",
#timeout=timeout
)
break
except:
raise MumbleException("Could not connect to service")
start_time = datetime.datetime.now()

for i in range(0, 2):
try:
email, password, Note = await db.get("userdata")
break
except KeyError:
raise MumbleException("Missing database entry from putflag")

success = True
for i in range(0,4):
print("userdata dauer" , datetime.datetime.now()-start_time)
for i in range(0, 2):
try:
await checker_util_func.login_user(db, client, logger, email, password)
break
except:
success = False
if not success:
raise MumbleException("Could not login user")

try:
await checker_util_func.get_note(db, client, logger, note = note)
except:
raise MumbleException("Could not get note")
print("login_user" , datetime.datetime.now()-start_time)
for i in range(0, 2):
try:
await checker_util_func.get_note(db, client, logger, note = str(Note))
print("get_note" , datetime.datetime.now()-start_time)
break
except:
raise MumbleException("Could not get note")
end_time = datetime.datetime.now()
print("getflag hier end")
print("Time taken getflag 0: ", end_time-start_time)



Expand Down

0 comments on commit 40260c9

Please sign in to comment.