Stack2 looks at environment variables, and how they can be set. (link)
This one still looks pretty similar to the first two, except now we need to set an environment variable instead of passing our buffer-overflowing string in as an argument.
So if we do the same thing as last time, except update the target modified value and use our python code in an export statement like this:
$ export GREENIE="$(python -c "print 'x'*64 + '\x0a\x0d\x0a\x0d'")"
We should be good.
Running $ ./stack2 after setting GREENIE prints this:
you have correctly modified the variable