GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Python - Using A String Modifier With A Variable (https://gfy.com/showthread.php?t=1258393)

deonbell 04-20-2017 12:28 AM

Python - Using A String Modifier With A Variable
 
Just curious, How would I have gotten this code to work with a variable instead of having "69" hard coded into the code

Code:

   
    secret=('%064x' % 0x69)
    print secret

This gives me
00000000000000000000000000000000000000000000000000 00000000000069


I ended up doing it this way instead. Reading the variable from a file. It works this way.
Also give me
00000000000000000000000000000000000000000000000000 00000000000069

But curious about the above.

Code:

 
    inputfile = open('inputfile.txt', 'r')
    startdata = inputfile.read()
    inputfile.close()
    print "starting point"
   
    inputlove=startdata.strip() 
 
    fart = inputlove.zfill(64)

    print fart

Thank you my gfy friends.

deonbell 04-20-2017 12:39 AM

I copied someone else's code and I plan on modifying it for my brute force
Next step is finding out how to verify whether the public address has been used. This will be the hard part.

Here is the output I get so far.

router@router-start:~/Desktop/python/bitcoingen$ python usethis.py
Y or N - Ready?
y
starting point
00000000000000000000000000000000000000000000000000 00000000000069
('1DerC5SzMPgBN4o6yaxcRZ7TMBCDus6nLT', '5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreNXqEJ Tk')

Bladewire 04-20-2017 09:55 AM


Sly 04-20-2017 09:57 AM

.format()

https://pyformat.info/

Colmike9 04-20-2017 10:46 AM

Edit: .

deonbell 04-20-2017 01:29 PM

Quote:

Originally Posted by deonbell (Post 21714547)
Next step is finding out how to verify whether the public address has been used. This will be the hard part.

I was wrong. Very easy, Thank to a bitcoin API created by Vitalik Buterin, the brains behind Ethereum. Pybitcointools has the function history(addr). Simple as that.

Now here is my output.

Y or N - Ready?
y
starting point
00000000000000000000000000000000000000000000000000 00000000000069
1DerC5SzMPgBN4o6yaxcRZ7TMBCDus6nLT
[{'output': u'56d3132de2297da24d507346575d68f058796ad362142b41 6cfc746798fe5998:1', 'block_height': 423666, 'spend': u'ce965dbfff1b57d9522e34c436d58682edc4ad336bd1f92b 5d12f826090b3b41:0', 'value': 5000000, 'address': u'1DerC5SzMPgBN4o6yaxcRZ7TMBCDus6nLT'}, {'output': u'e5b4b528ff502edfc67fd0e76d2d37f15b904e8e368dff04 e38b856c0ff9ef7f:0', 'block_height': 315653, 'spend': u'd53e9c6f5c8b1140cd8aa7ad4681eb11e13fbc0954eba108 e383d710fc0f7b2b:0', 'value': 100000, 'address': u'1DerC5SzMPgBN4o6yaxcRZ7TMBCDus6nLT'}]
('1DerC5SzMPgBN4o6yaxcRZ7TMBCDus6nLT', '5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreNXqEJ Tk')

Here is the output when I change the exponent for a bitcoin address that does not exist.
python usethis.py
Y or N - Ready?
y
starting point
00000000000000000000000000000000000000000000000000 00000000009999
1A4MGxC9Yk7qkzKYxMYDW2R4fDFhzRmkv7
[]
('1A4MGxC9Yk7qkzKYxMYDW2R4fDFhzRmkv7', '5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEssxevqLt KV')

Ferus 04-20-2017 01:36 PM

You need to format the output. The worker is fine.


All times are GMT -7. The time now is 11:40 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123