-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
142 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
results | ||
temp | ||
node_modules | ||
./src/secret.js | ||
src/secret.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
const moment = require('moment'); | ||
const whoisJson = require('whois-json'); | ||
const { | ||
list, | ||
input, | ||
info, | ||
goBack, | ||
currentTimeStamp, | ||
saveTo, | ||
} = require('./common.js'); | ||
|
||
const domainAge = async (website, showHome = false, i = 1) => { | ||
website = website || (await input('Your Website')); | ||
|
||
const path = `${process.cwd()}/results/infoooze_domainAge_${currentTimeStamp()}.txt`; | ||
info(`Results will be saved in `, path); | ||
|
||
var whoisData = await whoisJson(website); | ||
for (var key in whoisData) { | ||
if (key.includes('date') || key.includes('Date')) { | ||
if (!key.includes('Database')) { | ||
await list( | ||
'+', | ||
key, | ||
moment(whoisData[key]).format('Do MMMM YYYY h:mm:ss a'), | ||
); | ||
saveTo( | ||
path, | ||
key, | ||
moment(whoisData[key]).format('Do MMMM YYYY h:mm:ss a'), | ||
); | ||
} | ||
} | ||
if (key.includes('creationDate')) { | ||
await list( | ||
'+', | ||
'Website Age', | ||
moment(whoisData['creationDate']).fromNow(true), | ||
); | ||
saveTo( | ||
path, | ||
'Website Age', | ||
moment(whoisData['creationDate']).fromNow(true), | ||
); | ||
} | ||
} | ||
if (showHome) { | ||
goBack(); | ||
} | ||
}; | ||
module.exports = domainAge; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.