📜 ⬆️ ⬇️

Xscreensaver of hours on Esquire.ru

I, horror, like this watch , really wanted to screensaver. No sooner said than done.

Dev Tools Chromium made it clear that the URL of the video file being played by the player looks something like this:
http://176.9.156.38/clock/big_<>-<, 5>.mp4?start=< >

1. Bash script standardtime screensaver:
 #!/bin/bash hour=$(date +%-H) ms=$(date +%-M) sec=$(date +%-S) rms=$((($ms / 5) * 5)) st=$((($ms - $rms) * 60 + $sec)) secret=$(curl -s "http://esquire.ru/clock" | grep superSecret | grep -o -P "[0-9a-f]+(?=\")") URL=$(printf "http://176.9.156.38/clock/big_%02d-%02d.mp4?start=%d&pipiska=%s" $hour $rms $st $secret) exec mplayer -cache 2000 -nosound -nolirc -wid $XSCREENSAVER_WINDOW -nostop-xscreensaver -fs -really-quiet $URL 

2. Fold the script into the PATH and make it executable.

3. Open your ~/.xscreensaver , find the programs option in it and add our standardtime by analogy:
 programs: \ maze -root \n\ GL: superquadrics -root \n\ --   -- GL: tronbit -root \n\ standardtime \n\ 

4. Run the xscreensaver configuration and select our newly created screensaver in the list (I called it Standardtime ).
')
5. We chop the screen and enjoy how men switch the seven-position indicator :)

Dependencies: bash, curl and mplayer.

UPD: Removed dependency on Python. Thanks jov .
UPD: sovok_kpss suggests that if you replace big in the template with a small url, then the video quality will be worse, but it will weigh less.
UPD: Escaire ricrolitis habraludey. Added hash, which comrade gusto quickly raped. Now we need curl.
UPD: Hashar stuck in the flash :) Decompile - we'll see.
UPD: And here is the decompiled code: http://pastebin.com/LQMCZ21j
UPD: Esquire squeezed a video for 30 euros. In the morning I pull this obfustsirovanny hmac.
UPD: Video can be found on the magnet link . Thank you acmer .

Source: https://habr.com/ru/post/143208/


All Articles