Gossamer Forum
Home : General : Perl Programming :

Perl script to find and print hidden value

Quote Reply
Perl script to find and print hidden value
Hello, i have a program developed in perl but i need a script to make the program find a hidden value in a html text document.
Ex:
<body>
.......
<input type="hidden" value='6291587' name='class_id'>
<input type="hidden" value='4' name='key5'>
<input type="hidden" value='EF3854' name='11'>
</font></form>
</body></html>
it would read the txt with the html source code and show the third line value.. for ex: print EF3854 without the ''.
I have a program that uses the post method, but it needs some keys and values...that value changes all the time so i need it to search it from an .txt(key.txt) file and them send it to the prog so it can do the Post..etc..

the part of the prog is:

var rawfile = key.txt (THIS WILL BE THE HTML SOURCE TXT FILE)
get url http://www.berny.com/Scripts/ENTERMSG.asp?group=&kkey=&pass_id=213453

var 2wayproc = perl key.pl (THIS WOULD BE THE SCRIPT TO FIND THE HIDDEN VALUE)
subst KEY6 2wayread
field pass_id = 213453
field msg_id = 2666295
field key5 = 4
field 11 = $$KEY6$$ (THIS WOULD BE THE KEY I NEED)
var Referer = http://www.berny.com/Scripts/ENTERMSG.asp?group=&kkey=&pass_id=213453
post url http://www.berny.com/Scripts/ENTERMSG.asp
print a msg foi impressa


thanksWink , i really need this help...i tried everything but i could not make it work...it seems to be a simple script to get a value from a txt file...
Quote Reply
Re: [nacodc] Perl script to find and print hidden value In reply to
I moved your post to a forum that is more appropriate for it.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [nacodc] Perl script to find and print hidden value In reply to
Hmm Im a bit confused but to start with what language is the code written in?...it looks like a mix of javascript and perl?
Quote Reply
Re: [Paul] Perl script to find and print hidden value In reply to
Thanks for the help, but i have found a solution to it..



ThanksWink