Initital commit

This commit is contained in:
ChronosX88 2019-01-20 20:59:47 +04:00
commit dfb96cab15
No known key found for this signature in database
GPG Key ID: 8F92E090A87804AA
16 changed files with 1013 additions and 0 deletions

11
.idea/Nesca.iml Normal file
View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="TestRunnerService">
<option name="PROJECT_TEST_RUNNER" value="Unittests" />
</component>
</module>

4
.idea/encodings.xml Normal file
View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" addBOMForNewFiles="with NO BOM" />
</project>

4
.idea/misc.xml Normal file
View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.6" project-jdk-type="Python SDK" />
</project>

8
.idea/modules.xml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/Nesca.iml" filepath="$PROJECT_DIR$/.idea/Nesca.iml" />
</modules>
</component>
</project>

598
.idea/workspace.xml Normal file
View File

@ -0,0 +1,598 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="154881a2-2873-49b1-a32d-59f525be10d9" name="Default Changelist" comment="" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/main.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="375">
<caret line="25" selection-start-line="25" selection-end-line="25" />
<folding>
<element signature="e#0#10#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/MainPresenter.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="266">
<caret line="39" column="46" selection-start-line="39" selection-start-column="46" selection-end-line="39" selection-end-column="46" />
<folding>
<element signature="e#0#16#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/Parser.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="210">
<caret line="14" column="15" lean-forward="true" selection-start-line="14" selection-start-column="15" selection-end-line="14" selection-end-column="16" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$APPLICATION_HOME_DIR$/helpers/pydev/_pydevd_bundle/pydevd_comm.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="149">
<caret line="391" column="16" selection-start-line="391" selection-start-column="16" selection-end-line="391" selection-end-column="16" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/CoreModel.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="150">
<caret line="10" column="36" lean-forward="true" selection-start-line="10" selection-start-column="36" selection-end-line="10" selection-end-column="36" />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="Qt Form" />
<option value="Python Script" />
</list>
</option>
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/main.py" />
<option value="$PROJECT_DIR$/main_ui.py" />
<option value="$PROJECT_DIR$/Parser.py" />
<option value="$APPLICATION_HOME_DIR$/helpers/pydev/_pydevd_bundle/pydevd_comm.py" />
<option value="$PROJECT_DIR$/CoreModel.py" />
<option value="$PROJECT_DIR$/MainPresenter.py" />
</list>
</option>
</component>
<component name="ProjectFrameBounds" extendedState="6">
<option name="x" value="140" />
<option name="y" value="48" />
<option name="width" value="1400" />
<option name="height" value="953" />
</component>
<component name="ProjectView">
<navigator proportions="" version="1">
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="ProjectPane">
<subPane>
<expand>
<path>
<item name="Nesca" type="b2602c69:ProjectViewProjectNode" />
<item name="Nesca" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
</pane>
<pane id="Scope" />
</panes>
</component>
<component name="PropertiesComponent">
<property name="settings.editor.selected.configurable" value="com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable" />
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
<RuleState>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
</RuleState>
<RuleState>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component>
<component name="RunManager">
<configuration name="main" type="PythonConfigurationType" factoryName="Python" temporary="true">
<module name="Nesca" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/main.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<recent_temporary>
<list>
<item itemvalue="Python.main" />
</list>
</recent_temporary>
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="154881a2-2873-49b1-a32d-59f525be10d9" name="Default Changelist" comment="" />
<created>1547744147598</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1547744147598</updated>
</task>
<servers />
</component>
<component name="ToolWindowManager">
<frame x="-2" y="28" width="1684" height="995" extended-state="6" />
<layout>
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.20687576" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info id="Favorites" order="2" side_tool="true" />
<window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Find" order="1" />
<window_info anchor="bottom" id="Run" order="2" weight="0.32947975" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<window_info anchor="bottom" id="TODO" order="6" />
<window_info anchor="bottom" id="Version Control" order="7" />
<window_info anchor="bottom" id="Terminal" order="8" weight="0.32947975" />
<window_info anchor="bottom" id="Event Log" order="9" side_tool="true" weight="0.32947975" />
<window_info anchor="bottom" id="Python Console" order="10" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
</layout>
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
<breakpoints>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/main.py</url>
<line>21</line>
<option name="timeStamp" value="2" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/main.py</url>
<line>22</line>
<option name="timeStamp" value="3" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/main.py</url>
<line>23</line>
<option name="timeStamp" value="4" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/main.py</url>
<line>24</line>
<option name="timeStamp" value="11" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/main.py</url>
<line>26</line>
<option name="timeStamp" value="12" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/main.py</url>
<line>28</line>
<option name="timeStamp" value="13" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/main.py</url>
<line>29</line>
<option name="timeStamp" value="14" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/main.py</url>
<line>25</line>
<option name="timeStamp" value="15" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/main.py</url>
<line>27</line>
<option name="timeStamp" value="16" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/Parser.py</url>
<line>9</line>
<option name="timeStamp" value="31" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/Parser.py</url>
<line>10</line>
<option name="timeStamp" value="32" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/Parser.py</url>
<line>15</line>
<option name="timeStamp" value="33" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/Parser.py</url>
<line>14</line>
<option name="timeStamp" value="34" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/Parser.py</url>
<line>7</line>
<option name="timeStamp" value="35" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/Parser.py</url>
<line>4</line>
<option name="timeStamp" value="36" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/Parser.py</url>
<line>6</line>
<option name="timeStamp" value="37" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/Parser.py</url>
<line>5</line>
<option name="timeStamp" value="38" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/Parser.py</url>
<line>8</line>
<option name="timeStamp" value="39" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/MainPresenter.py</url>
<line>44</line>
<option name="timeStamp" value="48" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/MainPresenter.py</url>
<line>48</line>
<option name="timeStamp" value="51" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/MainPresenter.py</url>
<line>51</line>
<option name="timeStamp" value="65" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/MainPresenter.py</url>
<line>50</line>
<option name="timeStamp" value="66" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/MainPresenter.py</url>
<line>34</line>
<option name="timeStamp" value="95" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/MainPresenter.py</url>
<line>32</line>
<option name="timeStamp" value="96" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/MainPresenter.py</url>
<line>31</line>
<option name="timeStamp" value="97" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/Parser.py</url>
<line>11</line>
<option name="timeStamp" value="101" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/Parser.py</url>
<line>12</line>
<option name="timeStamp" value="102" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/Parser.py</url>
<line>13</line>
<option name="timeStamp" value="107" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/MainPresenter.py</url>
<line>19</line>
<option name="timeStamp" value="108" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/MainPresenter.py</url>
<line>71</line>
<option name="timeStamp" value="112" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/MainPresenter.py</url>
<line>75</line>
<option name="timeStamp" value="114" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/MainPresenter.py</url>
<line>72</line>
<option name="timeStamp" value="115" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/MainPresenter.py</url>
<line>73</line>
<option name="timeStamp" value="116" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/MainPresenter.py</url>
<line>74</line>
<option name="timeStamp" value="117" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/MainPresenter.py</url>
<line>79</line>
<option name="timeStamp" value="118" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/MainPresenter.py</url>
<line>80</line>
<option name="timeStamp" value="119" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/MainPresenter.py</url>
<line>45</line>
<option name="timeStamp" value="120" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/MainPresenter.py</url>
<line>46</line>
<option name="timeStamp" value="121" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/MainPresenter.py</url>
<line>47</line>
<option name="timeStamp" value="122" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/MainPresenter.py</url>
<line>78</line>
<option name="timeStamp" value="123" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/MainPresenter.py</url>
<line>77</line>
<option name="timeStamp" value="124" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/MainPresenter.py</url>
<line>76</line>
<option name="timeStamp" value="125" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/CoreModel.py</url>
<line>8</line>
<option name="timeStamp" value="126" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/CoreModel.py</url>
<line>9</line>
<option name="timeStamp" value="127" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/CoreModel.py</url>
<line>11</line>
<option name="timeStamp" value="128" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/CoreModel.py</url>
<line>12</line>
<option name="timeStamp" value="129" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/CoreModel.py</url>
<line>10</line>
<option name="timeStamp" value="131" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/CoreModel.py</url>
<line>13</line>
<option name="timeStamp" value="143" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/CoreModel.py</url>
<line>15</line>
<option name="timeStamp" value="144" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/CoreModel.py</url>
<line>17</line>
<option name="timeStamp" value="145" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/CoreModel.py</url>
<line>14</line>
<option name="timeStamp" value="146" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/CoreModel.py</url>
<line>16</line>
<option name="timeStamp" value="147" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/MainPresenter.py</url>
<line>20</line>
<option name="timeStamp" value="148" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/MainPresenter.py</url>
<line>22</line>
<option name="timeStamp" value="149" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/MainPresenter.py</url>
<line>21</line>
<option name="timeStamp" value="151" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/MainPresenter.py</url>
<line>26</line>
<option name="timeStamp" value="153" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/MainPresenter.py</url>
<line>28</line>
<option name="timeStamp" value="154" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/MainPresenter.py</url>
<line>27</line>
<option name="timeStamp" value="155" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/MainPresenter.py</url>
<line>29</line>
<option name="timeStamp" value="156" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/MainPresenter.py</url>
<line>33</line>
<option name="timeStamp" value="158" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/MainPresenter.py</url>
<line>54</line>
<option name="timeStamp" value="160" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/MainPresenter.py</url>
<line>53</line>
<option name="timeStamp" value="161" />
</line-breakpoint>
</breakpoints>
</breakpoint-manager>
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/main.ui" />
<entry file="file://$APPLICATION_HOME_DIR$/helpers/pydev/pydevd.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="164">
<caret line="1134" selection-start-line="1134" selection-end-line="1134" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/.local/lib/python3.6/site-packages/netaddr/ip/__init__.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="449">
<caret line="832" column="37" lean-forward="true" selection-start-line="832" selection-start-column="37" selection-end-line="832" selection-end-column="37" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/.PyCharmCE2018.3/system/python_stubs/-1247971763/PyQt5/QtCore/QThread.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="166">
<caret line="86" column="11" selection-start-line="86" selection-start-column="11" selection-end-line="86" selection-end-column="11" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/.PyCharmCE2018.3/system/python_stubs/-1247971763/PyQt5/QtCore/pyqtSignal.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-12">
<caret line="12" column="6" selection-start-line="12" selection-start-column="6" selection-end-line="12" selection-end-column="6" />
</state>
</provider>
</entry>
<entry file="file:///usr/lib/python3.6/threading.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-131">
<caret line="737" column="6" selection-start-line="737" selection-start-column="6" selection-end-line="737" selection-end-column="6" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/main_ui.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="285">
<caret line="19" column="47" selection-start-line="19" selection-start-column="47" selection-end-line="19" selection-end-column="47" />
</state>
</provider>
</entry>
<entry file="file://$APPLICATION_HOME_DIR$/helpers/typeshed/stdlib/2and3/socket.pyi">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="164">
<caret line="526" column="8" selection-start-line="526" selection-start-column="8" selection-end-line="526" selection-end-column="8" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Parser.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="210">
<caret line="14" column="15" lean-forward="true" selection-start-line="14" selection-start-column="15" selection-end-line="14" selection-end-column="16" />
</state>
</provider>
</entry>
<entry file="file://$APPLICATION_HOME_DIR$/helpers/pydev/_pydevd_bundle/pydevd_comm.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="149">
<caret line="391" column="16" selection-start-line="391" selection-start-column="16" selection-end-line="391" selection-end-column="16" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/CoreModel.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="150">
<caret line="10" column="36" lean-forward="true" selection-start-line="10" selection-start-column="36" selection-end-line="10" selection-end-column="36" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/main.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="375">
<caret line="25" selection-start-line="25" selection-end-line="25" />
<folding>
<element signature="e#0#10#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/MainPresenter.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="266">
<caret line="39" column="46" selection-start-line="39" selection-start-column="46" selection-end-line="39" selection-end-column="46" />
<folding>
<element signature="e#0#16#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</component>
</project>

18
CoreModel.py Normal file
View File

@ -0,0 +1,18 @@
import socket
class CoreModel:
def __init__(self):
self.defSocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
def scanIP(self, host, ports, timeout):
if timeout == '':
timeout = '3'
self.defSocket.settimeout(3)
openPorts = []
for i in ports[0]:
result = self.defSocket.connect_ex((host, int(i)))
if result == 0:
openPorts.append(i)
self.defSocket.close()
return openPorts

81
MainPresenter.py Normal file
View File

@ -0,0 +1,81 @@
import CoreModel
import Parser
import threading
import queue
from PyQt5.Qt import *
from netaddr import IPNetwork
class MainPresenter:
def __init__(self, ui):
self.coreModel = CoreModel.CoreModel()
self.ui = ui
self.threads = []
self.isScanEnabled = False
self.queue = queue.Queue()
def startScan(self, ipRanges, portsStr, threadNumber, timeout):
if timeout == '':
timeout = '3'
self.isScanEnabled = True
cidrIPRanges = Parser.getCIDRFromRanges(ipRanges)
ports = Parser.getPortsFromString(portsStr)
ips = []
for cidr in cidrIPRanges[0]:
for ip in IPNetwork(cidr):
ips.append(str(ip))
for ip in ips:
self.queue.put(ip)
for i in range(int(threadNumber)):
self.threads.append(ScanThread(self.queue, ports, timeout))
self.setCurrentThreadsLabel(len(self.threads))
for thread in self.threads:
thread.signal.connect(self.setLogText)
thread.finished.connect(self.onThreadExit)
thread.start()
def onThreadExit(self):
if len(self.threads) == 0:
self.setCurrentThreadsLabel(0)
self.ui.startButton.setText("Start")
else:
self.setCurrentThreadsLabel(len(self.threads) - 1)
def stopScan(self):
self.isScanEnabled = False
for thread in self.threads:
thread.exit(0)
self.threads = []
self.queue = queue.Queue()
def setLogText(self, string):
self.ui.dataText.append(str(string) + '\n')
def setCurrentThreadsLabel(self, threadNumber):
self.ui.currentThreadsLabel.setText(str(threadNumber))
class ScanThread(QThread):
signal = pyqtSignal(str)
def __init__(self, scanQueue, ports, timeout, parent=None):
QThread.__init__(self, parent)
self.scanQueue = scanQueue
self.coreModel = CoreModel.CoreModel()
self.ports = ports
self._stop_event = threading.Event()
self.timeout = timeout
def run(self):
while True:
if self.scanQueue.empty():
self.exit(1)
hostObject = self.scanQueue.get()
open_ports = self.coreModel.scanIP(str(hostObject), self.ports, self.timeout)
signalStr = ''.join(str(x) for x in open_ports)
if(signalStr == ''):
self.signal.emit(str(hostObject) + ' has no open ports!')
else:
self.signal.emit(str(hostObject) + ' has open ports: ' + signalStr)
self.scanQueue.task_done()

21
Parser.py Normal file
View File

@ -0,0 +1,21 @@
import netaddr
def getCIDRFromRanges(str_ranges):
str_ranges = str_ranges.replace(' ', '')
ranges = []
ips = []
splitted_ranges = str_ranges.split(",")
for i in splitted_ranges:
ranges.append(i.split("-"))
for i in ranges:
if len(ranges[ranges.index(i)]) == 1:
ips.append(netaddr.iprange_to_cidrs(i[0], i[0]))
else:
ips.append(netaddr.iprange_to_cidrs(i[0], i[1]))
return ips
def getPortsFromString(str_ports):
str_ports = str_ports.replace(" ", "")
return [str_ports.split(",")]

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

37
main.py Normal file
View File

@ -0,0 +1,37 @@
import sys
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
from main_ui import *
import MainPresenter
class MyWin(QtWidgets.QMainWindow):
def __init__(self, parent=None):
QtWidgets.QWidget.__init__(self, parent)
self.ui = Ui_Form()
self.ui.setupUi(self)
self.presenter = MainPresenter.MainPresenter(self.ui)
self.ui.startButton.clicked.connect(self.startButtonClicked)
self.isScanActive = False
def startButtonClicked(self):
if self.isScanActive == False:
self.isScanActive = True
self.ui.startButton.setText("Stop")
self.presenter.startScan(self.ui.ipLine.text(), self.ui.portsLine.text(), self.ui.threadsLine.text(),
self.ui.timeoutLine.text())
else:
self.isScanActive = False
self.ui.startButton.setText("Start")
self.presenter.stopScan()
if __name__ == "__main__":
app = QtWidgets.QApplication(sys.argv)
myapp = MyWin()
myapp.show()
sys.exit(app.exec_())

