403Webshell
Server IP : 15.235.198.142  /  Your IP : 216.73.216.198
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ballsack 6.8.0-45-generic #45-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 30 12:02:04 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/share/doc/python3-colorama/examples/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/doc/python3-colorama/examples/demo09.py
# https://www.youtube.com/watch?v=F5a8RLY2N8M&list=PL1_riyn9sOjcKIAYzo7f8drxD-Yg9La-D&index=61
# Generic colorama demo using command line arguments
# By George Ogden
from colorama import Fore, Back, Style, init
import argparse
parser = argparse.ArgumentParser("colorama demo")

def format(module):
    return list(map(lambda x: x.lower(),module.__dict__.keys()))

def find(module,item):
    return module.__dict__[item.upper()]

parser.add_argument("-c","--colour",choices=format(Fore),default="RESET")
parser.add_argument("-b","--background",choices=format(Back),default="RESET")
parser.add_argument("-s","--style",choices=format(Style),default="RESET_ALL")
parser.add_argument("-t","--text",default="Lorem ipsum dolor sit amet")

args = parser.parse_args()

print(find(Style,args.style) + find(Fore,args.colour) + find(Back,args.background) + args.text + Style.RESET_ALL)

Youez - 2016 - github.com/yon3zu
LinuXploit