本文整理汇总了Python中colorama.Back.BLACK属性的典型用法代码示例。如果您正苦于以下问题:Python Back.BLACK属性的具体用法?Python Back.BLACK怎么用?Python Back.BLACK使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类colorama.Back
的用法示例。
在下文中一共展示了Back.BLACK属性的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: nslookup
# 需要导入模块: from colorama import Back [as 别名]
# 或者: from colorama.Back import BLACK [as 别名]
def nslookup(self):
global nameservers
#nslookup to find nameservers of target domain
dns_white = Fore.RED+Back.BLACK+str('Dns records')
sec_bit = Fore.GREEN+Back.BLACK+str('for this domain.\n')
print(Fore.GREEN+Back.BLACK+str('\n\n\n{!} %s %s' % (dns_white, sec_bit)))
line = Fore.CYAN+Back.BLACK+str('************************************************************')
records = Fore.GREEN+Back.BLACK+str('DNS RECORDS:green')
print('%s\n%s\n%s\n' % (line, records, line))
try:
with open('nslookup.txt','w') as output_vale:
cmd = subprocess.call(f'nslookup -type=ns {self.domain}', stdout=output_vale)
with open('nslookup.txt','r') as ns2:
for line in ns2.readlines():
if 'nameserver' in line:
line = line.split(' ')[2]
nameservers.append(line)
os.remove('nslookup.txt')
#print(nameservers)
except Exception as e:
#print(e)
pass
return nameservers
示例2: _wrap_color
# 需要导入模块: from colorama import Back [as 别名]
# 或者: from colorama.Back import BLACK [as 别名]
def _wrap_color(code_string):
"""Wrap key parts in styling and resets.
Stying for each key part from,
(col_offset, fromlineno) to (end_col_offset, end_lineno).
Note: use this to set color back to default (on mac, and others?):
Style.RESET_ALL + Style.DIM
"""
ret = Style.BRIGHT + Fore.WHITE + Back.BLACK
ret += code_string
ret += Style.RESET_ALL + Style.DIM + Fore.RESET + Back.RESET
return ret
示例3: nslookup
# 需要导入模块: from colorama import Back [as 别名]
# 或者: from colorama.Back import BLACK [as 别名]
def nslookup(self):
global nameservers
#nslookup to find nameservers of target domain
dns_white = Fore.RED+Back.BLACK+str('Dns records')
sec_bit = Fore.GREEN+Back.BLACK+str('for this domain.\n')
print(Fore.GREEN+Back.BLACK+str('\n\n\n{!} %s %s' % (dns_white, sec_bit)))
line = Fore.CYAN+Back.BLACK+str('************************************************************')
records = Fore.GREEN+Back.BLACK+str('DNS RECORDS:green')
print('%s\n%s\n%s\n' % (line, records, line))
try:
with open('dig.txt','w') as output_vale:
cmd = subprocess.call(f'dig -t ns {self.domain}', shell=True, stdout=output_vale)
with open('dig.txt','r') as ns2:
for line in ns2.readlines():
if '\tNS\t' in line:
line = line.split()[4]
nameservers.append(line)
#os.remove('dig.txt')
#print(nameservers)
except Exception as e:
#print(e)
pass
return nameservers
示例4: print_welcome
# 需要导入模块: from colorama import Back [as 别名]
# 或者: from colorama.Back import BLACK [as 别名]
def print_welcome(self):
if self.caller == 'main':
print(Back.GREEN + " ".ljust(79) + Back.BLACK + Fore.GREEN)
print(" __ ____ __ ______ ")
print (" / / / __ \/ //_/ _/ ")
print (" / /__/ /_/ / ,< _/ / ")
print (" /____/\____/_/|_/___/ ")
print (" ________ _____ ____ ")
print (" / _/ __ \/ ___/ / __/______ ____ ___ ___ ____ ")
print (" _/ // /_/ / /__ _\ \/ __/ _ `/ _ \/ _ \/ -_) __/ ")
print (" /___/\____/\___/ /___/\__/\_,_/_//_/_//_/\__/_/ ")
print (Fore.WHITE)
print (" Copyright by Florian Roth, Released under the GNU General Public License")
print (" Version %s" % __version__)
print (" ")
print (" DISCLAIMER - USE AT YOUR OWN RISK")
print (" Please report false positives via https://github.com/Neo23x0/Loki/issues")
print (" ")
print (Back.GREEN + " ".ljust(79) + Back.BLACK)
print (Fore.WHITE+''+Back.BLACK)
else:
print (" ")
print (Back.GREEN + " ".ljust(79) + Back.BLACK + Fore.GREEN)
print (" ")
print (" LOKI UPGRADER ")
print (" ")
print (Back.GREEN + " ".ljust(79) + Back.BLACK)
print (Fore.WHITE + '' + Back.BLACK)
示例5: main
# 需要导入模块: from colorama import Back [as 别名]
# 或者: from colorama.Back import BLACK [as 别名]
def main():
colorama.init()
pos = lambda y, x: Cursor.POS(x, y)
# draw a white border.
print(Back.WHITE, end='')
print('%s%s' % (pos(MINY, MINX), ' '*MAXX), end='')
for y in range(MINY, 1+MAXY):
print('%s %s ' % (pos(y, MINX), pos(y, MAXX)), end='')
print('%s%s' % (pos(MAXY, MINX), ' '*MAXX), end='')
# draw some blinky lights for a while.
for i in range(PASSES):
print('%s%s%s%s%s' % (pos(randint(1+MINY,MAXY-1), randint(1+MINX,MAXX-1)), choice(FORES), choice(BACKS), choice(STYLES), choice(CHARS)), end='')
# put cursor to top, left, and set color to white-on-black with normal brightness.
print('%s%s%s%s' % (pos(MINY, MINX), Fore.WHITE, Back.BLACK, Style.NORMAL), end='')
示例6: active_subs
# 需要导入模块: from colorama import Back [as 别名]
# 或者: from colorama.Back import BLACK [as 别名]
def active_subs(self):
#check registered subdomains to see if active or not
global active_subdomains
for sub in abuse.request_json():
try:
sub = socket.gethostbyname_ex(sub)
if sub in active_subdomains:
pass
else:
active_subdomains.append(sub)
except:
continue
number_all = len(abuse.request_json())
number_active = len(active_subdomains)
Style.RESET_ALL
try:
print('\n',Fore.GREEN+'''\n\n{!} There are %s %s %s''' %
(Fore.RED+Back.BLACK+str(number_all), Fore.RED+Back.BLACK+'REGISTERED', Fore.GREEN+'subdomains for this domain.'))
time.sleep(2)
index = Fore.GREEN+Back.BLACK+str('INDEX:green')
sub_red = Fore.RED+Back.BLACK+str('SUBDOMAIN:red')
line = Fore.CYAN+Back.BLACK+str('*****************************')
print('\n%s\n%s %s\n%s\n' % (line, index, sub_red, line))
time.sleep(1.3)
for index, sub in enumerate(abuse.request_json()):
print(Fore.GREEN+str(index+1),Fore.RED+str(sub))
print('\n',Fore.GREEN+'''\n\n{!} There are %s %s %s''' %
(Fore.RED+Back.BLACK+str(number_active), Fore.RED+Back.BLACK+'ACTIVE', Fore.GREEN+'subdomains for this domain.'))
time.sleep(2)
index = Fore.GREEN+Back.BLACK+str('INDEX:green')
dns_white = Fore.WHITE+Back.BLACK+str('DNS SERVER:white')
sub_red = Fore.RED+Back.BLACK+str('SUBDOMAIN:red')
ip_yell = Fore.BLUE+Back.BLACK+str('IP_ADDR:blue')
line = Fore.CYAN+Back.BLACK+str('************************************************************')
print('\n%s\n%s %s %s %s\n%s\n' % (line, index, dns_white, sub_red, ip_yell, line))
time.sleep(1.3)
for index, sub in enumerate(active_subdomains):
print(Fore.GREEN+str(index+1), Fore.WHITE+Back.BLACK+str(sub[0]), Fore.RED+Back.BLACK+str(sub[1]), Fore.BLUE+Back.BLACK+str(sub[2]))
except Exception as e:
print(f'active_subdomains//Error: {e}')
pass
return active_subdomains
示例7: active_subs
# 需要导入模块: from colorama import Back [as 别名]
# 或者: from colorama.Back import BLACK [as 别名]
def active_subs(self):
#check registered subdomains to see if active or not
global active_subdomains
for sub in abuse.request_json():
try:
sub = socket.gethostbyname_ex(sub)
if sub in active_subdomains:
pass
else:
active_subdomains.append(sub)
except:
continue
number_all = len(abuse.request_json())
number_active = len(active_subdomains)
Style.RESET_ALL
try:
print('\n',Fore.GREEN+'''\n\n{!} There are %s %s %s''' %
(Fore.RED+Back.BLACK+str(number_all), Fore.RED+Back.BLACK+'REGISTERED', Fore.GREEN+'subdomains for this domain.'))
time.sleep(2)
index = Fore.GREEN+Back.BLACK+str('INDEX:green')
sub_red = Fore.RED+Back.BLACK+str('SUBDOMAIN:red')
line = Fore.CYAN+Back.BLACK+str('*****************************')
print('\n%s\n%s %s\n%s\n' % (line, index, sub_red, line))
time.sleep(1.3)
for index, sub in enumerate(abuse.request_json()):
print(Fore.GREEN+str(index+1),Fore.RED+str(sub))
print('\n',Fore.GREEN+'''\n\n{!} There are %s %s %s''' %
(Fore.RED+Back.BLACK+str(number_active), Fore.RED+Back.BLACK+'ACTIVE', Fore.GREEN+'subdomains for this domain.'))
time.sleep(2)
index = Fore.GREEN+Back.BLACK+str('INDEX:green')
dns_white = Fore.WHITE+Back.BLACK+str('DNS SERVER:white')
sub_red = Fore.RED+Back.BLACK+str('SUBDOMAIN:red')
ip_yell = Fore.BLUE+Back.BLACK+str('IP_ADDR:blue')
line = Fore.CYAN+Back.BLACK+str('************************************************************')
print('\n%s\n%s %s %s %s\n%s\n' % (line, index, dns_white, sub_red, ip_yell, line))
time.sleep(1.3)
for index, sub in enumerate(active_subdomains):
print(Fore.GREEN+str(index+1), Fore.WHITE+Back.BLACK+str(sub[0]), Fore.RED+Back.BLACK+str(sub[1]), Fore.BLUE+Back.BLACK+str(sub[2]))
except Exception as e:
print(f'active_subdomains//Error: {e}')
pass
return active_subdomains