telnet with values from text file


Recommended Posts

Hi,

 

My problem is quite simple but I don't know if the solution will be simple.

 

I have text file (portlist.txt) in the following format:

NAT IP Address Ports
xx.xx.xx.xx 23
xx.xx.xx.xx 23
xx.xx.xx.xx 23
 
I want to know if the ports are open by telnet. And I want to output the result in a text file in the following format:
xx.xx.xx.xx OK
xx.xx.xx.aa KO
 
Is it possible to create a batch that will do the job? I know it can be done manually but I have around 106 servers to test.
 
Thanks.
 
 
Link to comment
https://www.neowin.net/forum/topic/1240104-telnet-with-values-from-text-file/
Share on other sites

angryip can scan open ports, you can save the output to a text file.  You can scan an entire class c in a few minutes, if all you are trying to do is see if a port is open or not.  A few seconds if you are trying to see what you have that can respond on that network.

http://angryip.org/

Another option would be nmap, you can scan a list of IPs, ports you want to check and it spits out the output for each IP.

Here is a nice gui for windows and nmap. http://nmap.org/zenmap/

Oh its more simple than I read, I thought you meant like connect to a list of IP's and issue some commands by telnet. Yeah loads can do this. Nirsoft Tools are good, NMap, Netscanner from Softperfect. etc etc etc etc etc etc etc Angry IP etc etc haha.

  On 18/12/2014 at 11:21, RedReddington said:

Oh its more simple than I read, I thought you meant like connect to a list of IP's and issue some commands by telnet. Yeah loads can do this. Nirsoft Tools are good, NMap, Netscanner from Softperfect. etc etc etc etc etc etc etc Angry IP etc etc haha.

 

i had this problem in the past. the solution was to use plink

http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

 

and this is the command to connect to an IP and issue commands from a text file. if multiple IPs, just put it in a batch file

 

plink.exe "ip address here" -P "port number here" -telnet < "text file name with commands here,so input.txt"

  • Like 1
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • That would be nice, if excel could refresh pivot tables without bugs. Frequently you refresh a pivot and all parameters get lost. Now this will happen automatically. Bravo MS!
    • If one could ever put all the crap of the world in one box, that would be Microsoft.
    • The most corrupt and vile CEO any company ever had ! The only company that makes an insane amount of money decade after decade but doesn't deliver on even barely passable quality to customers, screws over partners and treats employees like trash
    • PSA: Some other versions of Windows are losing support on October 14 too by Usama Jawad All of us here at Neowin likely know pretty well by now that Windows 10 is reaching end of support on October 14, 2025. You can extend support through paid and "free" means, but if you don't, you won't get any more security or feature updates following the aforementioned date. We also highlighted that the Long-Term Servicing Channel (LTSC) version Windows 10 22H2 is also reaching end of support on that date. Now, Microsoft has reminded customers that yet another variant of Windows is reaching end of life on October 14, 2025 too. On the Windows Release Health dashboard, Microsoft has published a reminder that the Enterprise, Education, and IoT SKUs of Windows 11, version 22H2 will hit end of support on October 14 as well. It is important to keep in mind that the Home and Pro variants of Windows 11, version 22H2 already reached end of life on October 8, 2024, and the extra year of lease on life will end for other SKUs within a few months too. Windows 11, version 22H2 for IoT, Enterprise, and Education was released on September 20, 2022, which means that they would have received just over three years of support by the time they "die", compared to the regular two years for Home and Pro. Customers on any of these versions should consider upgrading to version 23H2 or 24H2 as soon as possible, which have end of support dates of November 10, 2026 and October 12, 2027, respectively. Staying on a supported version of Windows is crucial as that allows you to receive regular security updates on your machine. If you're an IT admin, you should immediately begin planning a migration to a supported version of the operating system, and if you're an employee or someone using these versions of Windows in some other scenario, go to Settings > System > About and check out Windows Specifications > Version.
  • Recent Achievements

    • Dedicated
      Profit earned a badge
      Dedicated
    • One Month Later
      hhgygy earned a badge
      One Month Later
    • Week One Done
      hhgygy earned a badge
      Week One Done
    • One Year In
      NIKI77 earned a badge
      One Year In
    • Week One Done
      artistro08 earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      632
    2. 2
      ATLien_0
      237
    3. 3
      Xenon
      167
    4. 4
      neufuse
      146
    5. 5
      +FloatingFatMan
      123
  • Tell a friend

    Love Neowin? Tell a friend!