コード例 #1
0
ファイル: text.py プロジェクト: pr0d33p/NCPG
def text_config():
    clean_terminal()
    banner()
    home_text()
    print(color.green + "\n [ Options ] ")
    print("\n   1) Edit Configuration")
    print("   2) Reset to Default")
    print(colored("   3) Return to main menu", "red"))
コード例 #2
0
ファイル: text.py プロジェクト: pr0d33p/NCPG
def opt_help_about():
    clean_terminal()
    banner()
    home_text()
    help_about()
    input(color.NC + "Press {return} to continue...")
    clean_terminal()
    banner()
    home_text()
    option_main()
コード例 #3
0
ファイル: ph_num.py プロジェクト: pr0d33p/NCPG
def ncell():
	clean_terminal()
	banner()
	print('[PHONE NUMBER MODE]')
	print(colored('\n[+] Ncell has different number pattern according to zones. It help to reduce \n    the numbers of combination.\n','yellow'))
	print(colored(zones,'blue'))
	print(colored("[+] Type the zone number you want to generate phone numbers for.",'magenta'))
	print(colored("[+] For more than one zone type the number separated by comma.",'magenta'))
	print(colored("[+] Type 'all' to generate Ncell numbers of all zone.",'magenta'))
	opt4 = input(colored(color.bold + "\nncpg> ","cyan")).lower().split(',')
	
	numb = []
	if '1' in opt4:
		numb = numb + mechi
	if '2' in opt4:
		numb = numb + koshi
	if '3' in opt4:
		numb = numb + sagarmatha
	if '4' in opt4:
		numb = numb + janakpur
	if '5' in opt4:
		numb = numb + narayani
	if '6' in opt4:
		numb = numb + bagmati
	if '7' in opt4:
		numb = numb + gandaki
	if '8' in opt4:
		numb = numb + lumbini
	if '9' in opt4:
		numb = numb + dhaulagiri
	if '10' in opt4:
		numb = numb + rapti
	if '11' in opt4:
		numb = numb + karnali
	if '12' in opt4:
		numb = numb + bheri
	if '13' in opt4:
		numb = numb + seti
	if '14' in opt4:
		numb = numb + mahakali
	if 'all' in opt4:
		numb = []
		numb = mechi + koshi + sagarmatha + janakpur + narayani + bagmati + gandaki + lumbini + dhaulagiri + rapti + karnali + bheri + seti + mahakali
	if '1' in opt4 or '2' in opt4 or '3' in opt4 or '4' in opt4 or '5' in opt4 or '6' in opt4 or '7' in opt4 or '8' in opt4 or '9' in opt4 or '10' in opt4 or '11' in opt4 or '12' in opt4 or '13' in opt4 or '14' in opt4 or 'all' in opt4:
		clean_terminal()
		banner()
		print('[PHONE NUMBER MODE]')
		print("\n=====================================================================\n")
		print(colored('                 Genetating NCELL Numbers\n','yellow'))
		print('======================================================================')
		num(numb)
	else:
		pass
コード例 #4
0
ファイル: ph_num.py プロジェクト: pr0d33p/NCPG
def install_crunch():
	clean_terminal()
	banner()
	print('[PHONE NUMBER MODE]')
	
	if os.path.isfile('/usr/bin/crunch') == False:
		print(colored('\n  [-] Its seems like crunch is not installed in your system.','red'))
		print(colored('  [+] NCPG uses crunch to generate phone numbers.','yellow'))
		
		install_cru = input('\nDo you want to install cruch? Y/[N]: ').lower()
		if install_cru in ('y','yes'):
			if linux_type() == 'Debian':
				print('\n----------------------------------------------------------------------')
				print(colored('[Installing Crunch]','yellow'))
				os.system('sudo apt-get install crunch')
				print('----------------------------------------------------------------------')
				
			else:
				print(colored('\n  [-] Its seems your system is not debian. Please install cruch manually.','red'))
	else:
		pass
コード例 #5
0
ファイル: ph_num.py プロジェクト: pr0d33p/NCPG
def pattern(x):
	if x == 'ntc':
		n = ['984','985','986']
	if x == 'sky':
		n = ['974','975']
	if x == 'smart cell':
		n = ['961','988']
	if x == 'utl':
		n = ['972']
	if x == 'hello mobile':
		n = ['963']
	
	if x in ('utl','hello mobile'):
		if CONFIG[x] in ('true','True'):
			clean_terminal()
			banner()
			print('[PHONE NUMBER MODE]')
			print("\n=====================================================================\n")
			print(colored('                 Genetating ' + x.upper() + ' Numbers\n','yellow'))
			print('======================================================================')
			num2(n,x.title())
	
	else:
		if CONFIG[x] in ('true','True'):
			clean_terminal()
			banner()
			print('[PHONE NUMBER MODE]')
			print("\n=====================================================================\n")
			print(colored('                 Genetating ' + x.upper() + ' Numbers\n','yellow'))
			print('======================================================================')
			num(n)
		
			# Combining phone numbers
			print(colored('\n[+] Combining phone numbers. Please be patient','red'))
			new2 = []
			for i in n:
				i = ['.Temporary Files/' + i]
				new2 = new2 + i
			combine_file(new2,'.Temporary Files/' + x.title())
コード例 #6
0
ファイル: dictionary.py プロジェクト: pr0d33p/NCPG
def dictionary_mode(file1):
    clean_terminal()
    banner()
    print('\n[DICTIONARY MODE]\n')
    manage_file(file1)
    print(colored('\n [-] Only few options are given in this mode.', 'red'))
    print(
        colored(' [+] Edit the configuration file to change the settings.',
                'yellow'))

    # Appending...
    apnd(file1, '.Temporary Files/.Temp_' + file1[20:] + '_append_rand_lower',
         'w')

    # Appending random numbers...
    ran_num = input(
        "\n> Do you want to add some random numbers at the end of words? Y/[N]: "
    ).lower()
    if ran_num in ('yes', 'y'):
        rand_num(file1,
                 '.Temporary Files/.Temp_' + file1[20:] + '_append_rand_lower',
                 'a')

    # Replacing with special characters...
    repl2 = input(
        "\n> Do you want to replace alphabet with special characters? (password => p@$$w0rd) Y/[N]: "
    ).lower()
    if repl2 in ('yes', 'y'):
        replace_char(
            '.Temporary Files/.Temp_' + file1[20:] + '_append_rand_lower',
            '.Temporary Files/.Temp_' + file1[20:] + '_leet_char_lower', 'w')

    # Leet Mode.
    leetmode2 = input("\n> Leet mode? (password => p455w0rd) Y/[N]: ").lower()
    if leetmode2 in ('y', 'yes'):
        replace_leet(
            '.Temporary Files/.Temp_' + file1[20:] + '_append_rand_lower',
            '.Temporary Files/.Temp_' + file1[20:] + '_leet_char_lower', 'a')

    # Merging into singlefile...

    files_combine2 = [
        '.Temporary Files/.Temp_' + file1[20:] + '_append_rand_lower',
        '.Temporary Files/.Temp_' + file1[20:] + '_leet_char_lower'
    ]
    combine_file(files_combine2,
                 '.Temporary Files/.Temp_' + file1[20:] + '_lower')

    # Shaping password length...
    with open('.Temporary Files/.Temp_' + file1[20:] + '_lower',
              'r') as f_in, open(
                  '.Temporary Files/.Temp_' + file1[20:] + '_low',
                  'w') as f_out:
        for i in f_in.readlines():
            if CONFIG['minlen'] < len(i) <= CONFIG['maxlen'] + 1:
                f_out.write(i)
    os.remove('.Temporary Files/.Temp_' + file1[20:] + '_lower')

    # Converting generated password into title case...
    if CONFIG['tit_case'] in ('true', "true"):
        title_case('.Temporary Files/.Temp_' + file1[20:] + '_low',
                   '.Temporary Files/.Temp_' + file1[20:] + '_tit', 'w')

    # Converting generated password into upper case...
    if CONFIG['upp_case'] in ('true', "true"):
        upper_case('.Temporary Files/.Temp_' + file1[20:] + '_low',
                   '.Temporary Files/.Temp_' + file1[20:] + '_upp', 'w')

    # Combining generated password into single file...
    files_combine = [
        '.Temporary Files/.Temp_' + file1[20:] + '_low',
        '.Temporary Files/.Temp_' + file1[20:] + '_tit',
        '.Temporary Files/.Temp_' + file1[20:] + '_upp', 'no_file12345'
    ]

    combine_file(files_combine, '.Temporary Files/.Temp_' + file1[20:])
コード例 #7
0
from pathlib import Path
from Core.managefile import count
from termcolor import colored
from Core.banners import banner
from Core.dictionary import dictionary
from Core.text import *
from Core.colour import *
from Core.interactive import *
from Core.func import *
from Core.ph_num import *


# Clean terminal and ask option...
osys = platform.system()
clean_terminal()
banner()
home_text()
option_main()   

opt = input(colored(color.bold + "\nncpg> ","cyan"))

while opt not in ("1","2","3","4","5"):
	clean_terminal()
	banner()
	home_text()
	option_main()
	opt = input(colored(color.bold + "\nncpg> ","cyan"))


while opt in ('2','3','4','5'):