def style(self): title = 'HELP MESSAGE' def terminal_width(width: int) -> int: '''controle the ruler width max width = 1 minmim width = 0 ''' square_text = 6 terminal_width = terminal().size['width'] - square_text return int(terminal_width * float(width) / float(1)) # RULER = lambda: '[white]' + '─' * (terminal_width(1)) RULER = lambda: f'[bold][white]{"─" * terminal_width(1)}[/bold][/white]' if self.title: title = f"[bold][green]{self.title.upper()}[/green]" sections = [] temp = 0 for section_title, commands in self.sections.items(): sections.append('') sections[temp] += f'[white][bold] {section_title.lower()}: [/bold]\n' + RULER() + '\n' # commands tempFixwidth = [key[0] for key in commands] tempFixwidth = Text.full(tempFixwidth) tempCommands = [key[0] for key in commands] for command, helpMsg in commands: command = tempFixwidth[tempCommands.index(command)] if Config.get('settings', 'ARABIC_RESHAPER'): helpMsg = Text.arabic(helpMsg) sections[temp] += f' [yellow]{command}[/yellow] [white]{helpMsg}\n' # sections[temp] += RULER() + '\n\n' sections[temp] += '\n\n' temp += 1 style = '' for section in sections: style += section print( Panel( style[:-3], box=box.ROUNDED, padding=(1, 2), title=title, border_style='bold green', ) )
def __init__(self): try: self.Sq = Square() self.Sq.color = '[$LCYAN]' self.T = Text() eip = req.get('https://api.ipify.org').text self.ips.append(eip + '+eip') s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.connect(("8.8.8.8", 80)) iip = s.getsockname()[0] self.ips.append(iip + '+iip') self.open_ports1 = [] self.open_ports1.sort() self.open_ports2 = [] self.open_ports2.sort() self.ports = set( list(range(1, 6535)) + [8080, 7547, 6666, 8888, 7777]) self.mw = os.get_terminal_size().columns except socket.gaierror: exit() except socket.error: print('\033[1;31m[-] Check your internet connection..!\033[0m') exit() except KeyboardInterrupt: exit() b = ''' _____ _--_ / ___/_________ _____ .' '. \__ \/ ___/ __ `/ __ \ |\033[1;30m((0)) \033[1;35m| ___/ / /__/ /_/ / / / / | | /____/\___/\__,_/_/ /_/ '. .' |""| ''' print('\033[0;32m', b, '\033[0m')
for rowX, rowY in zip(x, y): if rowX: allX += 1 if rowY: dataX += '[$GREEN]#[$/]' equal += 1 else: dataX += '#' else: dataX += ' ' if rowY: allY += 1 if rowX: dataY += '[$GREEN]#[$/]' equal += 1 else: dataY += '#' else: dataY += ' ' dataX += '\n' dataY += '\n' x = Sq.base(dataX[:-1]) y = Sq.base(dataY[:-1]) print(Text().mix([x, y], spacing=2)) print( f'[x:{allX}, y:{allY}] [equal:{equal}] [{round(percentage(equal,allX+allY))} % 100] ' ) time.sleep(.5) print(chr(27) + '[H', end='')
#THIS TOOL BY REDVIROUS import os os.system("clear") from N4Tools.Design import Text T=Text() about=''' لتثبيت الاداه apt update && apt upgrade pkg update pkg upgrade pkg install python pkg install python2 pkg install python3 pkg install pip pkg install wget pkg insta curl pkg install git pkg install unzip حمل الاداه من ميديافاير http://www.mediafire.com/file/yxidxr2sd8tyrna/RV_TOOLv4.0.zip/file بعد ماتحمل الاداه من ميديا فاير اكتب هذه اوامر بترتيب git clone https://github.com/REDVIROUS/RV_TOOLv4.0-install unzip RV_TOOLv4.0.zip cd RV_TOOLv4.0-install
from bs4 import BeautifulSoup from N4Tools.Design import Text, Square, Color from N4Tools.terminal import terminal from config import Config from rich import print from rich import box from rich.panel import Panel Text = Text() Square = Square() Color = Color() class DocsReader: def __init__(self, file): self.file = file with open(file, 'r') as f: doc = f.read() self.soup = BeautifulSoup(self.values_reader(doc), 'html.parser') @property def title(self): try: return self.soup.find('title').text except: return None @property def sections(self): data = {} for section in self.soup.find_all('section'):