This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
By reverse-engineering a bit the web interface, I wrote this simple script to get a clean still of a Tmezon doorbell camera | |
This script has been tested with the old 720p version of this: https://www.tmezon.com/7-inch-ip-intercom-p0013.html | |
It outputs an inline image, so you can upload this page to a php server and curl it to get a nice image of the current view from your doorbell | |
As a bonus, notice that the doorbell password does not appear anywhere. NEAT :I | |
*/ | |
// Basic token authentication |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class RandTools { | |
// Inizializza l'array interno sequenzialmente con interi | |
distRandInit (end, start = 0) { | |
this.dist_rand = []; | |
for (var i = start; i < end; i++) { | |
this.dist_rand.push(i); | |
} | |
} | |
// Ottiene casualmente un elemento dall'array e lo rimuove |