Show HN: r.ger.lv – simple random string generation
r.ger.lv
r.ger.lv
- r.ger.lv - default is 20 characters [a-zA-Z0-9]
- r.ger.lv/<len> <len> of [a-zA-Z0-9]
- r.ger.lv/s-<len> <len> of [a-zA-Z0-9_+-.,!@#$%^&*();\/|"']
`curl -L r.ger.lv/25` - if you want to run from the terminal.
More info: https://www.ger.lv/simple-random-string-generation/
Not an accusation, just an observation about the limits of the service.
Good luck.
What language doesn't have random string generation available either as a standard part of the runtime, or as a reliable library?
They just use /dev/urandom + sha512, and them capitalise some characters. You can pipe /dev/urandom input into any number of tools locally to get random strings - base64 is nice as it gives you a wider range of characters.
The only reason I've made it is to avoid creating random strings every time I need them. In the past few months I've done the following at least 5 times:
1) run ipython 2) run the following code:
import os
import hashlib
print(hashlib.sha512(os.urandom(128)).hexdigest())
The problem that it takes unnecessary time to do it. `curl -L r.ger.lv` is way simpler and faster for the same result. In fact, it's exactly the same code that's running on this site :) It's a small tool so you have fewer excuses to leave `SECURE_STRING = "TODO_CHANGEME"` in settings files.I did this tool mainly for myself, thought I'd share it, maybe someone finds it useful.
I don't at all. That's my whole point. You've taken yet another pretty simple command line utility, and made a "web service" for it.
> In the past few months I've done the following at least 5 times
I've probably generated 2x that many random strings just to generate test examples for how else this could be done, compare times, etc. I didn't suddenly think that I should put that on a http server somewhere.
> maybe someone finds it useful
or maybe someone uses it as a source of random data for their production application because they don't know any better.
You can get random strings in a shell by running `base64 /dev/urandom | head -c 30`. If you wanted to make it (or your own solution) easier, why not just create a shell script (or a python script with a shebang line).
Even easier execution (i.e., tab-completion to the path), no reliance on network or a server, no security issues by loading data over a remote connection.