0

I am trying to make a metasploit script to execute a shell command. The commands that I want to be execute in metasploit is the following

shell
cd /data/data/com.metasploit.stage/files
sh and.sh
exit

I'm not familiar with ruby. Can anybody tell me how I can make it to work I try to use exec('shell') for the first command but it doesn't work.

Aniruddh Parihar
3,1986 gold badges27 silver badges41 bronze badges
asked Sep 11, 2018 at 8:37
2
  • This might help you stackoverflow.com/q/166347/2681997. You can run any shell command in ruby using Backticks (or back-ticks). Commented Sep 11, 2018 at 12:19
  • I will try. Thank you Commented Sep 14, 2018 at 16:03

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.