Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add multithreaded capability to poracle #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

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