Metasploit mailing list archives

execute -f ping -a " 192.168.40.111 > c:\11.txt"


From: egypt at metasploit.com (egypt at metasploit.com)
Date: Fri, 12 Sep 2008 10:57:40 -0600

There are a couple of problems with your command line.  First, when
you run the "execute" command, meterpreter actually calls
CreateProcess with the value of the -f parameter as the file to
execute.  This is not the same as running it from the command line and
redirecting stdout with ">" doesn't work.  Secondly, due to a quirk in
the way the console reads input from the user, backslashes need to be
escaped, so "c:\11.txt" needs to be "c:\\11.txt"

What you probably want is something like this:
execute -f cmd -a "/c ping 192.168.40.111 > c:\\11.txt"

Also, there is a "-i" parameter to execute which causes interaction
immediately.  So "execute -f ping -i -a '192.168.40.111'" would
channelize i/o and give you all the output right away.

(note: I didn't test these commands so they may not be exactly right)


Hope this helped,
egypt

2008/9/12 gleader <gleader at gmail.com>:


1?execute -f ping -a " 192.168.40.111 > c:\11.txt"
why can'not find the result file 11.txt at target machine.

I want have the ping.
I can use
     execute -c -f cmd
     interact 1
     then ping ...
but i hope
     execute -f ping -a " 192.168.40.111 > c:\11.txt" is ok.

please help me .why this not result.

2?meterpreter> execute -c -f cmd
interact 1
why "interact 1"so long time.
_______________________________________________
http://spool.metasploit.com/mailman/listinfo/framework





Current thread: