From: Tod Beardsley Date: 2008-09-20T03:15:12+09:00 Subject: Re: How to provide variable to irb session A cheaty way: http://snippets.dzone.com/posts/show/6099 On Fri, Sep 19, 2008 at 12:21 PM, Thomas B. wrote: > Bryan Richardson wrote: >> Hello all, >> >> Can anyone tell me how I would go about providing a variable to an irb >> session? For example, see the following screenshot from the Metasploit >> Meterpreter in irb mode. >> >> http://www.metasploit.com/images/gallery/msf3-meterp-irb.jpg >> >> Does anyone know how they are actually providing the 'client' variable >> to the irb session? >> >> -- >> Thanks! >> Bryan > > You can run your script at Ruby startup by specifying env variables > (http://al2o3-cr.blogspot.com/2008/09/class-array.html, scroll to Add to > load path), or you can specify env variable IRBRC pointing to a Ruby > file that will be executed at the start of irb only. > > TPR. > -- > Posted via http://www.ruby-forum.com/. > > -- todb@planb-security.net | ICQ: 335082155 | Note: Due to Google's privacy policy and the United States' policy on electronic surveillance , please do not IM/e-mail me anything you wish to remain secret.