mirror of
https://github.com/Marsh232/Telegram-IP-CALC.git
synced 2026-10-12 03:34:12 +00:00
Add subnets
This commit is contained in:
Generated
+28
-19
@@ -4,7 +4,7 @@
|
|||||||
<option name="autoReloadType" value="SELECTIVE" />
|
<option name="autoReloadType" value="SELECTIVE" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="56d3644b-12ed-4137-967a-9e3a3c12d93b" name="Changes" comment="">
|
<list default="true" id="56d3644b-12ed-4137-967a-9e3a3c12d93b" name="Changes" comment="add func subnets">
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
|
||||||
</list>
|
</list>
|
||||||
@@ -27,20 +27,20 @@
|
|||||||
<option name="hideEmptyMiddlePackages" value="true" />
|
<option name="hideEmptyMiddlePackages" value="true" />
|
||||||
<option name="showLibraryContents" value="true" />
|
<option name="showLibraryContents" value="true" />
|
||||||
</component>
|
</component>
|
||||||
<component name="PropertiesComponent"><![CDATA[{
|
<component name="PropertiesComponent">{
|
||||||
"keyToString": {
|
"keyToString": {
|
||||||
"ASKED_SHARE_PROJECT_CONFIGURATION_FILES": "true",
|
"ASKED_SHARE_PROJECT_CONFIGURATION_FILES": "true",
|
||||||
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
||||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||||
"WebServerToolWindowFactoryState": "false",
|
"WebServerToolWindowFactoryState": "false",
|
||||||
"last_opened_file_path": "C:/Users/truno/Documents/GitHub/Telegram-IP-CALC",
|
"last_opened_file_path": "C:/Users/truno/Documents/GitHub/Telegram-IP-CALC",
|
||||||
"node.js.detected.package.eslint": "true",
|
"node.js.detected.package.eslint": "true",
|
||||||
"node.js.detected.package.tslint": "true",
|
"node.js.detected.package.tslint": "true",
|
||||||
"node.js.selected.package.eslint": "(autodetect)",
|
"node.js.selected.package.eslint": "(autodetect)",
|
||||||
"node.js.selected.package.tslint": "(autodetect)",
|
"node.js.selected.package.tslint": "(autodetect)",
|
||||||
"settings.editor.selected.configurable": "proofread"
|
"settings.editor.selected.configurable": "proofread"
|
||||||
}
|
}
|
||||||
}]]></component>
|
}</component>
|
||||||
<component name="RunManager" selected="Python.main">
|
<component name="RunManager" selected="Python.main">
|
||||||
<configuration name="main (2)" type="PythonConfigurationType" factoryName="Python" nameIsGenerated="true">
|
<configuration name="main (2)" type="PythonConfigurationType" factoryName="Python" nameIsGenerated="true">
|
||||||
<option name="INTERPRETER_OPTIONS" value="" />
|
<option name="INTERPRETER_OPTIONS" value="" />
|
||||||
@@ -103,7 +103,8 @@
|
|||||||
<workItem from="1662485900255" duration="690000" />
|
<workItem from="1662485900255" duration="690000" />
|
||||||
<workItem from="1662496666820" duration="3601000" />
|
<workItem from="1662496666820" duration="3601000" />
|
||||||
<workItem from="1662542574124" duration="3363000" />
|
<workItem from="1662542574124" duration="3363000" />
|
||||||
<workItem from="1662648763510" duration="5768000" />
|
<workItem from="1662648763510" duration="5935000" />
|
||||||
|
<workItem from="1662886058001" duration="1294000" />
|
||||||
</task>
|
</task>
|
||||||
<task id="LOCAL-00001" summary="Add basic output">
|
<task id="LOCAL-00001" summary="Add basic output">
|
||||||
<created>1662545492088</created>
|
<created>1662545492088</created>
|
||||||
@@ -119,7 +120,14 @@
|
|||||||
<option name="project" value="LOCAL" />
|
<option name="project" value="LOCAL" />
|
||||||
<updated>1662545590298</updated>
|
<updated>1662545590298</updated>
|
||||||
</task>
|
</task>
|
||||||
<option name="localTasksCounter" value="3" />
|
<task id="LOCAL-00003" summary="add func subnets">
|
||||||
|
<created>1662661462393</created>
|
||||||
|
<option name="number" value="00003" />
|
||||||
|
<option name="presentableId" value="LOCAL-00003" />
|
||||||
|
<option name="project" value="LOCAL" />
|
||||||
|
<updated>1662661462393</updated>
|
||||||
|
</task>
|
||||||
|
<option name="localTasksCounter" value="4" />
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
<component name="TypeScriptGeneratedFilesManager">
|
<component name="TypeScriptGeneratedFilesManager">
|
||||||
@@ -139,20 +147,21 @@
|
|||||||
<component name="VcsManagerConfiguration">
|
<component name="VcsManagerConfiguration">
|
||||||
<MESSAGE value="Add basic output" />
|
<MESSAGE value="Add basic output" />
|
||||||
<MESSAGE value="hz" />
|
<MESSAGE value="hz" />
|
||||||
<option name="LAST_COMMIT_MESSAGE" value="hz" />
|
<MESSAGE value="add func subnets" />
|
||||||
|
<option name="LAST_COMMIT_MESSAGE" value="add func subnets" />
|
||||||
</component>
|
</component>
|
||||||
<component name="XDebuggerManager">
|
<component name="XDebuggerManager">
|
||||||
<breakpoint-manager>
|
<breakpoint-manager>
|
||||||
<breakpoints>
|
<breakpoints>
|
||||||
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
|
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
|
||||||
<url>file://$PROJECT_DIR$/main.py</url>
|
<url>file://$PROJECT_DIR$/main.py</url>
|
||||||
<line>37</line>
|
<line>45</line>
|
||||||
<option name="timeStamp" value="1" />
|
<option name="timeStamp" value="1" />
|
||||||
</line-breakpoint>
|
</line-breakpoint>
|
||||||
</breakpoints>
|
</breakpoints>
|
||||||
</breakpoint-manager>
|
</breakpoint-manager>
|
||||||
</component>
|
</component>
|
||||||
<component name="com.intellij.coverage.CoverageDataManagerImpl">
|
<component name="com.intellij.coverage.CoverageDataManagerImpl">
|
||||||
<SUITE FILE_PATH="coverage/Telegram_IP_CALC$main.coverage" NAME="main Coverage Results" MODIFIED="1662659792918" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
|
<SUITE FILE_PATH="coverage/Telegram_IP_CALC$main.coverage" NAME="main Coverage Results" MODIFIED="1662887260465" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
@@ -26,8 +26,16 @@ def subnets(ip, prefix):
|
|||||||
subnet1 = ipaddress.ip_network(str(list_subnet[1]), strict=False)
|
subnet1 = ipaddress.ip_network(str(list_subnet[1]), strict=False)
|
||||||
|
|
||||||
print('\nМаска:', subnet1.netmask, '=', prefix)
|
print('\nМаска:', subnet1.netmask, '=', prefix)
|
||||||
|
print()
|
||||||
|
|
||||||
#for i in
|
for i in list_subnet:
|
||||||
|
subnet2 = ipaddress.ip_network(i, strict=False)
|
||||||
|
print('Network:', subnet2)
|
||||||
|
print('Broadcast:', subnet2.broadcast_address)
|
||||||
|
print('HostMin:', subnet2[1])
|
||||||
|
print('HostMax:', subnet2[-2])
|
||||||
|
print('Hosts:', len(list((subnet2.hosts()))))
|
||||||
|
print()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|||||||
Reference in New Issue
Block a user