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

/bin/sh: 1: db: not found #25

Closed
ghost opened this issue Oct 13, 2019 · 4 comments
Closed

/bin/sh: 1: db: not found #25

ghost opened this issue Oct 13, 2019 · 4 comments

Comments

@ghost
Copy link

ghost commented Oct 13, 2019

Working through The Hacker Playbook 3, and got to the section about discovery. Using a script ( https://github.com/leebaird/discover ) that makes use of a bunch of different discovery tools.

I've ironed out most of the kinks, but it seems to be having issue with recon-ng, and I'm not sure how to approach fixing this one. I get a lot of stuff like below:

[recon-ng][cyberspacekittens.com] > spool stop
[*] Spooling stopped. Output saved to '/tmp/networks'.
[recon-ng][cyberspacekittens.com] > 
[recon-ng][cyberspacekittens.com] > spool start /tmp/subdomains
[*] Spooling output to '/tmp/subdomains'.
[recon-ng][cyberspacekittens.com] > db query SELECT DISTINCT host,ip_address FROM hosts ORDER BY host ASC
[*] Command: db query SELECT DISTINCT host,ip_address FROM hosts ORDER BY host ASC
/bin/sh: 1: db: not found
[recon-ng][cyberspacekittens.com] > db query SELECT DISTINCT host,ip_address FROM ports ORDER BY host ASC
[*] Command: db query SELECT DISTINCT host,ip_address FROM ports ORDER BY host ASC
/bin/sh: 1: db: not found
[recon-ng][cyberspacekittens.com] > spool stop
[*] Spooling stopped. Output saved to '/tmp/subdomains'.
[recon-ng][cyberspacekittens.com] > 
[recon-ng][cyberspacekittens.com] > spool start /tmp/usernames
[*] Spooling output to '/tmp/usernames'.
[recon-ng][cyberspacekittens.com] > db query SELECT username FROM profiles ORDER BY username ASC
[*] Command: db query SELECT username FROM profiles ORDER BY username ASC
/bin/sh: 1: db: not found
[recon-ng][cyberspacekittens.com] > spool stop
[*] Spooling stopped. Output saved to '/tmp/usernames'.
[recon-ng][cyberspacekittens.com] > 
[recon-ng][cyberspacekittens.com] > exit
cat: networks-tmp: No such file or directory
@kpcyrd
Copy link

kpcyrd commented Oct 13, 2019

db is not a valid recon-ng subcommand and it's trying to run it as an external program instead, which also fails because there's no db binary in the $PATH (causing this slightly cryptic error).

@ghost
Copy link
Author

ghost commented Oct 13, 2019

Great, thank you, that was very helpful. Is trying to run the db command normal recon-ng behavior? In which case what software / packages should I install to fix it?

@lanmaster53
Copy link
Owner

db actually IS a valid command. It's part of the changes in v5 of the framework where I consolidated all database related commands as subcommands under db. The problem you may be having is running the modern version of Lee's discovery scripts against an older version of Recon-ng.

@lanmaster53
Copy link
Owner

This isn't a Recon-ng issue, so I am going to close it. If you have further issues, you could hit up Lee about his scripts, or ask in the Recon-ng slack for general guidance regarding anything specific to Recon-ng.

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

2 participants