Last active
September 17, 2018 19:17
-
-
Save abtris/e6c2cdfdabd031a0cc7a09f618bff351 to your computer and use it in GitHub Desktop.
Passwords for drones generation
This file contains hidden or 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
| package main | |
| import ( | |
| "fmt" | |
| "math/rand" | |
| ) | |
| func main() { | |
| NatoCodes := []string{ | |
| "Alfa", | |
| "Bravo", | |
| "Charlie", | |
| "Delta", | |
| "Echo", | |
| "Foxtrot", | |
| "Golf", | |
| "Hotel", | |
| "India", | |
| "Juliett", | |
| "Kilo", | |
| "Lima", | |
| "Mike", | |
| "November", | |
| "Oscar", | |
| "Papa", | |
| "Quebec", | |
| "Romeo", | |
| "Sierra", | |
| "Tango", | |
| "Uniform", | |
| "Victor", | |
| "Whiskey", | |
| "X-ray", | |
| "Yankee", | |
| "Zulu", | |
| } | |
| passPhrase := "webexpo" | |
| for _, value := range NatoCodes { | |
| v := fmt.Sprintf("%04.f", rand.Float64()*10000) | |
| fmt.Printf("%s;%s%v\n", value, passPhrase, v) | |
| } | |
| } |
This file contains hidden or 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
| const natoCodes = [ | |
| "Alfa", | |
| "Bravo", | |
| "Charlie", | |
| "Delta", | |
| "Echo", | |
| "Foxtrot", | |
| "Golf", | |
| "Hotel", | |
| "India", | |
| "Juliett", | |
| "Kilo", | |
| "Lima", | |
| "Mike", | |
| "November", | |
| "Oscar", | |
| "Papa", | |
| "Quebec", | |
| "Romeo", | |
| "Sierra", | |
| "Tango", | |
| "Uniform", | |
| "Victor", | |
| "Whiskey", | |
| "X-ray", | |
| "Yankee", | |
| "Zulu", | |
| ]; | |
| const passPhrase = "webexpo"; | |
| const passLength = passPhrase.length + 4; | |
| natoCodes.forEach(value => { | |
| pass = passPhrase + Math.round(Math.random()*100000); | |
| console.log(value + ';' + pass.slice(0, passLength)); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment