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
| #cloud-config | |
| users: | |
| - name: core | |
| ssh-authorized-keys: | |
| - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCbl2K9rz8aHoDks1+rjqN9aefeHe7ePiLJsTSgP4empJInzf6/nXd1FD5vC7TJAJ6UwkhqxEQiSe/ziglZQTKyqM5RTrjsfAWCBRdTOLcEDel59gEKIMJ9eV6PfLmGApxiER1Hqv8WUHv+6QdEICyaszo+nXYHQHwFap5jSl6JUKFhGv8StDpH8/7LsVQFJKZTFvKoCREyUZ3G56Tq2Cre+kUnoytpX9FlOI/9KvBkC8kUwrRY5Bd4vZY6SJ210Bhi7J0tM3wchB0W08R+cCmYWJrxQpEeYtXVWCeQXENyiDmTBOa1C/mE2jvOXOUpz6v7jL+vhJMSPtKpFu3wvOfd ball@ultraball | |
| groups: | |
| - sudo | |
| shell: /bin/bash |
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
| def comparehex(algorithm, hexstring1, hexstring2): | |
| if algorithm == "md5": | |
| num_of_bits = 128 | |
| elif algorithm == "sha1": | |
| num_of_bits = 168 | |
| elif algorithm == "sha256": | |
| num_of_bits = 256 | |
| print "Algorithm: ", algorithm | |
| binstring1 = bin(int(hexstring1, 16))[2:].zfill(num_of_bits) |
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
| def inverseMod(a, m): | |
| for i in range(1,m): | |
| if ( m*i + 1) % a == 0: | |
| return ( m*i + 1) // a | |
| return None | |
| def gcd(a, b): | |
| """Calculate the Greatest Common Divisor of a and b. | |
| Unless b==0, the result will have the same sign as b (so that when | |
| b is divided by it, the result comes out positive). |
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
| #!/bin/sh | |
| PASSWORD="COYS" | |
| DATE=`date +'%Y%m%d-%H%M%S'` | |
| OUTPUT="decryption-result-$DATE.txt" | |
| mkdir "plaintext" | |
| touch $OUTPUT | |
| for i in 100 10240 1000000 100000000 |
NewerOlder