hexafraction
Sr. Member
Offline
Activity: 392
Merit: 268
Tips welcomed: 1CF4GhXX1RhCaGzWztgE1YZZUcSpoqTbsJ
|
|
May 04, 2015, 09:42:47 PM |
|
What's the syntax for vanity gen regexes? That is, do I have to escape + and | (like in sed) or not (like in perl)? What are my grouping characters, and do I have to escape them? Finally, can I put my regex in a file? Do I have to quote it?
Imagine I want this language: /1(a|b|c)+/, ie: "1a,1aa,1aaa,...,1b,1bb,1bbb,...,1c,1cc,1ccc,...,1ab,1aab,...1abcbca,...".
I'm not sure about +, but you'll need to escape | (vertical pipe) as your shell will interpret it as a directive to hook up vanitygen's standard out to whatever follows the pipe. You could always try quoting it. Edit: Looks like quoting works, but you'll need to use the start-of-line anchor: vanitygen -r "^1(a|b|c)+" or vanitygen -r "^1(a|b|c){1,3}"
|
|
|
|
tspacepilot
Legendary
Offline
Activity: 1456
Merit: 1081
I may write code in exchange for bitcoins.
|
|
May 04, 2015, 09:44:00 PM |
|
What's the syntax for vanity gen regexes? That is, do I have to escape + and | (like in sed) or not (like in perl)? What are my grouping characters, and do I have to escape them? Finally, can I put my regex in a file? Do I have to quote it?
Imagine I want this language: /1(a|b|c)+/, ie: "1a,1aa,1aaa,...,1b,1bb,1bbb,...,1c,1cc,1ccc,...,1ab,1aab,...1abcbca,...".
I'm not sure about +, but you'll need to escape | (vertical pipe) as your shell will interpret it as a directive to hook up vanitygen's standard out to whatever follows the pipe. You could always try quoting it. Right, but if I put it in a file then I wouldn't have the shell escaping problem. I guess you have a point about using the empirical approach here (I just thought someone might know off hand so it was worth asking). EDIT: Tried putting the regex in a file and providing it with the -f option, but vanitygen just returned immediately with exit status 1: tspacepilot@god:~/src/vanitygen$ ./vanitygen -f pattern tspacepilot@god:~/src/vanitygen$ echo $? 1
Then I tried catting the file and I got an error back about too long an arg list (which is weird because my file doesn't have any spaces) tspacepilot@god:~/src/vanitygen$ ./vanitygen -r `cat pattern` bash: ./vanitygen: Argument list too long
Guess I'm pushing things here.
|
|
|
|
TheRealSteve
|
|
May 04, 2015, 10:09:41 PM |
|
Tried putting the regex in a file and providing it with the -f option, but vanitygen just returned immediately You still need -r as well, e.g.: vanitygen64 -r -f regex.lst
|
|
|
|
tspacepilot
Legendary
Offline
Activity: 1456
Merit: 1081
I may write code in exchange for bitcoins.
|
|
May 05, 2015, 07:08:55 PM |
|
Tried putting the regex in a file and providing it with the -f option, but vanitygen just returned immediately You still need -r as well, e.g.: vanitygen64 -r -f regex.lst Cool, will try this when I get back to the computer I was using yesterday. Thanks TheRealSteve!
|
|
|
|
josephno1
Full Member
Offline
Activity: 140
Merit: 100
Get Free Mobile Data http://get.kickbit.com/1/oexq
|
|
May 05, 2015, 11:43:22 PM |
|
Is it normal for this program to take this long? I am running it with the following commands. -i 1Joseph I left it there overnight and it is still not done
|
|
|
|
hexafraction
Sr. Member
Offline
Activity: 392
Merit: 268
Tips welcomed: 1CF4GhXX1RhCaGzWztgE1YZZUcSpoqTbsJ
|
|
May 05, 2015, 11:51:59 PM |
|
Yes, it is normal for it to take this long. 1Joseph is a very difficult prefix to bruteforce, since the first 6 varying base 58 digits need to all match.
The difficulty is 15058417127, and my machine reports 8 hours to 50% chance. That means that I am going to have a 50 percent chance of getting a match within 8 hours. Depending on luck it could be in a minute, or take days to find a match.
|
|
|
|
TheRealSteve
|
|
May 06, 2015, 12:15:18 AM |
|
Just to add to hexafraction's comment - which is factually correct - your screenshot shows a bunch of CPU vs GPU mismatches - and that is not normal (or at least, not supposed to happen very often). Basically the OpenCL code tries to get a vanity, reports what it believes should be a match, and that is then double-checked with the CPU (which is known to perform the calculations correctly whereas the OpenCL implementation might fail). If they match, no problem. If they don't match, no vanity is actually found. Having this many mismatches might mean your card's not supported or itself has issues or needs driver updates or... etc. Lord knows with that stuff and unmaintained code
|
|
|
|
hexafraction
Sr. Member
Offline
Activity: 392
Merit: 268
Tips welcomed: 1CF4GhXX1RhCaGzWztgE1YZZUcSpoqTbsJ
|
|
May 06, 2015, 12:19:18 AM |
|
Just to add to hexafraction's comment - which is factually correct - your screenshot shows a bunch of CPU vs GPU mismatches - and that is not normal (or at least, not supposed to happen very often). Basically the OpenCL code tries to get a vanity, reports what it believes should be a match, and that is then double-checked with the CPU (which is known to perform the calculations correctly whereas the OpenCL implementation might fail). If they match, no problem. If they don't match, no vanity is actually found. Having this many mismatches might mean your card's not supported or itself has issues or needs driver updates or... etc. Lord knows with that stuff and unmaintained code Worse, it could indicate overheating or hardware damage in your GPU's hardware, possibly manifesting in the inability to properly execute some OpenCL instruction (which, reasonably, might not have an effect on normal video rendering, but could show in mining a GPU-coin).
|
|
|
|
josephno1
Full Member
Offline
Activity: 140
Merit: 100
Get Free Mobile Data http://get.kickbit.com/1/oexq
|
|
May 06, 2015, 02:09:16 AM |
|
Just to add to hexafraction's comment - which is factually correct - your screenshot shows a bunch of CPU vs GPU mismatches - and that is not normal (or at least, not supposed to happen very often). Basically the OpenCL code tries to get a vanity, reports what it believes should be a match, and that is then double-checked with the CPU (which is known to perform the calculations correctly whereas the OpenCL implementation might fail). If they match, no problem. If they don't match, no vanity is actually found. Having this many mismatches might mean your card's not supported or itself has issues or needs driver updates or... etc. Lord knows with that stuff and unmaintained code I checked and my graphics drivers are all up to date and the Gpu temp at the time was 45C Yup something is wrong with my gpu since I tried just generating 1j and that didn't work
|
|
|
|
xhomerx10
Legendary
Offline
Activity: 4032
Merit: 8871
|
|
May 06, 2015, 04:37:50 AM |
|
Just to add to hexafraction's comment - which is factually correct - your screenshot shows a bunch of CPU vs GPU mismatches - and that is not normal (or at least, not supposed to happen very often). Basically the OpenCL code tries to get a vanity, reports what it believes should be a match, and that is then double-checked with the CPU (which is known to perform the calculations correctly whereas the OpenCL implementation might fail). If they match, no problem. If they don't match, no vanity is actually found. Having this many mismatches might mean your card's not supported or itself has issues or needs driver updates or... etc. Lord knows with that stuff and unmaintained code I checked and my graphics drivers are all up to date and the Gpu temp at the time was 45C Yup something is wrong with my gpu since I tried just generating 1j and that didn't work If you have an AMD radeon GPU, openCL was broken with Catalyst drivers after 12.6 (I'm not sure of the exact version). It looks like you have the same issue I was having - I removed all the Catalyst drivers using this - http://www.techspot.com/drivers/driver/file/information/16748/ and reinstalled catalyst 14.9 and used the openCL drivers from APP SDK 2.7 which fixed the problem for me. I can't find the link anymore but some guy actually wrote a batch to remove the offending files and instructions on how to get vanitygen working again which is actually safer than using the tool in the link above! If I come across it, I'll post a link.
|
|
|
|
josephno1
Full Member
Offline
Activity: 140
Merit: 100
Get Free Mobile Data http://get.kickbit.com/1/oexq
|
|
May 06, 2015, 05:52:45 AM |
|
Just to add to hexafraction's comment - which is factually correct - your screenshot shows a bunch of CPU vs GPU mismatches - and that is not normal (or at least, not supposed to happen very often). Basically the OpenCL code tries to get a vanity, reports what it believes should be a match, and that is then double-checked with the CPU (which is known to perform the calculations correctly whereas the OpenCL implementation might fail). If they match, no problem. If they don't match, no vanity is actually found. Having this many mismatches might mean your card's not supported or itself has issues or needs driver updates or... etc. Lord knows with that stuff and unmaintained code I checked and my graphics drivers are all up to date and the Gpu temp at the time was 45C Yup something is wrong with my gpu since I tried just generating 1j and that didn't work If you have an AMD radeon GPU, openCL was broken with Catalyst drivers after 12.6 (I'm not sure of the exact version). It looks like you have the same issue I was having - I removed all the Catalyst drivers using this - http://www.techspot.com/drivers/driver/file/information/16748/ and reinstalled catalyst 14.9 and used the openCL drivers from APP SDK 2.7 which fixed the problem for me. I can't find the link anymore but some guy actually wrote a batch to remove the offending files and instructions on how to get vanitygen working again which is actually safer than using the tool in the link above! If I come across it, I'll post a link. Found the batch file! https://github.com/samr7/vanitygen/issues/19cd C:\Windows\System32 del SlotMaximizerAg.dll del SlotMaximizerBe.dll del amdocl64.dll del OpenCL.dll del OpenVideo64.dll del OVDecode64.dll cd C:\Windows\SysWOW64 del SlotMaximizerAg.dll del SlotMaximizerBe.dll del amdocl.dll del OpenCL.dll del OpenVideo.dll del OVDecode.dll rmdir C:\ProgramData\AMD\KDB /S /Q
|
|
|
|
hexafraction
Sr. Member
Offline
Activity: 392
Merit: 268
Tips welcomed: 1CF4GhXX1RhCaGzWztgE1YZZUcSpoqTbsJ
|
|
May 06, 2015, 10:02:13 AM |
|
Found the batch file! https://github.com/samr7/vanitygen/issues/19cd C:\Windows\System32 del SlotMaximizerAg.dll del SlotMaximizerBe.dll del amdocl64.dll del OpenCL.dll del OpenVideo64.dll del OVDecode64.dll cd C:\Windows\SysWOW64 del SlotMaximizerAg.dll del SlotMaximizerBe.dll del amdocl.dll del OpenCL.dll del OpenVideo.dll del OVDecode.dll rmdir C:\ProgramData\AMD\KDB /S /Q I wouldn't delete those files just yet--maybe rename them to foo.dll.old, in case the reinstallation of the correct version fails for any reason.
|
|
|
|
xhomerx10
Legendary
Offline
Activity: 4032
Merit: 8871
|
|
May 06, 2015, 12:11:26 PM |
|
Found the batch file! https://github.com/samr7/vanitygen/issues/19cd C:\Windows\System32 del SlotMaximizerAg.dll del SlotMaximizerBe.dll del amdocl64.dll del OpenCL.dll del OpenVideo64.dll del OVDecode64.dll cd C:\Windows\SysWOW64 del SlotMaximizerAg.dll del SlotMaximizerBe.dll del amdocl.dll del OpenCL.dll del OpenVideo.dll del OVDecode.dll rmdir C:\ProgramData\AMD\KDB /S /Q I wouldn't delete those files just yet--maybe rename them to foo.dll.old, in case the reinstallation of the correct version fails for any reason. Well that worked best for me with no issues at all and it took a lot less time than the uninstall/reinstall with a previous APP SDK which did not work because it left those files lying around.
|
|
|
|
tspacepilot
Legendary
Offline
Activity: 1456
Merit: 1081
I may write code in exchange for bitcoins.
|
|
May 08, 2015, 08:16:46 PM |
|
Tried putting the regex in a file and providing it with the -f option, but vanitygen just returned immediately You still need -r as well, e.g.: vanitygen64 -r -f regex.lst This works great (in general). Follow up, if I have a really long conjunction of |s in my pattern, I get "No patterns to search", but a shorter list works fine. tspacepilot@god:~/src/vanitygen$ ./vanitygen -r -f longlist No patterns to search tspacepilot@god:~/src/vanitygen$ ./vanitygen -r -f shortlist Pattern: ^1(1st|2nd|3rd|4th|5th|6th|7th|8th|9th|a|aaa|aaas|aarhus|aaron|aau|aba|ababa|aback|abacus|abaft|abandon|abandoned|abandoning|abandonment|abandons|abase|abased|abasement|abasements|abases|abash|abashed|abashes|abashing|abasing|abate|abated|abatement|abatements|abater|abates|abating|abbas|abbe|abbey|abbeys|abbot|abbots|abbott|abbreviate|abbreviated|abbreviates|abbreviating|abbreviation|abbreviations|abc|abdicate|abdomen|abdomens|abduct)+ Address: 1abP1hS2An7sho3ceT6QjvfwBL2et5gcK ...
My question is what is the threshold? Is it the number of conjuncts? Or is it the length of the file in chars? I'm guessing its the actual length in chars but I haven't trolled about in the source code enough to figure it out. I figured someone on here may know offhand. Thanks again! I'm having a lot of fun with vanitygen.
|
|
|
|
TheRealSteve
|
|
May 08, 2015, 08:43:23 PM |
|
I'm guessing its the actual length in chars but I haven't trolled about in the source code enough to figure it out. I figured someone on here may know offhand. Didn't know off-hand - is probably something in the regex parser anyway - but a quick check shows it might be 16,384 bytes. Are you trying to feed vanitygen a whole dictionary? Not sure that's the most efficient way to go
|
|
|
|
tspacepilot
Legendary
Offline
Activity: 1456
Merit: 1081
I may write code in exchange for bitcoins.
|
|
May 08, 2015, 08:46:39 PM |
|
I'm guessing its the actual length in chars but I haven't trolled about in the source code enough to figure it out. I figured someone on here may know offhand. Didn't know off-hand - is probably something in the regex parser anyway - but a quick check shows it might be 16,384 bytes. Are you trying to feed vanitygen a whole dictionary? Not sure that's the most efficient way to go Okay, I admit it yes I didn't expect it to be efficient, though, just thought I'd see if I could make it try (Note: for me I'm almost always interested in first finding out what i can do and then, afterward, evaluating what should do separately). I'll put the 16,384 hypothesis to an empirical test. Thanks, TheRealSteve EDIT: You were right! tspacepilot@god:~/src/vanitygen$ wc okay 1 1 16384 okay tspacepilot@god:~/src/vanitygen$ ./vanitygen -k -r -f okay [25.04 Kkey/s][total 2048] ^C tspacepilot@god:~/src/vanitygen$ wc toolong 1 1 16385 toolong tspacepilot@god:~/src/vanitygen$ ./vanitygen -k -r -f toolong No patterns to search
|
|
|
|
hexafraction
Sr. Member
Offline
Activity: 392
Merit: 268
Tips welcomed: 1CF4GhXX1RhCaGzWztgE1YZZUcSpoqTbsJ
|
|
May 08, 2015, 09:00:54 PM |
|
At the point where you are dealing with such a huge dictionary, it might be time to consider moving from a regex to a custom application that is designed to very quickly look up prefixes (e.g. using a Trie modified for prefix searching or O(1)-contains set of some sort).
I would be glad to make something of the sort in Java. Just PM me and I'll find a time to do it.
|
|
|
|
TheRealSteve
|
|
May 08, 2015, 09:01:17 PM |
|
Yeah, looks like it's limited in util.c, function vg_read_file: const int blksize = 16*1024; I haven't checked if you can just arbitrarily adjust that. Of course you can always try putting more patterns on additional lines. the letter 'A' for my dictionary file seems like it would be 2 lines, so... Good luck
|
|
|
|
tspacepilot
Legendary
Offline
Activity: 1456
Merit: 1081
I may write code in exchange for bitcoins.
|
|
May 08, 2015, 09:25:22 PM |
|
At the point where you are dealing with such a huge dictionary, it might be time to consider moving from a regex to a custom application that is designed to very quickly look up prefixes (e.g. using a Trie modified for prefix searching or O(1)-contains set of some sort).
I would be glad to make something of the sort in Java. Just PM me and I'll find a time to do it.
I appreciate the offer. But I wouldn't want to set anyone to doing this work without offering some sort of bounty, and as I'm basically just screwing around, I don't really have money to offer for it. Again, thanks though! If you're inspired to do this work on your own and you can also write in C, perhaps you'd consider submitting a patch to the vanitygen repo Yeah, looks like it's limited in util.c, function vg_read_file: const int blksize = 16*1024; I haven't checked if you can just arbitrarily adjust that. Of course you can always try putting more patterns on additional lines. the letter 'A' for my dictionary file seems like it would be 2 lines, so... Good luck Thanks Steve, I may screw around with that const depending on just how much fun I feel like having this afternoon
|
|
|
|
hexafraction
Sr. Member
Offline
Activity: 392
Merit: 268
Tips welcomed: 1CF4GhXX1RhCaGzWztgE1YZZUcSpoqTbsJ
|
|
May 08, 2015, 09:27:53 PM |
|
Hmm, it looks like it actually works with the option with the wordlist in the form: It will search in any order (i.e. the first match for any is printed) I also used -i but it is up to you whether you want case-sensitive or not. It seems that the -i must be before -f wordlistFileName Output is like: hexafraction@wlan1-loopback /tmp> vanitygen -i -f ptn2 Prefix '1besides' ignored, overlaps '1beside' Prefix '1breathe' ignored, overlaps '1breath' Prefix '1completely' ignored, overlaps '1complete' Prefix '1seriously' ignored, overlaps '1serious' Prefix '1shoulder' ignored, overlaps '1should' Prefix '1shouldnt' ignored, overlaps '1should' Prefix '1suddenly' ignored, overlaps '1sudden' Prefix '1thought' ignored, overlaps '1though' Prefix '1werent' ignored, overlaps '1were' Next match difficulty: 2413370 (278 prefixes) Pattern: 1shed Address: 1sHeD5XXXXXXXXXX Privkey: 5BLAHBLAHBLAH Next match difficulty: 2826646 (277 prefixes) Pattern: 1were Address: 1wEREGYYYYYYYYY Privkey: 5YADAYADAYADA Next match difficulty: 3410710 (276 prefixes)
|
|
|
|
|