Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help to create a script
#1
Hi, I'd like to create a script that from a .txt list analyzes all the IP addresses if they are online, and then it must create a file and insert them in there at the end of the scan.
Reply
#2
sounds like a great project. Don't hesitate to post here when you have specific question. Post your code in python tags and full traceback if you get any error - in error tags.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#3
Maybe you want to use low level sockets from the Python stdlib.
If you want to check, if an IP is up, you have two possibilities:
  • ICMP, ping the server and hope, that ICMP is not blocked. You can use the provided ping program of your operating system. In this case you have to execute a program. (subprocess module).
  • TCP, connect to a open port. This is interesting, if the IP has a running service. This could be for example a Webserver. Usually Webservers listen on Port 80.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020