diff --git a/.DS_Store b/.DS_Store
deleted file mode 100644
index ce0ab96..0000000
Binary files a/.DS_Store and /dev/null differ
diff --git a/.idea/JSShell-2.0.iml b/.idea/JSShell-2.0.iml
deleted file mode 100644
index 4790327..0000000
--- a/.idea/JSShell-2.0.iml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/dictionaries/dabeles.xml b/.idea/dictionaries/dabeles.xml
deleted file mode 100644
index 4c8db8e..0000000
--- a/.idea/dictionaries/dabeles.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
- abeles
- beautity
- canop
- cmds
- geval
- mixins
- mongo
- preflight
- tableformatter
-
-
-
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 97c956a..0000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/jsLibraryMappings.xml b/.idea/jsLibraryMappings.xml
deleted file mode 100644
index 93a1ca9..0000000
--- a/.idea/jsLibraryMappings.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
deleted file mode 100644
index d074707..0000000
--- a/.idea/misc.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
deleted file mode 100644
index 37b4b3d..0000000
--- a/.idea/modules.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
deleted file mode 100644
index bce6789..0000000
--- a/.idea/workspace.xml
+++ /dev/null
@@ -1,755 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- config
- self.ppaged(t)
- get_prompt
- `
- ;
- //
- # Commands
- prettytable
- def _fromtimestamp
- base_prompt
- Document
- dabeles@tlv-mpdsl
- ~/Documents/Code/Python/
-
-
-
- ~/
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- true
- DEFINITION_ORDER
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1544371844009
-
-
- 1544371844009
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- globals()
- Python
- EXPRESSION
-
-
- globals()['app']
- Python
- EXPRESSION
-
-
- globals()['a[[']
- Python
- EXPRESSION
-
-
- func.app
- Python
- EXPRESSION
-
-
- func
- Python
- EXPRESSION
-
-
- func()
- Python
- EXPRESSION
-
-
- self.selected_client.commands
- Python
- EXPRESSION
-
-
- self.selected_client
- Python
- EXPRESSION
-
-
- self.selected_client.fields()
- Python
- EXPRESSION
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.python-version b/.python-version
deleted file mode 100644
index 871e365..0000000
--- a/.python-version
+++ /dev/null
@@ -1 +0,0 @@
-jsshell2
diff --git a/Dockerfile b/Dockerfile
deleted file mode 100644
index 5df9fed..0000000
--- a/Dockerfile
+++ /dev/null
@@ -1,13 +0,0 @@
-FROM python:3.6-jessie
-
-RUN apt-get update
-RUN apt-get install software-properties-common less vim -y
-
-ENV INSTALL_PATH /app/
-RUN mkdir -p $INSTALL_PATH
-WORKDIR $INSTALL_PATH
-
-COPY requirements.txt requirements.txt
-RUN pip install -r requirements.txt
-
-COPY . .
\ No newline at end of file
diff --git a/README.md b/README.md
deleted file mode 100644
index cfc6a3c..0000000
--- a/README.md
+++ /dev/null
@@ -1,146 +0,0 @@
-# JSShell 2.0
-
-An interactive multi-user web based javascript shell. It was initially created in order to debug remote
-esoteric browsers during experiments and research. This tool can be easily attached to XSS (Cross Site Scripting)
-payload to achieve browser remote code execution (similar to the BeeF framework).
-
-Version 2.0 is created entirely from scratch, introducing new exciting features, stability and maintainability.
-
-###### Version: 2.0
-
-## Author
-[Daniel Abeles](https://twitter.com/Daniel_Abeles).
-
-### Shell Video
-[![asciicast](https://asciinema.org/a/217167.png)](https://asciinema.org/a/217167)
-
-## Features
-* Multi client support
-* Cyclic DOM objects support
-* Pre flight scripts
-* Command Queue & Context
-* Extensible with Plugins
-* Injectable via ``
-
-### Hosted Shell
-If you desire to debug exotic and esoteric browsers, you can simply navigate to `http://{YOUR_SERVER_IP}:{PORT}/` and
-a new client will pop up into your JSShell CLI client. Now it is debuggable via our JSShell console.
-
-## Credits
-[Canop](https://github.com/Canop) for [JSON.prune](https://github.com/Canop/JSON.prune/)
-
-
-
-###### use it at your own responsibility and risk.
\ No newline at end of file
diff --git a/common/__init__.py b/common/__init__.py
deleted file mode 100644
index e69de29..0000000
diff --git a/common/__pycache__/__init__.cpython-36.pyc b/common/__pycache__/__init__.cpython-36.pyc
deleted file mode 100644
index c4734d3..0000000
Binary files a/common/__pycache__/__init__.cpython-36.pyc and /dev/null differ
diff --git a/common/__pycache__/config.cpython-36.pyc b/common/__pycache__/config.cpython-36.pyc
deleted file mode 100644
index ace4530..0000000
Binary files a/common/__pycache__/config.cpython-36.pyc and /dev/null differ
diff --git a/common/__pycache__/utils.cpython-36.pyc b/common/__pycache__/utils.cpython-36.pyc
deleted file mode 100644
index bb6dcd9..0000000
Binary files a/common/__pycache__/utils.cpython-36.pyc and /dev/null differ
diff --git a/common/config.py b/common/config.py
deleted file mode 100644
index 33ba039..0000000
--- a/common/config.py
+++ /dev/null
@@ -1,16 +0,0 @@
-import json
-from typing import Dict, List
-
-
-def read_config() -> Dict:
- """ Returns the parsed configuration file from disk """
-
- with open('resources/config.json', 'r') as f:
- return json.load(f)
-
-
-def read_pre_flight() -> List:
- """ Returns the parsed pre-flight scripts file from disk """
-
- with open('resources/preflight.json', 'r') as f:
- return json.load(f)
diff --git a/common/models/__init__.py b/common/models/__init__.py
deleted file mode 100644
index 2c2599d..0000000
--- a/common/models/__init__.py
+++ /dev/null
@@ -1,3 +0,0 @@
-from flask_mongoengine import MongoEngine
-
-db = MongoEngine()
diff --git a/common/models/__pycache__/__init__.cpython-36.pyc b/common/models/__pycache__/__init__.cpython-36.pyc
deleted file mode 100644
index 11650e2..0000000
Binary files a/common/models/__pycache__/__init__.cpython-36.pyc and /dev/null differ
diff --git a/common/models/__pycache__/client.cpython-36.pyc b/common/models/__pycache__/client.cpython-36.pyc
deleted file mode 100644
index 6028bfe..0000000
Binary files a/common/models/__pycache__/client.cpython-36.pyc and /dev/null differ
diff --git a/common/models/__pycache__/command.cpython-36.pyc b/common/models/__pycache__/command.cpython-36.pyc
deleted file mode 100644
index 8835b9b..0000000
Binary files a/common/models/__pycache__/command.cpython-36.pyc and /dev/null differ
diff --git a/common/models/__pycache__/output.cpython-36.pyc b/common/models/__pycache__/output.cpython-36.pyc
deleted file mode 100644
index bc99ad5..0000000
Binary files a/common/models/__pycache__/output.cpython-36.pyc and /dev/null differ
diff --git a/common/models/client.py b/common/models/client.py
deleted file mode 100644
index 9660456..0000000
--- a/common/models/client.py
+++ /dev/null
@@ -1,126 +0,0 @@
-from typing import List, Union
-
-from common.models import db
-from common.models.command import Command
-from common.utils import now, new_uuid, first, to_humanized_date
-
-CommandsList = List[Union[None, Command]]
-
-
-class Client(db.Document):
- """ Client Model - describes a connected client"""
-
- cid = db.StringField(required=True, primary_key=True, default=new_uuid)
- user_agent = db.StringField(default='-')
- registered_on = db.DateTimeField(default=now)
- last_seen = db.DateTimeField(default=now)
- commands = db.ListField(
- db.ReferenceField(Command)
- )
-
- @property
- def reversed_commands(self) -> CommandsList:
- """ The commands ListField on reversed order (by the creation date) """
- return sorted(self.commands, key=lambda cmd: cmd.created_on, reverse=True)
-
- @property
- def max_commands_width(self) -> int:
- """ The longest command width from the commands ListField """
-
- not_empty_commands_length = [
- len(c.text) for c
- in self.commands
- if c.text
- ]
-
- if len(not_empty_commands_length) == 0:
- return 0
-
- return max(not_empty_commands_length)
-
- @property
- def max_outputs_width(self) -> int:
- """ The longest output width from the commands ListField """
-
- outputs_length = [
- len(c.output.text) for c
- in self.commands
- if c.output and c.output.text
- ]
-
- if len(outputs_length) == 0:
- return 0
-
- return max(outputs_length)
-
- def unique_commands_ids(self) -> List[str]:
- """ Generates a list of all commands unique ID's """
-
- return [str(cmd.cid) for cmd in self.commands]
-
- @property
- def humanized_last_seen(self) -> str:
- """ Converts the last seen to a human readable format """
-
- return to_humanized_date(self.last_seen)
-
- @staticmethod
- def unique_client_ids() -> List[str]:
- """ Generates a list of all unique client ID's """
-
- return [str(client.cid) for client in Client.objects]
-
- def _generate_shortened_user_agent(self, max_user_agent_width: int) -> int:
- """ Generates a shortened user agent string according to the
- longest user agent string in the database """
-
- if len(self.user_agent) <= max_user_agent_width:
- return self.user_agent
-
- return self.user_agent[:max_user_agent_width - 4] + ' ...'
-
- def update_last_seen(self) -> None:
- """ Handles all the needed operations to update the last seen date """
-
- self.last_seen = now()
- self.save()
-
- def get_first_not_served_command(self) -> Command:
- """ Returns the first not served command """
-
- not_served_commands = [
- c for c in
- self.commands
- if not c.is_served
- ]
-
- return first(not_served_commands)
-
- def run_command(self, command_string: str) -> None:
- """ Handles all the needed operations to run a command """
-
- cmd = Command(text=command_string)
- cmd.save()
-
- self.commands.append(cmd)
- self.save()
-
- def to_table_list(self, max_user_agent_width: int) -> List[Union[str, int]]:
- """ Converts this `Client` instance to a `tableformatter` list """
-
- return [
- self.cid,
- self._generate_shortened_user_agent(max_user_agent_width),
- self.registered_on,
- self.humanized_last_seen
- ]
-
- def __repr__(self):
- """ Returns the string representation of this `Client` instance """
-
- return f''
diff --git a/common/models/command.py b/common/models/command.py
deleted file mode 100644
index a583576..0000000
--- a/common/models/command.py
+++ /dev/null
@@ -1,125 +0,0 @@
-from typing import List
-
-from common.models import db
-from common.models.output import Output
-from common.utils import now, new_uuid
-
-NOT_YET_SERVED = 'queued'
-SERVED_BUT_NOT_COMPLETE = 'served'
-COMPLETE = 'complete'
-
-
-class Command(db.Document):
- """ Command Model - describes a executed command"""
-
- cid = db.StringField(required=True, primary_key=True, default=new_uuid)
- text = db.StringField(required=True)
- created_on = db.DateTimeField(default=now)
- is_served = db.BooleanField(default=False)
- is_complete = db.BooleanField(default=False)
- output = db.ReferenceField(Output)
-
- meta = {
- 'indexes': [
- 'created_on',
- 'is_served'
- ]
- }
-
- @property
- def status(self) -> str:
- """ Returns a human friendly status """
-
- status = NOT_YET_SERVED
-
- if self.is_served:
- status = SERVED_BUT_NOT_COMPLETE
-
- if self.is_complete:
- status = COMPLETE
-
- return status
-
- @property
- def colored_status(self) -> str:
- """ Returns a human friendly colored status """
-
- reset = '\033[0m'
- blue = '\033[34m'
- yellow = '\033[93m'
- green = '\033[32m'
-
- return {
- NOT_YET_SERVED: yellow,
- SERVED_BUT_NOT_COMPLETE: blue,
- COMPLETE: green
- }.get(self.status, '') + self.status + reset
-
- def _generate_shortened_command_text(self, max_cmd_width: int) -> str:
- """ Generated a shortened command based on the longest
- command the selected client holds """
-
- if not self.text:
- return '-'
-
- if len(self.text) <= max_cmd_width:
- return self.text
-
- return self.text[:max_cmd_width - 3] + '...'
-
- def _generate_shortened_output_text(self, max_cmd_width: int) -> str:
- """ Generated a shortened output based on the longest
- output the selected client holds """
-
- if not (self.output and self.output.text):
- return '-'
-
- if len(self.output.text) <= max_cmd_width:
- return self.output.text
-
- return self.output.text[:max_cmd_width - 3] + '...'
-
- def set_served(self) -> None:
- """ Handles all the needed operations to set the `is_served` status """
-
- self.is_served = True
- self.save()
-
- def set_output(self, output: Output) -> None:
- """ Handles all the needed operations to set the `output` status """
-
- self.is_complete = True
- self.output = output
- self.save()
-
- def to_table_list(self, max_cmd_width: int, max_out_width: int) -> List[str]:
- """ Converts this `Command` instance to a `tableformatter` list """
-
- return [
- self.cid,
- self.colored_status,
- self.created_on,
- self._generate_shortened_command_text(max_cmd_width),
- self._generate_shortened_output_text(max_out_width)
- ]
-
- def to_dict(self):
- """ Converts the class instance into a dict """
-
- return {
- 'id': self.cid,
- 'status': self.status,
- 'created_on': str(self.created_on),
- 'text': self.text
- }
-
- def __repr__(self):
- """ Returns the string representation of this `Command` instance """
-
- return f''
diff --git a/common/models/output.py b/common/models/output.py
deleted file mode 100644
index dc3fe9b..0000000
--- a/common/models/output.py
+++ /dev/null
@@ -1,31 +0,0 @@
-from common.models import db
-from common.utils import now
-
-
-class Output(db.Document):
- """ Output Model - describes a executed command"""
-
- text = db.StringField(default='-')
- created_on = db.DateTimeField(default=now)
-
- meta = {
- 'indexes': [
- 'created_on'
- ]
- }
-
- def to_dict(self):
- """ Converts the class instance into a dict """
-
- return {
- 'text': self.text,
- 'created_on': str(self.created_on)
- }
-
- def __repr__(self):
- """ Returns the string representation of this `Output` instance """
-
- return f'