Esempio n. 1
0
def handleSelection(selection):
    # If the user selected "View our products"
    if selection == 1:
        print(colorama.Style.RESET_ALL)
        print("Wowee look at all these cool product names :D")
        synonymList = ""
        for synonym in synonymsForBankButNotTheMoneyKindTheLandmassKindBecauseImHilariousAndLoveLongVariableNamesThatAreSuperDescriptive:
           synonymList += synonym + "\n"
        cowsay.turtle(synonymList)

    # If the user selected "Talk to a professional banker"
    elif selection == 2:
        print(colorama.Style.RESET_ALL)
        cowsay.turtle("There's no such thing as a professional banker, hehe. :P")


    # If the user selected "Secret Login Portal (FOR ADMINS ONLY)"
    # This might be a place of interest...

    #############################################################################
    # !!!!!!!!!!!!!!!!!!!!!!!! SUPER SECURE CODE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!! #
    #############################################################################

    elif selection == 3:
        print(colorama.Style.RESET_ALL)
        print(colorama.Back.BLUE + colorama.Fore.WHITE)
        try:
            username = input("Username: "******"Password: "******"WRONG")
            print("Stop trying to rek my code ;__;")
        else:
            # NOTE: For future developer reference, USERNAME and PASSWORD are
            # displayed at the top of this file. :D
            print(colorama.Style.RESET_ALL)
            if username != USERNAME:
                print("WRONG USERNAME .____.")
            if hashedPassword != PASSWORD:
                print("WRONG PASSWORD ;__;")
            if password == PASSWORD:
                cowsay.turtle("You copy and pasted the PASSWORD variable as the password you silly goose :P" + "\nThat variable is a SHA256 hash of the REAL password so it wont work :/ sry")
            if password == "ramannoodles":
                print("I told you it PROBABLY wasnt raman noodles but you tried it anyway, ya bum.")
            if password == "udonnoodles":
                cowsay.turtle("I love these noodles, their THIQness makes them superior to all other noodles.")
            if username == USERNAME and hashedPassword == PASSWORD:
                cowsay.dragon("CHALLENGE 1 COMPLETE \n Remember that username and password ;)")
                exit(1)
Esempio n. 2
0
    def execute(self):
        '''
            This function must be present in each and every python module
        '''
        if (self.set_character is None):
            stderr.write('Please specify \'set_character\' value in yaml!')
            exit(1)
        if (self.text is None):
            stderr.write('Please specify \'text\' value in yaml!')
            exit(1)

        if (self.set_character.lower() == 'tux'):
            tux(self.text)

        elif (self.set_character.lower() == 'dragon'):
            dragon(self.text)
        elif (self.set_character.lower() == 'cheese'):
            cheese(self.text)
        else:
            print("Specified cowsay character :: {0} is not present!".format(
                self.set_character))
Esempio n. 3
0
import cowsay
cowsay.daemon("Hi")
cowsay.dragon("Hey")
cowsay.cow("Konstantina")
Esempio n. 4
0
while True:
    num1 = input("Kalkulator\nDana_1: ")
    oper = input("Operacja: +, -, :, *: ")
    num2 = input("Dana_2: ")

    if oper == "+":
        # dodaj = int(num1) + int(num2)
        wynik = funkcja_dodawania(num1, num2)

        zapamietaj = zapamietaj + wynik
        cowsay.cow(f"= {wynik}")
        print(zapamietaj)

    elif oper == "-":
        odejmij = int(num1) - int(num2)
        wynik = funkcja_odejmowania(num1, num2)
        cowsay.dragon(f"= {wynik}")

    elif oper == "*":
        mnoz = int(num1) * int(num2)
        wynik = funkcja_mnozenia(num1, num2)
        cowsay.ghostbusters("= %s" % wynik)

    elif oper == '/':
        dziel = int(num1) / int(num2)
        wynik = funkcja_dzielenia(num1, num2)
        cowsay.kitty("= {}".format(wynik))

    else:
        print("Nie ma takiej mozliwosci")
Esempio n. 5
0
import cowsay

