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

added a new option - subdomain recon #11

Merged
merged 3 commits into from
Jun 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const subdomainScanner = require('./src/subdomainScanner');
const exifMetadata = require('./src/exif');
const scanUrl = require('./src/scanUrl');
const flagOptions = require('./src/flagOptions');
const subdomainRecon = require('./src/subdomainRecon');

const welcome = async () => {
const glitchTitle = chalkAnimation.glitch('\nWelcome to Infoooze\n');
Expand Down Expand Up @@ -106,6 +107,11 @@ switch (optionKey) {
banner();
dnsLookup(flags.dnslookup);
break;

case 'subdomainrecon':
banner();
subdomainRecon(flags.subdomainrecon);
break;

default:
(async function () {
Expand Down
3 changes: 2 additions & 1 deletion src/flagOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ const flagOptions = () => {
.option(['s', 'subdomain'], 'find subdomains of website')
.option(['x', 'exif'], 'extracts Exif metadata from image')
.option(['a', 'webscan'], 'analyze suspicious URLs')
.option(['l', 'urlexpand'], 'long url of shorten URL');
.option(['l', 'urlexpand'], 'long url of shorten URL')
.option(['c', 'subdomainrecon'], 'find subdomains passively');

args
.example(
Expand Down
22 changes: 22 additions & 0 deletions src/subdomainRecon.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
const { spawn } = require('child_process');
const { input, errorMsg, currentTimeStamp, info, goBack } = require('./helper');

const subdomainRecon = async (host, showHome = false) => {
host = host || (await input('Enter your host (example.com):'));

const path = `${process.cwd()}/results/infoooze_subdomainRecon_${currentTimeStamp()}.txt`;
info(`Results will be saved in ${path}`);

// Passive subdomain scan:
const command = spawn('amass', ['enum', '-passive', '-d', host, '-o', path]);
command.stdout.on('data', (output) => {
console.log(output.toString());
});
command.on('error', (err) => {
errorMsg(
`amass might not be installed, try installing it: go install -v github.com/OWASP/Amass/v3/...@master`,
);
});
};

module.exports = subdomainRecon;