mirror of
https://github.com/Marsh232/Telegram-IP-CALC.git
synced 2026-04-22 16:06:37 +00:00
Add basic output №2
This commit is contained in:
26
.idea/workspace.xml
generated
26
.idea/workspace.xml
generated
@@ -4,7 +4,7 @@
|
||||
<option name="autoReloadType" value="SELECTIVE" />
|
||||
</component>
|
||||
<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="hz">
|
||||
<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" />
|
||||
</list>
|
||||
@@ -99,8 +99,23 @@
|
||||
<workItem from="1662478877356" duration="1804000" />
|
||||
<workItem from="1662485900255" duration="690000" />
|
||||
<workItem from="1662496666820" duration="3601000" />
|
||||
<workItem from="1662542574124" duration="2572000" />
|
||||
<workItem from="1662542574124" duration="3363000" />
|
||||
</task>
|
||||
<task id="LOCAL-00001" summary="Add basic output">
|
||||
<created>1662545492088</created>
|
||||
<option name="number" value="00001" />
|
||||
<option name="presentableId" value="LOCAL-00001" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1662545492088</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00002" summary="hz">
|
||||
<created>1662545590298</created>
|
||||
<option name="number" value="00002" />
|
||||
<option name="presentableId" value="LOCAL-00002" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1662545590298</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="3" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
@@ -117,7 +132,12 @@
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<MESSAGE value="Add basic output" />
|
||||
<MESSAGE value="hz" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="hz" />
|
||||
</component>
|
||||
<component name="com.intellij.coverage.CoverageDataManagerImpl">
|
||||
<SUITE FILE_PATH="coverage/Telegram_IP_CALC$main.coverage" NAME="main Coverage Results" MODIFIED="1662545082783" 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="1662545951987" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
|
||||
</component>
|
||||
</project>
|
||||
5
main.py
5
main.py
@@ -13,10 +13,11 @@ def main(ip):
|
||||
print('HostMin:', net[1])
|
||||
print('HostMax:', net[-2])
|
||||
print('Hosts:', len(list(net.hosts()))) # Выводит кол-во хостовых ip
|
||||
count = 0
|
||||
for n_ip in net.hosts():
|
||||
count += 1
|
||||
if str(n_ip) == list_ip[0]:
|
||||
list_n_ip = str(n_ip).split('.')
|
||||
print('№ в сети:', list_n_ip[3])
|
||||
print('№ в сети:', count) # Выводит какой ip по счёту в сети
|
||||
break
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user