65
main_ui.py Normal file
View File

@ -0,0 +1,65 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'nesca.ui'
#
# Created by: PyQt5 UI code generator 5.11.3
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Form(object):
def setupUi(self, Form):
Form.setObjectName("Form")
Form.resize(422, 549)
self.startButton = QtWidgets.QPushButton(Form)
self.startButton.setGeometry(QtCore.QRect(140, 190, 131, 34))
self.startButton.setObjectName("startButton")
self.dataText = QtWidgets.QTextBrowser(Form)
self.dataText.setGeometry(QtCore.QRect(0, 310, 421, 231))
self.dataText.setObjectName("dataText")
self.ipLine = QtWidgets.QLineEdit(Form)
self.ipLine.setGeometry(QtCore.QRect(20, 70, 371, 34))
self.ipLine.setObjectName("ipLine")
self.label = QtWidgets.QLabel(Form)
self.label.setGeometry(QtCore.QRect(20, 50, 57, 18))
self.label.setObjectName("label")
self.portsLine = QtWidgets.QLineEdit(Form)
self.portsLine.setGeometry(QtCore.QRect(20, 130, 371, 34))
self.portsLine.setObjectName("portsLine")
self.label_2 = QtWidgets.QLabel(Form)
self.label_2.setGeometry(QtCore.QRect(20, 110, 31, 18))
self.label_2.setObjectName("label_2")
self.threadsLine = QtWidgets.QLineEdit(Form)
self.threadsLine.setGeometry(QtCore.QRect(20, 190, 113, 34))
self.threadsLine.setObjectName("threadsLine")
self.label_3 = QtWidgets.QLabel(Form)
self.label_3.setGeometry(QtCore.QRect(20, 170, 51, 18))
self.label_3.setObjectName("label_3")
self.timeoutLine = QtWidgets.QLineEdit(Form)
self.timeoutLine.setGeometry(QtCore.QRect(280, 190, 113, 34))
self.timeoutLine.setObjectName("timeoutLine")
self.label_4 = QtWidgets.QLabel(Form)
self.label_4.setGeometry(QtCore.QRect(280, 170, 51, 18))
self.label_4.setObjectName("label_4")
self.label_5 = QtWidgets.QLabel(Form)
self.label_5.setGeometry(QtCore.QRect(20, 250, 101, 18))
self.label_5.setObjectName("label_5")
self.currentThreadsLabel = QtWidgets.QLabel(Form)
self.currentThreadsLabel.setGeometry(QtCore.QRect(120, 250, 57, 18))
self.currentThreadsLabel.setObjectName("currentThreadsLabel")
self.retranslateUi(Form)
QtCore.QMetaObject.connectSlotsByName(Form)
def retranslateUi(self, Form):
_translate = QtCore.QCoreApplication.translate
Form.setWindowTitle(_translate("Form", "Form"))
self.startButton.setText(_translate("Form", "Start"))
self.label.setText(_translate("Form", "IP Ranges"))
self.label_2.setText(_translate("Form", "Ports"))
self.label_3.setText(_translate("Form", "Threads"))
self.label_4.setText(_translate("Form", "Timeout"))
self.label_5.setText(_translate("Form", "Current threads: "))
self.currentThreadsLabel.setText(_translate("Form", "0"))

