lachesis / scallion

GPU-based Onion Hash generator
Other
1.25k stars 164 forks source link

Some of the More Advanced Options Aren't Working... Bug? #143

Closed domiluci closed 5 years ago

domiluci commented 5 years ago

Hey guys,

Been using Scallion for a minute, and I'm no stranger to CMD and PS as well as batch files as I often write one for everything I use as an easy GUI. But I'm having trouble with some of the more advanced options and think maybe there's a bug. Didn't see anyone else talking about it though, so just bringing it up to see if I'm maybe screwing up somehow.

scallion -o keys.txt -k 1024 -d 0 prefix --quit-after %keyCount%

If keyCount = 1, it throws an exception. And if keyCount = 2+, it spits out 32 keys...Um???

If I omit --quit-after then it spits out like 18 keys

I've tried at least a dozen possible variations of implementing --quit-after with the same or no effect. It doesn't work.

So I'm frustrated and confused at this point and could use the help. Thanks.

lachesis commented 5 years ago

Yep that sounds like a bug. I don't have a machine that can run Scallion handy, but I suspect this is happening because your prefix is very easy, so we are finding multiple matches in each batch of work we send to the GPU. We likely just need to add another check to quit if we have printed enough keys.

If you want to make a pull request, we'd be happy to accept it. If you don't know C# or can't find this code path, I can take a stab at some point, but no guarantees.

domiluci commented 5 years ago

Thank you so much for your reply, bud! I was starting to think I was insane or screwing up somehow because I spent like four hours trying to get it to work right so I could write a proto-GUI batch like I do with all of my CMD line programs. But I was getting really frustrated and nowhere fast, so I called it and contacted you. I really do appreciate the reply.

As far as C# goes, I do know it, but I don't really know enough about your program and your coding style, as well as the theory of how to generate these key pairs to comfortably modify things; I fear I may make more damage than good for you. I've always been better at VB.NET as, although I am a hardware/software engineer, most of the software I develop is either firmware for hardware and/or microcontrollers. Or it is pretty basic Windows desktop software and I mostly focus on UI/UX design.

But if you could tell me what I'd need to change and where, I'd be happy to do it for you. But I'm not exactly comfortable doing it on my own. So i'm happy to help if you're ok holding my hand a bit.

Also, I tried prefixes between 1-5 characters with similar results. I tried on different GPUs/CPUs. Same results and issues. Don't know if that helps.

But if it does and you could give me an IDEA of what to fix and where, I'll inspect it in VS and open a pull request to attempt a fix. But I don't think I could do it on my own in C#. Maybe VB but not C#.

Thank you, buddy :)

lachesis commented 5 years ago

Happy to help. Please don't judge my code too harshly - I have learned much better style since I wrote this. :) If you want to try this pull request (https://github.com/lachesis/scallion/pull/144) out, it might work. Not sure if this code can even still be built without messing around with old versions of OpenSSL.

Thanks for reporting!

domiluci commented 5 years ago

Yeah, no problem, bud! And I wouldn't judge your code. The program works great and that's all that matters ultimately. Maybe you could explain how you put it together and used the APIs, and I could help you fix some bugs and update it a bit to run on machines with newer NET framework (as .NET 3.5 isn't always included in the W10 installation packages now, especially when it comes to tablets and machines with very limited space like IoT installations). So maybe I could assist you in a rebuild to support a newer .NET 4.x framework. That'd DEFINITELY help me out so can run it on my tablet! And if I see anything I can organize and/or slim down, I'd be happy to do that stuff for you too (with your permissions, of course)

For now, let me check the code really quickly and see where we are at! :)

Do you have any idea about where the code would be to fix this specific bug?

lachesis commented 5 years ago

Yeah we are always happy to accept pull requests! Take a look at the one I linked in my previous comment (#144). That is my best guess about how to fix this bug. I have not even tried to build this app in a long time, so no guarantees that it will work, but I would definitely appreciate if you could try that patch and see if it fixes your issue.

I am not sure how well this would work on a tablet, as it needs a pretty snappy GPU to generate large prefixes, but perhaps tablet GPUs with OpenCL support are more common now.

freethenation commented 5 years ago

I think this issue is fixed. Reopen if it is not.