Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Feed input to program using text file in windows???


  • Please log in to reply
5 replies to this topic

#1 bomblast

bomblast

  • Members
  • 68 posts
  • OFFLINE
  •  
  • Local time:10:09 AM

Posted 30 August 2013 - 08:24 AM

Is there a way I can skip typing through keyboard and input data into a program running on windows 7 through text file?? Actually there is a program called Cyberoam client which takes Cyberoam server IP from user and then checks whether the server IP is correct... I want to automate the process of entering the IP into its textbox and then press "Check" button and stop if it finds a valid IP... Is this possible on windows 7 by creating some loops to enter this IP ranges automatically???


Edited by hamluis, 30 August 2013 - 05:29 PM.
Moved from Programming to All Other Appplications - Hamluis.


BC AdBot (Login to Remove)

 


#2 Billy O'Neal

Billy O'Neal

    Visual C++ STL Maintainer


  • Malware Response Team
  • 12,304 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Redmond, Washington
  • Local time:09:39 PM

Posted 30 August 2013 - 04:52 PM

Yes; plenty of applications can mimic keyboard commands, such as Auto Hotkey.

Billy3
Twitter - My statements do not establish the official position of Microsoft Corporation, and are my own personal opinion. (But you already knew that, right?)
Posted Image

#3 bomblast

bomblast
  • Topic Starter

  • Members
  • 68 posts
  • OFFLINE
  •  
  • Local time:10:09 AM

Posted 30 August 2013 - 11:32 PM

Yes; plenty of applications can mimic keyboard commands, such as Auto Hotkey.

Billy3

Yes, i have tried using Autohotkey but I am unable to write a program using it which can do the above task... Can u help me out?



#4 Vampire1408

Vampire1408

  • Members
  • 5 posts
  • OFFLINE
  •  
  • Local time:05:39 AM

Posted 01 September 2013 - 04:16 PM

You can also use a scripting language such as python to parse the text (in batches) and then output a file listing invalid/valid IP addresses. Alternatively you can look for options online (I assume you want to if the IP addresses are reachable or something?)  Here's the first google result for pinging multiple host names and IP addresses: http://www.nirsoft.net/utils/multiple_ping_tool.html



#5 bomblast

bomblast
  • Topic Starter

  • Members
  • 68 posts
  • OFFLINE
  •  
  • Local time:10:09 AM

Posted 02 September 2013 - 06:17 AM

You can also use a scripting language such as python to parse the text (in batches) and then output a file listing invalid/valid IP addresses. Alternatively you can look for options online (I assume you want to if the IP addresses are reachable or something?)  Here's the first google result for pinging multiple host names and IP addresses: http://www.nirsoft.net/utils/multiple_ping_tool.html

Sorry but I do not know python so nicely... can you help with what you said and how to write in code?



#6 Vampire1408

Vampire1408

  • Members
  • 5 posts
  • OFFLINE
  •  
  • Local time:05:39 AM

Posted 02 September 2013 - 01:17 PM

If you do a quick search ( https://startpage.com/do/search?q=python+parse+text+file+line+by+line&lui=english )

you can find some information about what to do. What you basically want, from my assumption earlier is you want to parse IP addresses (lets assume they're just IPv4 ones on each line in a standard windows .txt file). There are various ways to do this, you can manually create your own script and loop through each line, use regex or find an inbuilt function. I haven't really used it in a while and I'm not that great but if you've used another language like JS you should be fine.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users