Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Msfconsole -x Option Execution Error #6271

Closed
ninewires opened this issue Nov 22, 2015 · 5 comments
Closed

Msfconsole -x Option Execution Error #6271

ninewires opened this issue Nov 22, 2015 · 5 comments

Comments

@ninewires
Copy link

Version: 4.11.5-dev-596b2b0 is not processing the -x option correctly. Once msfconsole is launched it responds as if command syntax was incorrect. Examples are provided below:

root@ubuntu-vm:~# msfconsole --version
Framework Version: 4.11.5-dev-596b2b0
root@ubuntu-vm:~# msfconsole -q -x "use auxiliary/gather/search_email_collector; set DOMAIN example.com.com; run; exit y"
Usage: use module_name

The use command is used to interact with a module of a given name.

msf > 

root@kali:~# msfconsole --version
Framework Version: 4.11.4-2015101401
root@kali:~# msfconsole -q -x "use auxiliary/gather/search_email_collector; set DOMAIN example.com; run; exit y"
DOMAIN => example.com
[*] Harvesting emails .....
[*] Searching Google for email addresses from example.com
[*] Extracting emails from Google search results...
[*] Searching Bing email addresses from example.com
[*] Extracting emails from Bing search results...
[*] Searching Yahoo for email addresses from example.com
[*] Extracting emails from Yahoo search results...
[*] Located 3 email addresses for example.com
[*]     email@example.com
[*]     mary@example.com
[*]     user@example.com
[*] Auxiliary module execution completed
root@kali:~# 

root@kali:~# msfconsole --version
Framework Version: 4.11.5-2015110801
root@kali:~# msfconsole -q -x "use auxiliary/gather/search_email_collector; set DOMAIN example.com; run; exit y"
DOMAIN => example.com
[*] Harvesting emails .....
[*] Searching Google for email addresses from example.com
[*] Extracting emails from Google search results...
[*] Searching Bing email addresses from example.com
[*] Extracting emails from Bing search results...
[*] Searching Yahoo for email addresses from example.com
[*] Extracting emails from Yahoo search results...
[*] Located 3 email addresses for example.com
[*]     email@example.com
[*]     mary@example.com
[*]     user@example.com
[*] Auxiliary module execution completed
root@kali:~# 
@wchen-r7
Copy link
Contributor

Hmmm, I am not able to reproduce this issue:

$ ./msfconsole -q -x "use auxiliary/gather/search_email_collector; set DOMAIN metasploit.com; run; exit y"
DOMAIN => metasploit.com
[*] Harvesting emails .....
[*] Searching Google for email addresses from metasploit.com
[*] Extracting emails from Google search results...
[*] Searching Bing email addresses from metasploit.com
[*] Extracting emails from Bing search results...
[*] Searching Yahoo for email addresses from metasploit.com
[*] Extracting emails from Yahoo search results...
[*] Located 1 email addresses for metasploit.com
[*]     metasploit.com+@metasploit.com
[*] Auxiliary module execution completed
msf sinn3r $ 

If this isn't a race-condition for you, I am guessing when you have the latest framework update, you will not hit the problem again. If I am not mistaken, 4.11.5-dev-596b2b0 means your latest commit is this:

commit 596b2b025d53930d0d4e41956f07546ed07e3845
Merge: 2e88eb5 a4c260f
Author: James Lee <egypt@metasploit.com>
Date:   Wed Nov 4 13:40:49 2015 -0600

    Land #6173, improve advanced, info, and options

(See the commit hash?)

And that is about 20 days apart from the latest (today).

@ninewires
Copy link
Author

I have updated to the most current build (8fd2522) and am still experiencing the same results. Whatever command(s) I try passing with the '-x' option only makes it to the first step and stops at the msf> prompt with usage. I've tried adding a delay with no success.

@bcook-r7
Copy link
Contributor

It appears you may be using the nightly installer. Is this correct @jayw0k ? The launcher script may not be processing the quotes correctly if that's the case.

@ninewires
Copy link
Author

Sorry for the false alarm on this. Installation was via penetration testers framework and there was an issue with the PTF launcher dropping the double quotes from the command.

@OJ
Copy link
Contributor

OJ commented Nov 27, 2015

Installation was via penetration testers framework

Key information right there!

Thanks for letting us know.

@OJ OJ closed this as completed Nov 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants