Python colorama.Back.BLACK Examples
The following are 7
code examples of colorama.Back.BLACK().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
colorama.Back
, or try the search function
.
Example #1
Source File: subzone.py From SubZone with MIT License | 6 votes |
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
Example #2
Source File: print_nodes.py From pyta with GNU General Public License v3.0 | 5 votes |
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
Example #3
Source File: subzone-lin.py From SubZone with MIT License | 5 votes |
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
Example #4
Source File: lokilogger.py From Loki with GNU General Public License v3.0 | 5 votes |
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)
Example #5
Source File: demo06.py From colorama with BSD 3-Clause "New" or "Revised" License | 5 votes |
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='')
Example #6
Source File: subzone.py From SubZone with MIT License | 4 votes |
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
Example #7
Source File: subzone-lin.py From SubZone with MIT License | 4 votes |
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