Skip to content

Instantly share code, notes, and snippets.

View OlegKorn's full-sized avatar
💭
SEEK FOR A JUNIOR QA JOB

O OlegKorn

💭
SEEK FOR A JUNIOR QA JOB
View GitHub Profile
#!/usr/bin/env python
"""Find domains on ip address using a ssl certificate"""
import argparse
import ipaddress
import logging
import os
import socket
import ssl
import sys
import tempfile
@OlegKorn
OlegKorn / useful_python_snippets.py
Created August 20, 2021 03:49 — forked from fomightez/useful_python_snippets.py
Useful Python snippets
# These are meant to work in both Python 2 and 3, except where noted.
# See my useful_pandas_snippets.py for those related to dataframes (such as pickling/`df.to_pickle(save_as)`)
# https://gist.github.com/fomightez/ef57387b5d23106fabd4e02dab6819b4
# also see https://gist.github.com/fomightez/324b7446dc08e56c83fa2d7af2b89a33 for examples of my
# frequently used Python functions and slight variations for more expanded, modular structures.
#argparse
# good snippet collection at https://mkaz.tech/code/python-argparse-cookbook/
import requests
proxies = {"http": "socks5://localhost:9050", "https": "socks5://localhost:9050"}
r = requests.get("http://ifconfig.me", proxies=proxies)
print(r.text)