Metasploit mailing list archives
Re: ruby coding question
From: HD Moore <hdm () metasploit com>
Date: Tue, 08 Dec 2009 16:42:24 -0600
On Tue, 2009-12-08 at 17:28 -0500, Jeffs wrote:
I have a snippet of code in a sploit that looks like this: out = new BufferedOutputStream(new FileOutputStream("c:\\\\#{@payload_name}")); but I wish the file to go to %TMP% instead. I've tried: out = new BufferedOutputStream(new FileOutputStream("\%TMP\%\\\\{@payload_name}")); but this throws out errors. not being a ruby maven I suspect that TMP needs to be declared somewhere first and would appreciate some help, if it's out there.
This isn't really the list for it, but the syntax you want is: path = File.join(ENV['TEMP'], @payloadname) -HD _______________________________________________ https://mail.metasploit.com/mailman/listinfo/framework
Current thread:
- nexpose_connect connection refused error..... keshav singh solanki (Dec 04)
- Re: nexpose_connect connection refused error..... HD Moore (Dec 05)
- ruby coding question Jeffs (Dec 08)
- Re: ruby coding question HD Moore (Dec 08)
- patchup prefix Jeffs (Dec 10)
- Re: patchup prefix egypt (Dec 10)
- Re: patchup prefix HD Moore (Dec 10)
- exploit -j command Jeffs (Dec 10)
- Re: exploit -j command egypt (Dec 10)
- possible bug in MSFCLI and msfencode? Thomas Werth (Dec 10)
- Re: possible bug in MSFCLI and msfencode? HD Moore (Dec 10)
- Re: possible bug in MSFCLI and msfencode? Thomas Werth (Dec 10)
- ruby coding question Jeffs (Dec 08)
- Re: possible bug in MSFCLI and msfencode? Thomas Werth (Dec 10)
- Re: possible bug in MSFCLI and msfencode? HD Moore (Dec 11)
- Re: nexpose_connect connection refused error..... HD Moore (Dec 05)