# Documentation: https://pypi.org/project/cowsay/
cowsay.tux("Hello guys..... AHahahhahahah!")
cowsay.cow("Hello World!")
cowsay.trex('Hello (extinct) World')

cowsay.dragon(
    "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris blandit rhoncus nibh. Mauris mi mauris, molestie vel metus sit amet, aliquam vulputate nibh."
)

# More characters
print(cowsay.char_names)
Esempio n. 6
0
#!/usr/bin/env python3

import cowsay

cowsay.dragon("Hello World!!!")
Esempio n. 7
0
from ds_user.test.user_test import UserTester
from ds_product.test.category_test import CategoryTester
from ds_product.test.product_test import ProductTester
import coloredlogs
import unittest
import logging
import sys
import cowsay

with open("prefix/d_rst.data", "r") as r:
    readme = r.read()


if readme:
    with open("prefix/d_rst.data", "w") as w:
        w.write("")
else:
    cowsay.dragon(
        "Yei, we managed to run the application for testers, cool bro \n Author : Kenedi Novriansyah")


coloredlogs.install()

logging.basicConfig(level=logging.DEBUG, stream=sys.stdout,
                    format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')

if __name__ == "__main__":
    unittest.main()
Esempio n. 8
0
import cowsay
cowsay.dragon("I am the Dragon,who are u Coward")
Esempio n. 9
0
def menu(banner, menuTop, scriptMenu, typeMenu, about):
	os.system('clear')
	while True:
		cowsay.dragon(" -Welcome-")
		print(banner)
		try:
			print(menuTop)
			menu = input("Choose Menu : ")
			if menu == '1':
				ip = input("{0} IP Address : " .format("{"+GREEN+"Quick Scan"+END+"}"))
				port = input("{0} Port: " .format("{"+GREEN+"Quick Scan"+END+"}"))
				output = input("{0} Use XML Output ? (Yes/No)" .format("{"+GREEN+"Quick Scan"+END+"}"))
				quickScan(ip, port, output)
			elif menu == '2':
				ip = input("{0} IP Address : " .format("{"+GREEN+"Intense Scan"+END+"}"))
				port = input("{0} Port: " .format("{"+GREEN+"Intense Scan"+END+"}"))
				output = input("{0} Use XML Output ? (Yes/No)" .format("{"+GREEN+"Intense Scan"+END+"}"))
				intenceScan(ip, port, output)
			elif menu == '3':
				submenu = True
				while submenu:
					print(scriptMenu)
					submenu = input("{0} Choose Script : " .format("{"+GREEN+"Script Scan"+END+"}"))
					name_sub = submenuprint(menu, submenu)
					if submenu == '1':
						ip = input("{0} IP Address : " .format("Script Scan{"+GREEN+name_sub+END+"}"))
						output = input("{0} Use XML Output ? (Yes/No)" .format("Script Scan{"+GREEN+name_sub+END+"}"))
						scriptScan('all', ip, output)
						submenu = False
					elif submenu == '2':
						ip = input("{0} IP Address : " .format("Script Scan{"+GREEN+name_sub+END+"}"))
						output = input("{0} Use XML Output ? (Yes/No)" .format("Script Scan{"+GREEN+name_sub+END+"}"))
						scriptScan('vuln', ip, output)
						submenu = False
					elif submenu == '3':
						ip = input("{0} IP Address : " .format("Script Scan{"+GREEN+name_sub+END+"}"))
						output = input("{0} Use XML Output ? (Yes/No)" .format("Script Scan{"+GREEN+name_sub+END+"}"))
						scriptScan('auth', ip, output)
						submenu = False
					elif submenu == '4':
						ip = input("{0} IP Address : " .format("Script Scan{"+GREEN+name_sub+END+"}"))
						output = input("{0} Use XML Output ? (Yes/No)" .format("Script Scan{"+GREEN+name_sub+END+"}"))
						scriptScan('default', ip, output)
						submenu = False
					elif submenu == '5':
						ip = input("{0} IP Address : " .format("Script Scan{"+GREEN+name_sub+END+"}"))
						output = input("{0} Use XML Output ? (Yes/No)" .format("Script Scan{"+GREEN+name_sub+END+"}"))
						scriptScan('discovery', ip, output)
						submenu = False
					elif submenu == '6':
						ip = input("{0} IP Address : " .format("Script Scan{"+GREEN+name_sub+END+"}"))
						output = input("{0} Use XML Output ? (Yes/No)" .format("Script Scan{"+GREEN+name_sub+END+"}"))
						scriptScan('malware', ip, output)
						submenu = False
					elif submenu == '99':
						submenu = False
					else:
						print("--------------------------------------")
						print("Wrong Menu !!!!")
						print("--------------------------------------")
						input("Press Any Key.....")
			elif menu == '4':
				submenu = True
				while submenu:
					print(typeMenu)
					submenu = input("{0} Choose Type Scan : " .format("{"+GREEN+"Custom Scan"+END+"}"))
					name_sub = submenuprint(menu, submenu)
					if submenu == '1':
						ip = input("{0} IP Address : " .format("Custom Scan{"+GREEN+name_sub+END+"}"))
						port = input("{0} Port: " .format("Custom Scan{"+GREEN+name_sub+END+"}"))
						output = input("{0} Use XML Output ? (Yes/No)" .format("Custom Scan{"+GREEN+name_sub+END+"}"))
						typeScan('-sS', ip, port, output)
						submenu = False
					elif submenu == '2':
						ip = input("{0} IP Address : " .format("Custom Scan{"+GREEN+name_sub+END+"}"))
						port = input("{0} Port: " .format("Custom Scan{"+GREEN+name_sub+END+"}"))
						output = input("{0} Use XML Output ? (Yes/No)" .format("Custom Scan{"+GREEN+name_sub+END+"}"))
						typeScan('-sT', ip, port, output)
						submenu = False
					elif submenu == '3':
						ip = input("{0} IP Address : " .format("Custom Scan{"+GREEN+name_sub+END+"}"))
						port = input("{0} Port: " .format("Custom Scan{"+GREEN+name_sub+END+"}"))
						output = input("{0} Use XML Output ? (Yes/No)" .format("Custom Scan{"+GREEN+name_sub+END+"}"))
						typeScan('-sU', ip, port, output)
						submenu = False
					elif submenu == '4':
						ip = input("{0} IP Address : " .format("Custom Scan{"+GREEN+name_sub+END+"}"))
						port = input("{0} Port: " .format("Custom Scan{"+GREEN+name_sub+END+"}"))
						output = input("{0} Use XML Output ? (Yes/No)" .format("Custom Scan{"+GREEN+name_sub+END+"}"))
						typeScan('-sN', ip, port, output)
						submenu = False
					elif submenu == '5':
						ip = input("{0} IP Address : " .format("Custom Scan{"+GREEN+name_sub+END+"}"))
						port = input("{0} Port: " .format("Custom Scan{"+GREEN+name_sub+END+"}"))
						output = input("{0} Use XML Output ? (Yes/No)" .format("Custom Scan{"+GREEN+name_sub+END+"}"))
						typeScan('-sF', ip, port, output)
						submenu = False
					elif submenu == '6':
						ip = input("{0} IP Address : " .format("Custom Scan{"+GREEN+name_sub+END+"}"))
						port = input("{0} Port: " .format("Custom Scan{"+GREEN+name_sub+END+"}"))
						output = input("{0} Use XML Output ? (Yes/No)" .format("Custom Scan{"+GREEN+name_sub+END+"}"))
						typeScan('-sX', ip, port, output)
						submenu = False
					elif submenu == '7':
						ip = input("{0} IP Address : " .format("Custom Scan{"+GREEN+name_sub+END+"}"))
						port = input("{0} Port: " .format("Custom Scan{"+GREEN+name_sub+END+"}"))
						output = input("{0} Use XML Output ? (Yes/No)" .format("Custom Scan{"+GREEN+name_sub+END+"}"))
						typeScan('-sA', ip, port, output)
						submenu = False
					elif submenu == '99':
						submenu = False
					else:
						print("--------------------------------------")
						print("Wrong Menu !!!!")
						print("--------------------------------------")
			elif menu == '5':
				print(about)
			elif menu == '6':
				print("Bye!!!")
				exit()
			else:
				print("--------------------------------------")
				print("Wrong Menu !!!!")
				print("--------------------------------------")
			input("\nPress Enter To Continue.....")
		except(KeyboardInterrupt):
			print("Exiiiting")
			exit()
		except(ValueError):
			print("--------------------------------------")
			print("Value Error")
			input("\nPress Enter To Continue.....")
Esempio n. 10
0
import sys
import cowsay
import requests

ENDPOINT = 'https://api.chucknorris.io/jokes/random?category=sport'
EXECUTION_DATE = sys.argv[1]

print(f"EXECUTION_DATE: {EXECUTION_DATE}")
response = requests.get(ENDPOINT)
cowsay.dragon(response.json()['value'])
Esempio n. 11
0
from database.models.user import Location\n
from django.contrib.auth.models import User
user = User(username='******',email='*****@*****.**',password='******',is_superuser=True,is_staff=True)
user.set_password('Password')
user.save()
location = Location()
location.save()
user.accounts_set.create(location=location)
"""

with open("prefix/d_rst.data", "w") as w:
    w.write("Reset")

os.system("rm db.sqlite3")
os.system("touch db.sqlite3")
os.system("rm media/accounts/* && rm media/product/* && rm media/category/*")
os.system("python manage.py migrate")
os.system('python manage.py shell -c="%s"' % command)
os.system("export reset='True'")
os.system("python manage.py test")

with open("core/setup_test/requirements.json", "w") as w:
    w.write(json.dumps({'token': ''}))

_ = []
_.append("=" * 45)

cowsay.dragon(
    "The application reset was successful \n and then you can just run the command: \npython manage.py test \n Author: Kenedi Novriansyah \n Live at DIYogayakarta"
)
async def dragon(ctx, *, text):
    await ctx.send('```' + cowsay.dragon(text) + '```')
Esempio n. 13
0
                deaths[1].append(int(row['AnzSterWir']))
            elif int(row['Jahr']) == year3:
                quarts[2].append(row['QuarLang'])
                deaths[2].append(int(row['AnzSterWir']))
    #print(quarts, deaths)

    fig, axs = plt.subplots(1, 3, figsize=(9, 3), sharey=True)
    axs[0].bar(quarts[0], deaths[0])
    axs[1].bar(quarts[1], deaths[1])
    axs[2].bar(quarts[2], deaths[2])
    fig.suptitle('Deaths per Quartier in Zürich')
    axs[0].figure.autofmt_xdate(rotation=90)

    plt.show()


if __name__ == '__main__':
    #print_hello()
    #print_range(0, 100, 10)
    #print_animals(ALL_THE_ANIMALS)
    #print_humans()
    #print_tuples()
    #edit_tuples()
    #why_tuples()
    #divide(0)
    #print('Is 🐈 in ALL_THE_ANIMALS? {}'.format('🐈' in ALL_THE_ANIMALS))
    #print('Is 🐄 in ALL_THE_ANIMALS? {}'.format('🐄' in ALL_THE_ANIMALS))

    #deaths_in_zh_per_quartier(1993, 2000, 2019)
    cowsay.dragon("Hello")
Esempio n. 14
0
def quit():
    '''Quit program'''
    cowsay.dragon("Until next time...")
    sys.exit()
Esempio n. 15
0
 def tearDownClass(cls):
     cowsay.dragon("Running unit tester has finished")
     os.system("cat test.log")
Esempio n. 16
0
import cowsay
# print(cowsay.char_names)
name = input('Enter your name : ')
string = f'Hello {name}'

cowsay.daemon(string)
cowsay.cow(string)
cowsay.dragon(string)
cowsay.beavis(string)
cowsay.cheese(string)
cowsay.ghostbusters(string)
cowsay.kitty(string)
cowsay.meow(string)
cowsay.milk(string)
cowsay.pig(string)
cowsay.stegosaurus(string)
cowsay.stimpy(string)
cowsay.turkey(string)
cowsay.turtle(string)
cowsay.tux(string)