This repository has been archived by the owner on Oct 14, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
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
7 changed files
with
106 additions
and
35 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
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 |
---|---|---|
|
@@ -2,5 +2,5 @@ | |
"a.bat", | ||
"b.bat", | ||
"package-lock.json", | ||
"password.json" | ||
"passwords.json" | ||
] |
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,4 @@ | ||
@echo off | ||
cls | ||
|
||
call node explore-idents.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
'use strict'; | ||
|
||
var fs = require('fs'); | ||
var readline = require('readline'); | ||
|
||
var rl = readline.createInterface(process.stdin, process.stdout); | ||
|
||
var identsFile = './temp-dir/idents.txt'; | ||
|
||
setTimeout(main); | ||
|
||
function main(){ | ||
var idents = fs.readFileSync(identsFile).toString().split(/\r\n|\r|\n/).map(a => a.split(/\s+/)); | ||
|
||
rl.on('line', input => { | ||
if(input === '.exit'){ | ||
rl.close(); | ||
return; | ||
} | ||
|
||
var ident = idents.find(([ident]) => ident === input); | ||
if(!ident) return logLine('Not found.'); | ||
|
||
logLine(ident[1]); | ||
}); | ||
} | ||
|
||
function logLine(...a){ | ||
console.log(...a); | ||
console.log(''); | ||
} |
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