develooper Front page | perl.beginners | Postings from August 2009

Exploiting the Perl

From:
Steve Bertrand
Date:
August 27, 2009 18:59
Subject:
Exploiting the Perl
Message ID:
4A9739E5.40904@ibctech.ca
My last question, rephrased to be direct-to-the-point:

Multi-part howto, or STFU if it's not possible request:

- create a scalar to contain the memory address of a reference to a
complex data structure

- store ONLY the memory address using 'Storable' (or some other mechanism)

- create a cyclical reference within the data structure

- let everything referring to the data structure go out of scope

- exploit the fact that Perl GC can't delete this memory allocation
(that is, without 'weaken')

- re-create the reference to the data structure into a scalar, by
lifting the memory address from disk using 'Storable' (or some other
mechanism)

- use the original data.

Steve



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About