import requests
import os
import sys
import inspect

def start():
    print("""
    
░██╗░░░░░░░██╗███████╗██████╗░██╗███╗░░██╗░██████╗██████╗░███████╗░█████╗░████████╗
░██║░░██╗░░██║██╔════╝██╔══██╗██║████╗░██║██╔════╝██╔══██╗██╔════╝██╔══██╗╚══██╔══╝
░╚██╗████╗██╔╝█████╗░░██████╦╝██║██╔██╗██║╚█████╗░██████╔╝█████╗░░██║░░╚═╝░░░██║░░░
░░████╔═████║░██╔══╝░░██╔══██╗██║██║╚████║░╚═══██╗██╔═══╝░██╔══╝░░██║░░██╗░░░██║░░░
░░╚██╔╝░╚██╔╝░███████╗██████╦╝██║██║░╚███║██████╔╝██║░░░░░███████╗╚█████╔╝░░░██║░░░
░░░╚═╝░░░╚═╝░░╚══════╝╚═════╝░╚═╝╚═╝░░╚══╝╚═════╝░╚═╝░░░░░╚══════╝░╚════╝░░░░╚═╝░░░

    """)
    print("")
    print("WEBINSPECT Framework 2.0")

start()

def getHTMLCODE():
    website = input(str("Enter the website: "))
    if "http://" not in website and "https://" not in website:
        website = 'http://' + website
    r = requests.get(website)
    print(r.text)

def getANDDOWNLOADIMAGE():
    website = input(str("Enter the picture link: "))
    filename = input(str("Enter the image name that you want for it to be: "))
    r = requests.get(website)
    with open(filename, 'wb') as f:
        f.write(r.content)
def getRequest():
    website = input(str("Enter the website: "))
    if "http://" not in website and "https://" not in website:
        website = 'http://' + website
    r = requests.get(website)
    print(r)
def getWEBSITEHEADERS():
    website = input(str("Enter the website: "))
    if "http://" not in website and "https://" not in website:
        website = 'http://' + website
    r = requests.get(website)
    print(r.headers)
def getWEBSITEOKINFOR():
    website = input(str("Enter the website: "))
    if "http://" not in website and "https://" not in website:
        website = 'http://' + website
    r = requests.get(website)
    print(r.ok)
def getWEBSITECOOKIES():
    website = input(str("Enter the website: "))
    if "http://" not in website and "https://" not in website:
        website = 'http://' + website
    r = requests.get(website)
    print(r.cookies)
def getWEBSITEURL():
    website = input(str("Enter the website: "))
    if "http://" not in website and "https://" not in website:
        website = 'http://' + website
    r = requests.get(website)
    print(r.url)
def sendREQUEST():
    website = input(str("Enter the website: "))
    username = input(str("Enter the username that you want to try: "))
    password = input(str("Enter the password that you want to try: "))
    payload = {'username': username, 'password': password}
    try:
        r = requests.post(website, data=payload)
        print(r.text)
    except:
        print("Failed to send request...")
def getWEBSITEJSON():
    website = input(str("Enter the website: "))
    if "http://" not in website and "https://" not in website:
        website = 'http://' + website
    r = requests.get(website)
    print(r.json)
def getWEBSITESRESPONSE():
    website = input(str("Enter the website: "))
    if "http://" not in website and "https://" not in website:
        website = 'http://' + website
    r = requests.get(website)
    print(r)

print("""
Select a payload.

[1]: Get html code
[2]: Download images
[3]: Get request
[4]: Get website headers
[5]: Check if the website is ok
[6]: Get the websites cookies
[7]: Gets the websites url
[8]: Send request (Doesn't always work)
[9]: Get the websites json
[10]: Get websites response
""")
type = input(str(""))
if type == "1":
    getHTMLCODE()
elif type == "2":
    getANDDOWNLOADIMAGE()
elif type == "3":
    getRequest()
elif type == "4":
    getWEBSITEHEADERS()
elif type == "5":
    getWEBSITEOKINFOR()
elif type == "6":
    getWEBSITECOOKIES()
elif type == "7":
    getWEBSITEURL()
elif type == "8":
    sendREQUEST()
elif type == "9":
    getWEBSITEJSON()
elif type == "10":
    getWEBSITESRESPONSE()
else:
    print("Invalid type")

import requests
import os
import sys
import inspect

def start():
    print("""
    
░██╗░░░░░░░██╗███████╗██████╗░██╗███╗░░██╗░██████╗██████╗░███████╗░█████╗░████████╗
░██║░░██╗░░██║██╔════╝██╔══██╗██║████╗░██║██╔════╝██╔══██╗██╔════╝██╔══██╗╚══██╔══╝
░╚██╗████╗██╔╝█████╗░░██████╦╝██║██╔██╗██║╚█████╗░██████╔╝█████╗░░██║░░╚═╝░░░██║░░░
░░████╔═████║░██╔══╝░░██╔══██╗██║██║╚████║░╚═══██╗██╔═══╝░██╔══╝░░██║░░██╗░░░██║░░░
░░╚██╔╝░╚██╔╝░███████╗██████╦╝██║██║░╚███║██████╔╝██║░░░░░███████╗╚█████╔╝░░░██║░░░
░░░╚═╝░░░╚═╝░░╚══════╝╚═════╝░╚═╝╚═╝░░╚══╝╚═════╝░╚═╝░░░░░╚══════╝░╚════╝░░░░╚═╝░░░

    """)
    print("")
    print("WEBINSPECT Framework 2.0")

