[PLUG] File recovery
Daniel Johnson
teknotus at gmail.com
Wed Feb 25 21:47:12 UTC 2009
> Gah I knew I was being dyslexic. Again thank you for the info.
Okay this is tested, and works to find the byte offsets of perl files.
Don't have a good extractor to go with it.
#!/usr/bin/perl
my $partition;
open($partition,'<','/dev/sdb2') or die("could not open file\n");
seek($partition,0,0);
print "starting at position:", tell($partition), "\n";
for(my $block=0;seek($partition,1024 * $block,0);$block++)
{
my $pos = tell($partition);
#print STDERR "\rcurrent block:", $block;
my $line;
read($partition,$line,20);
if($line =~ qr{^#! */usr/bin/perl})
{
#print STDERR "\n";
print "$pos\n";
#print STDERR "\n";
}
}
#print "\n";
More information about the PLUG
mailing list