Example #1
0
    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')
Example #2
0
	def StyleData(self):
		data=self.GetNames()
		out=''	
		index=0
		options={}
		sq=Square()
		sq.SETTINGS['square']=['╭─', '┝[$CYAN]─', '╰─', '─', '╯', '┥', '╮', '─']
		sq.SETTINGS['color']="[$LCYAN]"
		M=max([len(k+v['verison'])for k,v in data.items()])
		for k,v in data.items():
			Num='0'+str(index+1) if index+1<=9 else str(index+1)
			out+=f"[$LRED]([$NORMAL]{Num}[$LRED])[$LYELLOW]{k}:[$LGREEN]{v['verison']}[$CYAN]{'─'*(M-len(k+v['verison']))}\n"
			options[int(Num)]=v['href']
			index+=1
		return([sq.base(Color().reader(out[:-1])),options])
Example #3
0
def MyIpInfo(Thread):
    r = get('http://ipinfo.io/json')
    end = ''
    for key, val in r.json().items():
        if key not in ['hostname', 'readme', 'org']:
            end += f'[$LYELLOW]{key}[$WIHTE]: [$LGREEN]{val}\n'
    end = end[:-1]

    Sq = Square()
    Sq.cols = 1
    Sq.padding = [1, 0, 10, 0]
    Sq.color = Color().LRED
    Sq.center = True
    Sq.square = [
        '[$LBLUE][[$LGREEN]+[$LBLUE]]', ' |', '[$LBLUE][[$LGREEN]+[$LBLUE]]',
        '-', '[$LBLUE][[$LGREEN]+[$LBLUE]]', '  |',
        '[$LBLUE][[$LGREEN]+[$LBLUE]]', '-'
    ]
    Thread.kill()
    print(Sq.style([end]))
Example #4
0
# N4Tools version 1.7.1
import random, os, time
from N4Tools.Design import Square, Text
size = 12
Sq = Square()
Sq.padding = [1, 0, 1, 0]


def SquareList():
    return [[random.choice([1, 0]) for i in range(size)]
            for i in range(size // 2)]


def percentage(part, whole):
    return 100 * float(part) / float(whole)


os.system('clear')
while True:
    equal = 0
    allX = 0
    allY = 0
    x = SquareList()
    y = SquareList()
    dataX = ''
    dataY = ''
    for x, y in zip(x, y):
        for rowX, rowY in zip(x, y):
            if rowX:
                allX += 1
                if rowY:
Example #5
0
class MyToolDesign:
    SQ = Square()

    def __init__(self):
        self.SQ.color = '[$LRED]'
        self.SQ.padding = [1, 1, 1, 1]

        self.tools = [
            'Texmux tools',
            'Linux on android',
            'DOS,DDOS Attacks',
            'Info gathering',
            'Scan everything',
            'Social engner',
            'Info about us',
            'Exit the v7x',
            'adfsds',
            'Name',
        ]

    def Title(self):
        return T.Figlet('vairus7x', font='big')

    def Tools(self):
        tools = self.tools
        tools = [
            f'- [$LYELLOW]{t.upper()} [$LGREEN][[$RED]{num+1}[$LGREEN]]'
            for num, t in enumerate(tools)
        ]
        tools = T.equal(tools)
        output = ''
        design1 = '\n\n[$RED]--[[$LYELLOW]v7x[$RED]]--'
        design2 = self.SQ.color + (' ' + ('|-' * 10) + '|-   V7X-Team   -|' +
                                   ('-|' * 10))
        temp = -1
        while True:
            try:
                item = '\n' + T.mix([
                    self.SQ.style([tools[temp + 1]]),
                    design1,
                    self.SQ.style([tools[temp + 2]]),
                ]).replace('══', '╧╤')
                temp += 2
                if len(tools) - 1 != temp:
                    item = T.CentreAlignPro([item, design2])
                output += item
            except IndexError:
                break
        return output

    def main(self):
        @ThreadAnimation(Animation=A.Loading,
                         kwargs={'text': 'Loading [style]...'})
        def load_style(Thread):
            output = T.CentreAlignPro([self.Title(), self.Tools()])
            Thread.kill()
            print(output + '\n')

        load_style()
        while True:
            user = T.CInput(CO.RED + 'Enter number: ')
            try:
                print(self.tools[int(user) - 1].upper())
                break
            except:
                print('Not Found!')
Example #6
0
class Main(MA):
    ips = []

    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')

    def serv(self, p):
        try:
            x = socket.getservbyport(p)
        except socket.error:
            x = 'Unknown'
        return x

    def display(self, i):
        i, a = i.split('+')
        myl = self.open_ports1 if a == 'eip' else self.open_ports2
        fu = '''
    port    Service    Status
[$LCYAN]═══════════════════════════════'''
        Ip = f'\n\n[$LYELLOW][{i}]'
        if not len(myl):
            fu += '\n[$LRED]      No Service Is Runing\b'
        else:
            for p in myl:
                fu += f'\n[$LBLUE]   {str(p).ljust(4)}   {self.serv(p).rjust(8)}    {"Open".rjust(7)} '
        box_info = self.Sq.base(fu[1:-1])
        output = self.T.CentreAlignPro([Ip, box_info])
        for x in output.split('\n'):
            print("\t" + x)

    @ThreadAnimation(Animation=MA.CustomAnimation)
    def scan(Thread, self):
        p = 0

        for ip in self.ips:
            i, a = ip.split('+')
            myl = self.open_ports1 if a == 'eip' else self.open_ports2
            for port in self.ports:
                s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
                s.settimeout(0.1)
                if s.connect_ex((i, port)) == 0:
                    myl.append(port)
                Thread.set_kwargs(min=p + 1, max=6539 * 2)
                p += 1
        Thread.kill()

    def d(self):
        for ip in self.ips:
            self.display(ip)

    def runs(self):
        p1 = u(target=self.scan, args=())
        p1.start()
        p1.join()
        s1 = u(target=self.d, args=())
        s1.start()
Example #7
0
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'):