start()

def getHTMLCODE():
    website = input(str("Enter the website: "))
    if "http://" not in website and "https://" not in website:
        website = 'http://' + website
    r = requests.get(website)
    print(r.text)

def getANDDOWNLOADIMAGE():
    website = input(str("Enter the picture link: "))
    filename = input(str("Enter the image name that you want for it to be: "))
    r = requests.get(website)
    with open(filename, 'wb') as f:
        f.write(r.content)
def getRequest():
    website = input(str("Enter the website: "))
    if "http://" not in website and "https://" not in website:
        website = 'http://' + website
    r = requests.get(website)
    print(r)
def getWEBSITEHEADERS():
    website = input(str("Enter the website: "))
    if "http://" not in website and "https://" not in website:
        website = 'http://' + website
    r = requests.get(website)
    print(r.headers)
def getWEBSITEOKINFOR():
    website = input(str("Enter the website: "))
    if "http://" not in website and "https://" not in website:
        website = 'http://' + website
    r = requests.get(website)
    print(r.ok)
def getWEBSITECOOKIES():
    website = input(str("Enter the website: "))
    if "http://" not in website and "https://" not in website:
        website = 'http://' + website
    r = requests.get(website)
    print(r.cookies)
def getWEBSITEURL():
    website = input(str("Enter the website: "))
    if "http://" not in website and "https://" not in website:
        website = 'http://' + website
    r = requests.get(website)
    print(r.url)
def sendREQUEST():
    website = input(str("Enter the website: "))
    username = input(str("Enter the username that you want to try: "))
    password = input(str("Enter the password that you want to try: "))
    payload = {'username': username, 'password': password}
    try:
        r = requests.post(website, data=payload)
        print(r.text)
    except:
        print("Failed to send request...")
def getWEBSITEJSON():
    website = input(str("Enter the website: "))
    if "http://" not in website and "https://" not in website:
        website = 'http://' + website
    r = requests.get(website)
    print(r.json)
def getWEBSITESRESPONSE():
    website = input(str("Enter the website: "))
    if "http://" not in website and "https://" not in website:
        website = 'http://' + website
    r = requests.get(website)
    print(r)

print("""
Select a payload.

[1]: Get html code
[2]: Download images
[3]: Get request
[4]: Get website headers
[5]: Check if the website is ok
[6]: Get the websites cookies
[7]: Gets the websites url
[8]: Send request (Doesn't always work)
[9]: Get the websites json
[10]: Get websites response
""")
type = input(str(""))
if type == "1":
    getHTMLCODE()
elif type == "2":
    getANDDOWNLOADIMAGE()
elif type == "3":
    getRequest()
elif type == "4":
    getWEBSITEHEADERS()
elif type == "5":
    getWEBSITEOKINFOR()
elif type == "6":
    getWEBSITECOOKIES()
elif type == "7":
    getWEBSITEURL()
elif type == "8":
    sendREQUEST()
elif type == "9":
    getWEBSITEJSON()
elif type == "10":
    getWEBSITESRESPONSE()
else:
    print("Invalid type")

░██╗░░░░░░░██╗███████╗██████╗░██╗███╗░░██╗░██████╗██████╗░███████╗░█████╗░████████╗ ░██║░░██╗░░██║██╔════╝██╔══██╗██║████╗░██║██╔════╝██╔══██╗██╔════╝██╔══██╗╚══██╔══╝ ░╚██╗████╗██╔╝█████╗░░██████╦╝██║██╔██╗██║╚█████╗░██████╔╝█████╗░░██║░░╚═╝░░░██║░░░ ░░████╔═████║░██╔══╝░░██╔══██╗██║██║╚████║░╚═══██╗██╔═══╝░██╔══╝░░██║░░██╗░░░██║░░░ ░░╚██╔╝░╚██╔╝░███████╗██████╦╝██║██║░╚███║██████╔╝██║░░░░░███████╗╚█████╔╝░░░██║░░░ ░░░╚═╝░░░╚═╝░░╚══════╝╚═════╝░╚═╝╚═╝░░╚══╝╚═════╝░╚═╝░░░░░╚══════╝░╚════╝░░░░╚═╝░░░ Select a payload.  [1]: Get html code [2]: Download images [3]: Get request [4]: Get website headers [5]: Check if the website is ok [6]: Get the websites cookies [7]: Gets the websites url [8]: Send request (Doesn't always work) [9]: Get the websites json [10]: Get websites response