Skip to content

Commit

Permalink
Removes trailing spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
kenorb committed Feb 25, 2022
1 parent 4761fe4 commit 6012466
Show file tree
Hide file tree
Showing 21 changed files with 161 additions and 161 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[submodule "secp256k1"]
path = secp256k1
path = secp256k1
url = https://github.com/ryancdotorg/secp256k1.git
[submodule "scrypt-jane"]
path = scrypt-jane
Expand Down
2 changes: 1 addition & 1 deletion 2.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
for line in file2.lines():
id_ = line.split()[0]
if id_ in ids:
found.append("{} {}".format(ids[id_], line))
found.append("{} {}".format(ids[id_], line))
22 changes: 11 additions & 11 deletions 3.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,34 +30,34 @@ def __init__(self, msg):
self.msg = msg

def generate(prefix=False, number=5):
while number > 0:
while number > 0:
if prefix == 'TRUE':
word1 = PREFIXES[int(random.uniform(0,len(PREFIXES)))]
elif prefix:
word1 = prefix
else:
word1 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))]

word2 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))]
word3 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))]
print "%s%s%s" % (word1.rstrip(), word2.rstrip(), word3.rstrip())

number -= 1


def main(argv=None):

number = 5
prefix = False

if argv is None:
argv = sys.argv
try:
try:
opts, args = getopt.getopt(argv[1:], "hn:p:i:vw:", ["help", "number=", "prefix=", "wordlist="])
except getopt.error, msg:
raise Usage(msg)

# option processing
for option, value in opts:
if option == "-v":
Expand All @@ -71,16 +71,16 @@ def main(argv=None):
print "Importing: %s" % value
CODEWORDS = open(value, 'r').readlines()
if option in ("-p", "--prefixe"):

print value

if (value):
prefix = value
else:
prefix = 'TRUE'

generate(prefix, number)

except Usage, err:
print >> sys.stderr, sys.argv[0].split("/")[-1] + ": " + str(err.msg)
print >> sys.stderr, "\t for help use --help"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ Generators
----------

./generators/generate2words.py -w wordlist.txt -n 90000000000 \
| ./brainflayer -v -o result.txt -b 35.blf
./generators/2.py -n 90000000000 | ./brainflayer -v -o result.txt -b 35.blf
| ./brainflayer -v -o result.txt -b 35.blf
./generators/2.py -n 90000000000 | ./brainflayer -v -o result.txt -b 35.blf

Resources
---------
Expand Down
14 changes: 7 additions & 7 deletions base58perl.pl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ sub base58 {
my $leading_zeroes = length $1 if join('', @binary_address_to_encode) =~ /^(0*)/;
#Cycle through each binary decimal character, encoding to Base58.
for my $dec_char ( @binary_address_to_encode ) {
#Cycle through each index (i.e. base58 encoded character) of array holding base58 encoded result.
#Cycle through each index (i.e. base58 encoded character) of array holding base58 encoded result.
for (my $encoded_character_index = $base58_encoded_array_size; $encoded_character_index--; ) {
#See Satoshi's base58.cpp code for details.
$dec_char += 256 * ($base58_encoded_address[$encoded_character_index] // 0);
Expand All @@ -56,13 +56,13 @@ sub base58 {
}
}

#Decodes bitcoin address from its Base58 encoding into an array of binary decimals.
#Decodes bitcoin address from its Base58 encoding into an array of binary decimals.
sub unbase58 {
my $bitcoin_address = $_[0];
die "Subroutine unbase58 needs base58 encoded bitcoin address to decode!\n" unless defined $bitcoin_address;
die "Cannot Decode! Invalid Base58 Character(s)!\n" unless $bitcoin_address =~ /^[1-9A-HJ-NP-Za-km-z]*$/;
#This is overkill, but it allows for plenty of room to store decoded bytes.
my $decoded_array_size = length($bitcoin_address);
my $decoded_array_size = length($bitcoin_address);
my @decoded_binary_address; #Array that will hold bytes of Base58 decoded address.
#Counts number of leading 1's in bitcoin address.
my $leading_ones = length($1) if $bitcoin_address =~ /^(1*)/;
Expand Down Expand Up @@ -148,14 +148,14 @@ sub encodebase58fromhex {

my $fileSrc = 'base58.txt';
open my $fhSrc, $fileSrc or die "Could not open $fileSrc: $!";

my $fileDest = 'hex.txt';
open(my $fhDest, '>>', $fileDest) or die "Could not open file $fileDest: $!";
while( my $base58_encoded_address = <$fhSrc>) {

while( my $base58_encoded_address = <$fhSrc>) {
my $binary_address = decodebase58tohex($base58_encoded_address);
say $fhDest $binary_address;
}

close $fhSrc;
close $fhDest;
20 changes: 10 additions & 10 deletions brain12.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def __init__(self, msg):
self.msg = msg

def generate(prefix=False, number=5):
while number > 0:
while number > 0:
if prefix == 'TRUE':
print ("Not Supported.")
# word1 = PREFIXES[int(random.uniform(0,len(PREFIXES)))]
Expand All @@ -48,23 +48,23 @@ def generate(prefix=False, number=5):
word11 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))]
word12 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))]
print " %s %s %s %s %s %s %s %s %s %s %s %s " % (word1.rstrip(), word2.rstrip(), word3.rstrip(), word4.rstrip(), word5.rstrip(), word6.rstrip(), word7.rstrip(), word8.rstrip(), word9.rstrip(), word10.rstrip(), word11.rstrip(), word12.rstrip())

number -= 1


def main(argv=None):

number = 5
prefix = False

if argv is None:
argv = sys.argv
try:
try:
opts, args = getopt.getopt(argv[1:], "hn:p:i:vw:", ["help", "number=", "prefix=", "wordlist="])
except getopt.error, msg:
raise Usage(msg)

# option processing
for option, value in opts:
if option == "-v":
Expand All @@ -78,16 +78,16 @@ def main(argv=None):
print "Importing: %s" % value
CODEWORDS = open(value, 'r').readlines()
if option in ("-p", "--prefixe"):

print value

if (value):
prefix = value
else:
prefix = 'TRUE'

generate(prefix, number)

except Usage, err:
print >> sys.stderr, sys.argv[0].split("/")[-1] + ": " + str(err.msg)
print >> sys.stderr, "\t for help use --help"
Expand Down
20 changes: 10 additions & 10 deletions brain24.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def __init__(self, msg):
self.msg = msg

def generate(prefix=False, number=5):
while number > 0:
while number > 0:
if prefix == 'TRUE':
print ("Not Supported.")
# word1 = PREFIXES[int(random.uniform(0,len(PREFIXES)))]
Expand Down Expand Up @@ -60,23 +60,23 @@ def generate(prefix=False, number=5):
word23 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))]
word24 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))]
print " %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s " % (word1.rstrip(), word2.rstrip(), word3.rstrip(), word4.rstrip(), word5.rstrip(), word6.rstrip(), word7.rstrip(), word8.rstrip(), word9.rstrip(), word10.rstrip(), word11.rstrip(), word12.rstrip(), word13.rstrip(), word14.rstrip(), word15.rstrip(), word16.rstrip(), word17.rstrip(), word18.rstrip(), word19.rstrip(), word20.rstrip(), word21.rstrip(), word22.rstrip(), word23.rstrip(), word24.rstrip())

number -= 1


def main(argv=None):

number = 5
prefix = False

if argv is None:
argv = sys.argv
try:
try:
opts, args = getopt.getopt(argv[1:], "hn:p:i:vw:", ["help", "number=", "prefix=", "wordlist="])
except getopt.error, msg:
raise Usage(msg)

