Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import socket, time, requests, os, pyautogui
- from requests import get
- # System call
- os.system("")
- # Chocolate's hello world.
- class app:
- def chocolate():
- print("Hey! I'm chocolate!")
- # Display Commands, Displays to console
- def display(type, string, style=0):
- if type == "header":
- if style == 0:
- print("<----- " + string + " ----->")
- else:
- print(style + "<----- " + string + " ----->" + endstyle)
- if type == "error":
- if style == 0:
- print("ERROR [X]: " + string)
- else:
- print(style + "ERROR [X]: " + string + endstyle)
- if type == "warn":
- if style == 0:
- print("WARN [!]: " + string)
- else:
- print(style + "WARN [!]: " + string + endstyle)
- if type == "info":
- if style == 0:
- print("INFO [+]: " + string)
- else:
- print(style + "INFO [+]: " + string + endstyle)
- if type == "write":
- if style == 0:
- print(string)
- else:
- print(style + string + endstyle)
- if type == "capture":
- if style == 0:
- input(string)
- else:
- input(style + string + endstyle)
- # End of output
- # Formatting Commands
- def linebreak():
- print("")
- def pause(string):
- input(string)
- def wait(num):
- time.sleep(num)
- # End of formatting
- # Data types
- def getip(mode):
- if mode == 1:
- print(socket.gethostbyname(socket.gethostname()))
- if mode == 2:
- ipadd = get('https://api.ipify.org').text
- print(format(ipadd))
- def resolve(hostname):
- print(socket.gethostbyname(hostname))
- def http(type, website, reponsetype=0):
- if type == "get":
- website = get(website).text
- print(format(website))
- class input:
- pass
- class gui:
- def alert(string):
- pyautogui.alert(string)
- def confirm(string, answer=0):
- if answer == 0:
- pyautogui.confirm(string)
- else:
- pyautogui.confirm(string, buttons=answer)
- def prompt(string):
- pyautogui.prompt(string)
- def password(string):
- pyautogui.password(string)
- # Stylesheet
- endstyle = '\033[0m'
- class style():
- BLACK = '\033[30m'
- RED = '\033[31m'
- GREEN = '\033[32m'
- YELLOW = '\033[33m'
- BLUE = '\033[34m'
- MAGENTA = '\033[35m'
- CYAN = '\033[36m'
- WHITE = '\033[37m'
- UNDERLINE = '\033[4m'
- NONE = '\033[0m'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement