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...
Subject Author Views Date
Thread Perl script to find and print hidden value nacodc 3959 Dec 26, 2002, 11:09 AM
Post Re: [nacodc] Perl script to find and print hidden value
yogi 3815 Dec 26, 2002, 12:41 PM
Thread Re: [nacodc] Perl script to find and print hidden value
Paul 3792 Jan 3, 2003, 9:15 AM
Post Re: [Paul] Perl script to find and print hidden value
nacodc 3780 Jan 3, 2003, 11:00 AM