# option processing
for option, value in opts:
if option == "-v":
Expand All @@ -90,16 +90,16 @@ def main(argv=None):
print "Importing: %s" % value
CODEWORDS = open(value, 'r').readlines()
if option in ("-p", "--prefixe"):

print value

if (value):
prefix = value
else:
prefix = 'TRUE'

generate(prefix, number)

except Usage, err:
print >> sys.stderr, sys.argv[0].split("/")[-1] + ": " + str(err.msg)
print >> sys.stderr, "\t for help use --help"
Expand Down
2 changes: 1 addition & 1 deletion brainflayer.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ static int shaxnpriv(unsigned char *priv, unsigned char *pass, size_t pass_sz) {
SHA256_Init(&ctx);
SHA256_Update(&ctx, pass, pass_sz);
SHA256_Final(priv, &ctx);

for (i = 1; i < rounds; ++i) {
SHA256_Init(&ctx);
SHA256_Update(&ctx, priv, 32);
Expand Down
20 changes: 10 additions & 10 deletions generate12words.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def __init__(self, msg):
self.msg = msg

def generate(prefix=False, number=5):
while number > 0:
while number > 0:
if prefix == 'TRUE':
print ("Not Supported.")
# word1 = PREFIXES[int(random.uniform(0,len(PREFIXES)))]
Expand All @@ -49,23 +49,23 @@ def generate(prefix=False, number=5):
word11 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))]
word12 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))]
print >> outputtxt, " %s %s %s %s %s %s %s %s %s %s %s %s " % (word1.rstrip(), word2.rstrip(), word3.rstrip(), word4.rstrip(), word5.rstrip(), word6.rstrip(), word7.rstrip(), word8.rstrip(), word9.rstrip(), word10.rstrip(), word11.rstrip(), word12.rstrip())

number -= 1


def main(argv=None):

number = 5
prefix = False

if argv is None:
argv = sys.argv
try:
try:
opts, args = getopt.getopt(argv[1:], "hn:p:i:vw:", ["help", "number=", "prefix=", "wordlist="])
except getopt.error, msg:
raise Usage(msg)

# option processing
for option, value in opts:
if option == "-v":
Expand All @@ -79,16 +79,16 @@ def main(argv=None):
print "Importing: %s" % value
CODEWORDS = open(value, 'r').readlines()
if option in ("-p", "--prefixe"):

print value

if (value):
prefix = value
else:
prefix = 'TRUE'

generate(prefix, number)

except Usage, err:
print >> sys.stderr, sys.argv[0].split("/")[-1] + ": " + str(err.msg)
print >> sys.stderr, "\t for help use --help"
Expand Down
22 changes: 11 additions & 11 deletions generate2words.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,33 +30,33 @@ def __init__(self, msg):
self.msg = msg

def generate(prefix=False, number=5):
while number > 0:
while number > 0:
if prefix == 'TRUE':
word1 = PREFIXES[int(random.uniform(0,len(PREFIXES)))]
elif prefix:
word1 = prefix
else:
word1 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))]

word2 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))]
print " %s %s" % (word1.rstrip(), word2.rstrip())

number -= 1


def main(argv=None):

number = 5
prefix = False

if argv is None:
argv = sys.argv
try:
try:
opts, args = getopt.getopt(argv[1:], "hn:p:i:vw:", ["help", "number=", "prefix=", "wordlist="])
except getopt.error, msg:
raise Usage(msg)

# option processing
for option, value in opts:
if option == "-v":
Expand All @@ -70,16 +70,16 @@ def main(argv=None):
print "Importing: %s" % value
CODEWORDS = open(value, 'r').readlines()
if option in ("-p", "--prefixe"):

print value

if (value):
prefix = value
else:
prefix = 'TRUE'

generate(prefix, number)

except Usage, err:
print >> sys.stderr, sys.argv[0].split("/")[-1] + ": " + str(err.msg)
print >> sys.stderr, "\t for help use --help"
Expand Down
Loading

0 comments on commit 6012466

Please sign in to comment.