|
||||||
| General Programming Non language specific and anything not covered in other topics. Talk about Programming Theory here. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
Hi
I need some help creating a script that can gather IP Address from within .RDP or .vRD files, then output to the IP Address to a text file. I then need that IP Address from that text file to be automatically inputted into a .cpp file, subsequently compiled and given the same name as the .RDP or .vRD file. The .cpp file is basically a batch file (without the Command-Prompt window) which launches vnc viewer (UltraVNC) with username and password, unlike .VNC files which are limited to password ONLY authentication. This dual authentication is achieved using the following; vncviewer.exe /connect xx.xx.xx.xx:5900 /user USERID /password PASSWORD lscrat was used to do the /connect etc. Please give me an example of a script which can gather the IP Address & Name from .RDP or .vRD files, then input both the IP Address & Name into a logfile, subsequently copying the IP Address into a .cpp file, compiling it, then renaming the *.exe to the name which correlates to the IP Address. Thanks in advance, Panarchy |
|
||||
|
Re: HELP: Script to gather IP Address from .RDP then compile to .exe for VNC
boost::regex has perl-style regular expressions and is well-documented.
__________________
CodeCall Blog | CodeCall Wiki | Shareware Programming is a branch of mathematics. My CodeCall Blog | My Personal Blog |
|
|||
|
Re: HELP: Script to gather IP Address from .RDP then compile to .exe for VNC
dargueta & WingedPanther: I don't care which language it is (heck, choose Delphi or Assembly!!!), as long as it works. Doesn't need to have an interpreter/environment for Windows, just as long as the end product (the *.exe) is compatible with Windows.
So please try your best, to give me a coding example which exports both the name and IP Address from .RDP or .vRD files, into a .cpp file, subsequently compiling that with the name & IP Address of the .RDP or .vRD file. Thanks in advance, Panarchy |
|
||||
|
Re: HELP: Script to gather IP Address from .RDP then compile to .exe for VNC
I'm not familiar with the .RDP or .VRD file format. Getting that would be the first step.
__________________
CodeCall Blog | CodeCall Wiki | Shareware Programming is a branch of mathematics. My CodeCall Blog | My Personal Blog |
|
|||
|
Re: HELP: Script to gather IP Address from .RDP then compile to .exe for VNC
By exporting to an .cpp, I mean inputting data to the exact line of the IP Address, changing it, then compiling.
A friend has them stored in a .csv file though, I'm just waiting for him to send it to me, then I'll give you a copy. In the meantime, can you predict how it would work? Thanks in advance, Panarchy |
|
||||
|
Re: HELP: Script to gather IP Address from .RDP then compile to .exe for VNC
Probably pattern matching and replacing. I found a pretty good tutorial on regular expressions you might want to look at.
|
|
|||
|
Re: HELP: Script to gather IP Address from .RDP then compile to .exe for VNC
if your friend has the info on a cvs file would it not be more useful to use something like excel and a vb style macro to filter them out into different files ?
Or as suggested if you have it in a cvs file, do a while loop in perl and then use the substitute functionality within perl to find and replace the old ip address with the next one then issue the compiler function before moving ontot he next loop. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
All times are GMT -5. The time now is 09:51 AM.
Amrosama.cc
Arekbulski.cc
Debtboy.cc
Guest.cc
Jaan.cc
James.cc
Mathx.cc
Tsz.cc
Vswe.cc