screencloud
screencloud copied to clipboard
Random number (or letter) generation for file name format
I'm not quite sure if the full options for file names are listed anywhere, nowhere I saw anyway, but the topic suggestion is in the interest of privacy for private hosted images. For me I usually use the yyMMddhhmmss format, making guessing a file name not all that easy for some just curious. However if someone were more interested they could easily just setup a small script to try and GET request ever increasing seconds, minutes, hours, days, etc and collect all your future (and past if they cared to do that) images. I propose some random generation option for the file naming format.
As an example of my above idea I'd use something like yyMMddhhmmss_rnd would end up 131018032250_5 for one and 131018032250_9 for the next one, that example would only happen if you somehow took two screenshots at the same second, not very likely. Making the option "stack" would be good too. For example just one"rnd" in the format produces one random number, or letter if you want, to add wherever the users puts it, but if you did "rndrnd" it would produce two, and so on.
Now obviously all this isn't needed if you are just careful not to take a screenshot of anything you wouldn't want found, or to just make sure to delete it. But sadly we are prone to forgetting things. If anything above was unclear or requires more detail I'm happy to oblige to try and fix it.
I agree with Sunako, it would be a great feature to be able to generate some random in prefix/suffix for security.
+1 from me.
This is a good idea, I'll see what I can do in the next version.
What about an hash ? A simple md5 hash could be great to generate long random name for each uploads. We could use it as a prefix or suffix too.
Sounds good to me as well, no reason to not have hash as an option anyway. Though prefix and suffix option is a decent idea too, since if people use dates to order their screenshots random hash only file names would throw that off.
The new version (1.1.3) includes this. {rnd} should give you a random number, while {rnd_h} should give you a random md5 hash.
very nice, thx! but... how can I use it in client ? %rdn or %rnd_h seems not working
@arnaudmm What olav-st said, {rnd} and {rnd_h}.
@olav-st And as far as the hash goes, maybe just hashing the actual image would be better? Random is nice, but if someone was guessing them, the hash being that of the file or just random isn't going to make a huge difference. And I think people might like having the actual md5 of their image, could be useful for something. Just something to think about for the future.
Also, minor thing with the {rnd} random number, if you stack them like {rnd}{rnd}{rnd} etc, they seem to just produce the same random number, making them separate would make it more useful.
Thanks for the changes.
@olav-st Thanks a lot man, that's a really great update ! But like @Sunako said, it could be great to get an hash of our screenshot. Do you have any plan about that ?
@olav-st Great work!
Reinstalled ScreenCloud. I had to remove it because the screenshots weren't random.
Also, minor thing with the {rnd} random number, if you stack them like {rnd}{rnd}{rnd} etc, they seem to just produce the same random number, making them separate would make it more useful.
I might do that, but it won't be a high priority. The python code that currently does this is here if anyone wants to implement it before I do: https://github.com/olav-st/screencloud/blob/master/screencloud/res/modules/ScreenCloud.py#L16
Hi, The {rnd} command appears to be biased. I tried it for FTP uploading but it ended up not creating any files above 8.jpg and also overwrote the old ones a few times. {rnd_h} does not have such a problem however the string is long which isn't great.
I tried it for FTP uploading but it ended up not creating any files above 8.jpg
Strange, what OS are you using? It generates numbers from 0-9 on my Windows machine.
Windows 8.1. Still, only numbers 0-9 is not really viable for a server with ~300 uploads per day. — Sent from iOS
On Thu, May 15, 2014 at 10:36 AM, olav-st [email protected] wrote:
I tried it for FTP uploading but it ended up not creating any files above 8.jpg
Strange, what OS are you using? It generates numbers from 0-9 on my Windows machine.
Reply to this email directly or view it on GitHub: https://github.com/olav-st/screencloud/issues/10#issuecomment-43240786
Bumping this as I still want to be able to stack {rnd} and make it that it won't overwrite my current files. Also a random hexadecimal would be nice.
Just a quick update on this looking at the source code using {rnd_s} is what you guys are after.
@thispixel You're my hero! ❤❤❤❤❤❤❤❤❤❤
Any progress?
This issue has had no activity in the last 60 days. Please add a reply if you want to keep this issue active, otherwise it will be automatically closed after 30 days.