https://github.com/kstrauser/spacewalker
https://github.com/kstrauser/spacewalker
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/kstrauser/spacewalker
- Owner: kstrauser
- Created: 2014-03-23T05:34:15.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2014-03-23T07:12:35.000Z (over 12 years ago)
- Last Synced: 2025-06-21T03:16:51.152Z (about 1 year ago)
- Language: Python
- Size: 129 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Spacewalker: Search mathy spaces for strings
Spacewalker is a collection of packages, or "walkers", for searching within
various random or cryptographic numberspaces for occurs of a given string. It
uses the `multiprocessing` module to divide the workload across a number of
CPUs, and the modules are written to run as time-efficiently as possible.
Processing speed is of the highest priority, as the unlikelyhood of finding a
matching stream of numbers grows arithmetically with the "width" of the string
(or the difference between its highest and lowest values) and exponentially
with its length. It's very easy to give search strings that are unlikely to be
found in the expected lifetime of this universe.
## Examples
Spacewalker comes with a commandline utility, `spacewalker`, for running
walkers. For example:
$ spacewalker -w pyrandom hello
Matching params: {'width': 10, 'base': 101, 'seedvalue': 424660}
Validation: hello
will search inside Python's `random` module space for the string "hello", and
report that it was found add the random seed 424660. The lowest-numbered ASCII
character in "hello" is "e" with value 101. This is the "base" parameter. The
highest-numbered ASCII is "l" with value 111, resulting in the "width" of 10.
This stream could be replayed with this program:
from random import seed, randrange
seed(424660)
chars = []
for i in range(5):
chars.append(chr(101 + randrange(10 + 1)))
print ''.join(chars)
The "+1" in the randrange call is because randrange is an open interval on the
right and only returns values *less than* the given argument.
## Notes
Of course it's Python 3 compatible! This isn't the stone ages.