Bill, playing around a bit more with Win32::Process::Memory, I've noticed
this bit of code:
# search a sequence of unsigned int16
print "\nFind a sequence of unsinged int16:\n";
my @results = $proc->search_u16(92, 87, 105, 110, 51, 50);
print $proc->hexdump($_, 0x32)."\n" foreach @results;
As far as I know the search is not documented and I cannot arrive to know
what the numbers (92, 87, 105, 110, 51, 50) mean.
Bill, are you able to explain it?
Alejandro
----- Original Message -----
From: "Alejandro Santillan Iturres" <[EMAIL PROTECTED]>
To: "$Bill Luebkert" <[EMAIL PROTECTED]>
Cc: <perl-win32-users@listserv.ActiveState.com>
Sent: Saturday, August 27, 2005 4:23 PM
Subject: Re: Win 32 memory access
Thank you very much, Bill. This trick worked fine. Now I have all the
memory allocated by the program in a text file. Now I just have to refine
the script to look for the specific number. Have great weekend!!
Alejandro
----- Original Message -----
From: "$Bill Luebkert" <[EMAIL PROTECTED]>
To: "Alejandro Santillan Iturres" <[EMAIL PROTECTED]>
Cc: <perl-win32-users@listserv.ActiveState.com>
Sent: Saturday, August 27, 2005 12:20 PM
Subject: Re: Win 32 memory access
Alejandro Santillan Iturres wrote:
Well, the number is 1223.56 for just a couple of seconds (it is the
S&P500
value). But if I am able to get the memory dumped I can seek for
some sequence of chars that precede the number in order of getting its
value
as it evolves in time.
What I have no idea is how to get a complete memory dump of this program
in
the form of a text file so I am able to parse it beforehand.
That's easy just run this and redirect into a file:
use strict;
use warnings;
use Win32::Process::Memory;
# pass the pid in as first arg
my $proc = Win32::Process::Memory->new({pid => shift}) or
die "new Win32::Process::Memory: $! ($^E)";
my %memlist = $proc->get_memlist;
foreach (sort { $a <=> $b } keys %memlist) {
print "$_ => $memlist{$_}\n";
print $proc->hexdump($_, $memlist{$_}) . "\n";
}
__END__
--
,-/- __ _ _ $Bill Luebkert Mailto:[EMAIL PROTECTED]
(_/ / ) // // DBE Collectibles Mailto:[EMAIL PROTECTED]
/ ) /--< o // // Castle of Medieval Myth & Magic
http://www.todbe.com/
-/-' /___/_<_</_</_ http://dbecoll.tripod.com/ (My Perl/Lakers stuff)
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs