![]() |
|
[Python] Split passwords from a file - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [Python] Split passwords from a file (/showthread.php?tid=5309226) |
Split passwords from a file - l3k0w - Jun 18, 2016 I tried using crunch and hydra for generating passwords and brute-forcing. But hydra's limit is 50,000,000 lines per file and my file was exceeding that limit. So I thought it will be a good idea if I try and create program that splits the file into separate files. So I came up with this. I know it's not something complicated, but maybe it can help someone 🙂 Code def main():Q: What are you guys using for splitting a file/generating passwords? Does crunch has a command for splitting? * - C0ldplay - Jun 18, 2016 Easier way... dd if=crunch.one of=Crunch.one.partone bs=1M count=50 skip=0 creates a file named Crunch.one.partone with 50 but that can be changed to your liking. * - l3k0w - Jun 18, 2016 (Jun 18, 2016 09:18 AM)rob_ert Wrote: Easier way... Nice one! But can you explain what bs, count and skip are for and how we can use them? * - C0ldplay - Jun 19, 2016 (Jun 18, 2016 10:02 AM)l3k0w Wrote: Nice one! bs= sets the block size. For example, bs=1 would set it to 1MiB. count= copies the set amount of blocks. * - Goodies - Jun 19, 2016 Lol don't use dd. dd uses block sizes, not line counts. This is statistically very likely to end up somewhere in the middle of a word/sentence... There's an actual split utility in linux: http://linux.die.net/man/1/split This will split a line into multiple files with no more than 10,000,000 lines each: Code split -l 10000000The default naming is pretty strange. Use -d for part numbers instead of letters ( and -S if you think there are going to be more than 100 files. In your case, I doubt it. If you actually want a Python version, though. You can do something like this: PHP Code |