pip3 install pipreqs
pipreqs /path/to/project
# OR
pipreqs $(pwd)# Manually check the requirements.txt also by installing pip3 install -r requirements.txt
# Below "import" <insert_package_names>timeout=NonedefimAFunction():ifi>timeout:print("Greater than timeout")# Inside function. In this example main()globaltimeouttimeout=args.timeout
When using proxy (i.e. Burp), rather than using verify=False in the request.get or request.post, convert the Burp certificate cacert.der instead to cacert.pem then use in on python requests. 2
Most common use case is the usage of burp certificate for python requests SSL error.
1
2
3
# Converting cacert.der to cacert.pem# openssl x509 -in cacert.der -inform DER -outform PEM -out cacert.pemr=session.post(burp0_url,headers=burp0_headers,data=burp0_data,proxies=proxies,verify="cacert.pem")