rebryk / profanity-brute-force

Tool to hack a vanity address generated with Profanity
125 stars 35 forks source link

Reconfiguring for M2 Max #17

Open MyLittleRunaway opened 11 months ago

MyLittleRunaway commented 11 months ago

Hi,

Super quick one (and thanks for the god-tier code)

My vanity wallet randomly got drained last month and I'm trying to figure out if this was used to do it.
I noticed you have an M1 and 16GB of RAM - but I'd like to use my M2 with 96GB RAM and a better GPU to try and make it faster. I looked through the code and there didn't seem to be anything to set as a variable for the max memory.

I was wondering if this would be as simple as changing a var somewhere I didn't look hard enough for, or it would require a complete rewrite.
I've attached a picture of the current setup for you. Once again - cheers. I missed the news about this, but hopefully it'll shed some light on if it was used to drain me (but hopefully quicker!

Screenshot 2023-10-29 at 12 23 32 Screenshot 2023-10-29 at 12 39 53
ytrezq commented 11 months ago

@MyLittleRunaway a similar problem as me. But you need to do it the deterministic instead of the probabilistic way in order to have a definite no answer. See : https://ethereum.stackexchange.com/q/156124 and #18.

ytrezq commented 11 months ago

Hi,

Super quick one (and thanks for the god-tier code)

My vanity wallet randomly got drained last month and I'm trying to figure out if this was used to do it. I noticed you have an M1 and 16GB of RAM - but I'd like to use my M2 with 96GB RAM and a better GPU to try and make it faster. I looked through the code and there didn't seem to be anything to set as a variable for the max memory.

I was wondering if this would be as simple as changing a var somewhere I didn't look hard enough for, or it would require a complete rewrite. I've attached a picture of the current setup for you. Once again - cheers. I missed the news about this, but hopefully it'll shed some light on if it was used to drain me (but hopefully quicker! Screenshot 2023-10-29 at 12 23 32 Screenshot 2023-10-29 at 12 39 53

Hi, first of all… Are you managing to get the example command line in the Readme working ? I’m meaning, to find something ? Then the maximum you’ll need is 32Gb because of the number of keys. This is linked to the .extended variable in the code.

MyLittleRunaway commented 11 months ago

Hey thanks for your reply, @ytrezq

Hi, first of all… Are you managing to get the example command line in the Readme working ? I’m meaning, to find something ?

I am, mate, yes.

Then the maximum you’ll need is 32Gb because of the number of keys. This is linked to the .extended variable in the code.

Any idea how I can set this?

ytrezq commented 11 months ago

Hey thanks for your reply, @ytrezq

Hi, first of all… Are you managing to get the example command line in the Readme working ? I’m meaning, to find something ?

I am, mate, yes.

Then the maximum you’ll need is 32Gb because of the number of keys. This is linked to the .extended variable in the code.

Any idea how I can set this?

You increase and decrease the values of mode.extended when true by 2 accordingly in Dispatcher.cpp. Does the program still produce results on mac if you replace CL_DEVICE_TYPE_GPU by CL_DEVICE_TYPE_ALL in https://github.com/rebryk/profanity-brute-force/blob/b4e93566e7f414c91c899665216cf87fbd455393/profanity.cpp#L36 ?

stevealexrs commented 11 months ago

Any idea how I can set this?

try adding --extended command line argument?

It seems like this tool only work on Mac.

ytrezq commented 11 months ago

try adding --extended command line argument?

It seems like this tool only work on Mac.

The extended argument only allow to take 16Gib. In order to use 32/60Gib, it s required to increase and decrease the values of mode.extended when true by 2 accordingly in Dispatcher.cpp.

The reason it only works on osx might be an initialization issue. Hence I suspect it doesn t works on Intel Mac nor does it works with CL_DEVICE_TYPE_ALL. Someone that owns mac has to test it.

stevealexrs commented 11 months ago

I think the extended parameter is only used to change the size of hash table and number of batch. I can't test it right now but you can try changing (mode.extended ? 2 : 1) to (mode.extended ? 8 : 1) , m_mode.extended ? 4 : 8 to m_mode.extended ? 1 : 8, m_mode.extended ? "16Gb" : "8Gb" to m_mode.extended ? "64Gb" : "8Gb" and add --extended command line arg, so it uses 64 GB hash table and run one batch only. (why the author use Gb, shouldnt it be GB?)

ytrezq commented 11 months ago

I think the extended parameter is only used to change the size of hash table and number of batch. I can't test it right now but you can try changing (mode.extended ? 2 : 1) to (mode.extended ? 8 : 1) , m_mode.extended ? 4 : 8 to m_mode.extended ? 1 : 8, m_mode.extended ? "16Gb" : "8Gb" to m_mode.extended ? "64Gb" : "8Gb" and add --extended command line arg, so it uses 64 GB hash table and run one batch only. (why the author use Gb, shouldnt it be GB?)

No. You change the values of when mode.extended is true. This gives you 2 batches of 32Gb used (you can t go below 1 for 1 of the values which is why you can increase and decrease by 4 but only 2).