16 lines
550 B
Python
16 lines
550 B
Python
import getpass
|
|
import threading
|
|
import requests
|
|
import time
|
|
from requests.auth import HTTPBasicAuth
|
|
|
|
def timer(func, *args, **kwargs):
|
|
then = time.time()
|
|
func(*args, **kwargs)
|
|
print(time.time() - then)
|
|
|
|
user = getpass.getuser()
|
|
password = getpass.getpass()
|
|
me = lambda num: print(num) or print(requests.get('https://ldapi.apps-test.aws.e1.nwie.net/me/', verify="/etc/ssl/ca-bundle.pem", auth=HTTPBasicAuth(user, password)))
|
|
threadme = lambda num: threading.Thread(target=timer, args=(me, num)).start()
|
|
[threadme(y) for y in range(0,1000)] |