160
nesca.ui Normal file
View File

@ -0,0 +1,160 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Form</class>
<widget class="QWidget" name="Form">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>422</width>
<height>549</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<widget class="QPushButton" name="startButton">
<property name="geometry">
<rect>
<x>140</x>
<y>190</y>
<width>131</width>
<height>34</height>
</rect>
</property>
<property name="text">
<string>Start</string>
</property>
</widget>
<widget class="QTextBrowser" name="dataText">
<property name="geometry">
<rect>
<x>0</x>
<y>310</y>
<width>421</width>
<height>231</height>
</rect>
</property>
</widget>
<widget class="QLineEdit" name="ipLine">
<property name="geometry">
<rect>
<x>20</x>
<y>70</y>
<width>371</width>
<height>34</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>20</x>
<y>50</y>
<width>57</width>
<height>18</height>
</rect>
</property>
<property name="text">
<string>IP Ranges</string>
</property>
</widget>
<widget class="QLineEdit" name="portsLine">
<property name="geometry">
<rect>
<x>20</x>
<y>130</y>
<width>371</width>
<height>34</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="label_2">
<property name="geometry">
<rect>
<x>20</x>
<y>110</y>
<width>31</width>
<height>18</height>
</rect>
</property>
<property name="text">
<string>Ports</string>
</property>
</widget>
<widget class="QLineEdit" name="threadsLine">
<property name="geometry">
<rect>
<x>20</x>
<y>190</y>
<width>113</width>
<height>34</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="label_3">
<property name="geometry">
<rect>
<x>20</x>
<y>170</y>
<width>51</width>
<height>18</height>
</rect>
</property>
<property name="text">
<string>Threads</string>
</property>
</widget>
<widget class="QLineEdit" name="timeoutLine">
<property name="geometry">
<rect>
<x>280</x>
<y>190</y>
<width>113</width>
<height>34</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="label_4">
<property name="geometry">
<rect>
<x>280</x>
<y>170</y>
<width>51</width>
<height>18</height>
</rect>
</property>
<property name="text">
<string>Timeout</string>
</property>
</widget>
<widget class="QLabel" name="label_5">
<property name="geometry">
<rect>
<x>20</x>
<y>250</y>
<width>101</width>
<height>18</height>
</rect>
</property>
<property name="text">
<string>Current threads: </string>
</property>
</widget>
<widget class="QLabel" name="currentThreadsLabel">
<property name="geometry">
<rect>
<x>120</x>
<y>250</y>
<width>57</width>
<height>18</height>
</rect>
</property>
<property name="text">
<string>0</string>
</property>
</widget>
</widget>
<resources/>
<connections/>
</ui>

6
nesca_3.qrc Normal file
View File

@ -0,0 +1,6 @@
<RCC>
<qresource prefix="/nesca_3">
<file>small_font.ttf</file>
<file>nesca.ico</file>
</qresource>
</RCC>