-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
got rid of profiles in favor of simpler config, bugfixes
- Loading branch information
Showing
11 changed files
with
39 additions
and
77 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
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,25 +1,25 @@ | ||
#!/usr/bin/perl | ||
|
||
print "Password: "; | ||
print STDERR "Password: "; | ||
system("/usr/bin/stty", "-echo"); | ||
$password = <STDIN>; | ||
chomp($password); | ||
system("/usr/bin/stty", "echo"); | ||
print "\n"; | ||
print STDERR "\n"; | ||
|
||
print "Again: "; | ||
print STDERR "Again: "; | ||
system("/usr/bin/stty", "-echo"); | ||
$again = <STDIN>; | ||
chomp($again); | ||
system("/usr/bin/stty", "echo"); | ||
print "\n"; | ||
print STDERR "\n"; | ||
|
||
if ($password ne $again) { | ||
print "error dont match\n"; | ||
print STDERR "error dont match\n"; | ||
exit 1; | ||
} | ||
|
||
|
||
$salt = join "", ('.', '/', 0..9, 'A'..'Z', 'a'..'z')[map {rand 64} (1..16)]; | ||
|
||
print "\n".crypt($password,"\$6\$".$salt."\$") . "\n"; | ||
print crypt($password,"\$6\$".$salt."\$") . "\n"; |
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 |
---|---|---|
@@ -1,22 +1,11 @@ | ||
"use strict"; | ||
|
||
const exists = require("./util/exists.js"); | ||
const profilePaths = require("./singletons/profile_paths.js"); | ||
const zip = require("./util/zip.js"); | ||
const configDir = require("./singletons/config_dir.js"); | ||
const exists = require("./util/exists.js"); | ||
|
||
module.exports = async (name) => { | ||
const paths = profilePaths.map(path => `${ path }/${ name }`); | ||
const tested = zip( | ||
paths, | ||
await Promise.all(paths.map(exists.fileOrSymlink)) | ||
); | ||
|
||
const found = | ||
tested | ||
.filter(([ _path, exists ]) => !!exists) | ||
.map(([ path, _exists ]) => path) | ||
[0] | ||
; | ||
|
||
return found; | ||
}; | ||
const pathname = `${ configDir }/${ name }`; | ||
if (await exists.fileOrSymlink(pathname)) { | ||
return pathname; | ||
} | ||
} |
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,5 @@ | ||
"use strict"; | ||
|
||
const configDir = require("./config_dir.js"); | ||
|
||
module.exports = `${ configDir }/farch_conf.js`; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
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