Metasploit mailing list archives

Re: Simple Scripting Question


From: egypt () metasploit com
Date: Thu, 24 Feb 2011 11:42:08 -0700

For the record, redefining any method in lib/rex/script/base.rb would
have similar effects.  That includes the accessors,
    attr_accessor :client, :framework, :path, :error, :args
    attr_accessor :session, :sink, :workspace

Hope this helps,
egypt

On Thu, Feb 24, 2011 at 11:15 AM, Phil Hester
<pineapple_surprise () hotmail com> wrote:
Thank you Jose.

I should have thought of that, changing the name of the function worked.
Makes perfect sense. Teaches me for working too early in the morning.

Bless

________________________________
CC: framework () spool metasploit com
From: jselvi () pentester es
Subject: Re: [framework] Simple Scripting Question
Date: Thu, 24 Feb 2011 07:42:37 +0100
To: pineapple_surprise () hotmail com

Have you tried renaming your "run" function?
Maybe you're "overwriting" it. Just guessing.
Regards.

--
Jose Selvi.
Security Technical Consultant
CISA, CISSP, CNAP, GCIH, GPEN
http://www.pentester.es
SANS Mentor in Madrid (Spain). September 23 - November 25
SEC560: Network Penetration Testing and Ethical Hacking
http://www.sans.org/mentor/details.php?nid=24133
http://www.pentester.es/2010/12/nuevo-grupo-y-descuento-para-network.html
El 24/02/2011, a las 07:15, Phil Hester <pineapple_surprise () hotmail com>
escribió:

I am working with a very simple script that is causing me some confusion:

session = client
def run()
    print_line "running"
end
print_status("About to run...")
run()
print_status("Finished!")
raise Rex::Script::Completed

When it is run, the first time it works:

meterpreter > run testing123
[*] About to run...
running
[*] Finished!

But then the 2nd time it does not:

meterpreter > run testing123
[-] Error in script: ArgumentError wrong number of arguments (1 for 0)

And after that, no script will run:

meterpreter > run checkvm
[-] Error in script: ArgumentError wrong number of arguments (1 for 0)

Any ideas why my simple script is causing this issue?

_______________________________________________
https://mail.metasploit.com/mailman/listinfo/framework

_______________________________________________
https://mail.metasploit.com/mailman/listinfo/framework


_______________________________________________
https://mail.metasploit.com/mailman/listinfo/framework


Current thread: