Metasploit mailing list archives

rc file and multicommand


From: Marco Polo <titjow () hotmail com>
Date: Fri, 12 Nov 2010 17:31:18 +0000


Hi all!

About my previous mail, the rc file I uploaded the wrong file :s sorry..
Anyway I worked on the good file today and I still have the same problem.
the only solutions I found was to insert some sleep() equal to the time the script needs to be executed which make the 
"bg" useless.. so i run them but not in the background.
And even like that i need to add some sleep() with some cmd like getprivs & getsystem.

Plus I have a problem since a few week (can't remember since when exactly) with the "multicommand.rb" script.
Each time i run it i've got "[-] Error running command pwd: NoMethodError undefined method `write' for nil:NilClass" in 
console

and in the log:

[10/07/2010 18:58:26] [e(0)] core: Error in script: NoMethodError undefined method `<<' for nil:NilClass
[10/07/2010 18:58:26] [d(0)] core: Callstack: /opt/metasploit3/msf3/lib/rex/script/base.rb:118:in `run'
/opt/metasploit3/msf3/lib/rex/script/base.rb:117:in `each_line'
/opt/metasploit3/msf3/lib/rex/script/base.rb:117:in `run'
/opt/metasploit3/msf3/lib/rex/parser/arguments.rb:63:in `parse'
/opt/metasploit3/msf3/lib/rex/parser/arguments.rb:53:in `each_pair'
/opt/metasploit3/msf3/lib/rex/parser/arguments.rb:53:in `parse'
/opt/metasploit3/msf3/lib/rex/script/base.rb:142:in `each_with_index'
/opt/metasploit3/msf3/lib/rex/parser/arguments.rb:44:in `each'
/opt/metasploit3/msf3/lib/rex/parser/arguments.rb:44:in `each_with_index'
/opt/metasploit3/msf3/lib/rex/parser/arguments.rb:44:in `parse'
/opt/metasploit3/msf3/lib/rex/script/base.rb:107:in `run'
/opt/metasploit3/msf3/lib/rex/script/base.rb:41:in `run'
/opt/metasploit3/msf3/lib/rex/post/meterpreter/client.rb:186:in `execute_file'
/opt/metasploit3/msf3/lib/msf/base/sessions/meterpreter.rb:182:in `execute_script'
/opt/metasploit3/msf3/lib/rex/post/meterpreter/ui/console/command_dispatcher/core.rb:348:in `cmd_run'
/opt/metasploit3/msf3/lib/rex/ui/text/dispatcher_shell.rb:246:in `send'
/opt/metasploit3/msf3/lib/rex/ui/text/dispatcher_shell.rb:246:in `run_command'
/opt/metasploit3/msf3/lib/rex/post/meterpreter/ui/console.rb:101:in `run_command'
/opt/metasploit3/msf3/lib/rex/ui/text/dispatcher_shell.rb:208:in `run_single'
/opt/metasploit3/msf3/lib/rex/ui/text/dispatcher_shell.rb:202:in `each'
/opt/metasploit3/msf3/lib/rex/ui/text/dispatcher_shell.rb:202:in `run_single'
/opt/metasploit3/msf3/lib/rex/post/meterpreter/ui/console.rb:67:in `interact'
/opt/metasploit3/msf3/lib/rex/ui/text/shell.rb:133:in `call'
/opt/metasploit3/msf3/lib/rex/ui/text/shell.rb:133:in `run'
/opt/metasploit3/msf3/lib/rex/post/meterpreter/ui/console.rb:65:in `interact'
/opt/metasploit3/msf3/lib/msf/base/sessions/meterpreter.rb:233:in `_interact'
/opt/metasploit3/msf3/lib/rex/ui/interactive.rb:48:in `interact'
/opt/metasploit3/msf3/lib/msf/ui/console/command_dispatcher/core.rb:1275:in `cmd_sessions'
/opt/metasploit3/msf3/lib/rex/ui/text/dispatcher_shell.rb:246:in `send'
/opt/metasploit3/msf3/lib/rex/ui/text/dispatcher_shell.rb:246:in `run_command'
/opt/metasploit3/msf3/lib/rex/ui/text/dispatcher_shell.rb:208:in `run_single'
/opt/metasploit3/msf3/lib/rex/ui/text/dispatcher_shell.rb:202:in `each'
/opt/metasploit3/msf3/lib/rex/ui/text/dispatcher_shell.rb:202:in `run_single'
/opt/metasploit3/msf3/lib/rex/ui/text/shell.rb:143:in `run'
./msfconsole:117


meterpreter > run multicommand -rc /root/Scripts/listofcommands.txt -f /root/.msf3/logs/test_MP.txt
[-] Error in script: NoMethodError undefined method `<<' for nil:NilClass
meterpreter >     
meterpreter > sysinfo
Computer: MP-PC
OS      : Windows 7 (Build 7600, ).
Arch    : x64 (Current Process is WOW64)
Language: fr_FR
meterpreter > getuid
Server username: AUTORITE NT\Système
meterpreter > pwd
C:\Windows\system32


I've got it on native x86 (xp sp3 for exemple) too, and that, with any cmd list.

If You want the good rc file and/or my cmd list, just tell me i'll send it/them

Thx

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

Current thread: