Skip to content

Comments

Add multithreaded capability to poracle#2

Open
khai-tran wants to merge 3 commits intoiagox86:masterfrom
khai-tran:master
Open

Add multithreaded capability to poracle#2
khai-tran wants to merge 3 commits intoiagox86:masterfrom
khai-tran:master

Conversation

@khai-tran
Copy link

Changes in Poracle.rb

  • Poracle.generate_set: original implementation returns character array, then attempts to do ACII conversion back to bytearray . This will have problems when encrypted value is using different encodings.
  • PPoracle.find_character: some server validates valid block construction up to the blockprime, so instead of sending:

[Block n][Block n+1]

Send:
[Block 0]...[Block n][Block n+1]

Changes in Main program (DemoMultiThreaded.rb)

  • Added multithreading capabilities using meh's library: https://github.com/meh/ruby-thread

  • Added ability to save temporary results to file

    • Format: [block index],[decrypted value]
  • Added ability to skip already decrypted blocks

    Usage: DemoMultiThreaded.rb [options]

    Specific options:
    -s, --sort Sort temporary results
    -v, --verboseShow debug messages
    -t, --threads SIZE Set threadpool size
    -f, --file FILE Save temporary results to file
    -h, --help Show this message

    ruby DemoMultiThreaded.rb -f tmp.txt -v -t 10

### Changes in Poracle.rb
* **Poracle.generate_set**: original implementation return character
array, then attempt to do ACII conversion back to bytearray . This will
have problems when encrypted value is using different encodings.
* **PPoracle.find_character**: some server validate valid block
construction up to the blockprime, so instead of sending:
*
### Changes in Main program (DemoMultiThreaded.rb)
* Added multithreading capabilities using meh's library:
https://github.com/meh/ruby-thread
* Added ability to save temporary results to file
* Format: *[block index],[decrypted value]*
* Added ability to skip already decrypted blocks

*[Block n][Block n+1]*

Send:

*[Block 0]...[Block n][Block n+1]*

Usage: Demo.rb [options]

Specific options:
-s, --sort   Sort temporary results
-v, --verboseShow debug messages
-t, --threads SIZE   Set threadpool size
-f, --file FILE  Save temporary results to file
-h, --help   Show this message

ruby DemoMultiThreaded.rb -f tmp.txt -v -t 10
- Poracle module should work with bytearray value of the payload,
leaving encoding/decoding to main module
- Refactor argument parsing to static class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant