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
{ | |
"eventId": "b6df5fac-6e32-4d17-837d-e7e647d49fc1", | |
"createdAt": "2024-03-23T19:01:36.309Z", | |
"data": { | |
"responseId": "qYe9WG", | |
"submissionId": "qYe9WG", | |
"respondentId": "oBypZV", | |
"formId": "3yPpb4", | |
"formName": "Ankieta po zakupie w markecie TEST TEST", | |
"createdAt": "2024-03-23T13:37:58.000Z", |
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
// Check if the passed hash matches the expected one | |
if ( !$this->IsWebhookTrusted( $encryption_key, $signature_header, $data['data'] ) ) { | |
// Hash is not valid | |
// Prepare response message | |
$response_data = array( | |
'status' => 'error', | |
'response' => array( | |
'code' => 403, | |
'message' => 'Hash invalid. Bey, Bey...', |
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
private function IsWebhookTrusted($tallyKeyFromSettings, $receivedSignature, $payLoadBody) : bool { | |
// Obliczamy oczekiwany podpis HMAC na podstawie klucza Tally i payloadu | |
$payLoadBodyString = json_encode($payLoadBody); | |
$expectedSignature = hash_hmac('sha256', $payLoadBodyString, $tallyKeyFromSettings); | |
error_log("Hash coming from request: " . $receivedSignature); | |
error_log("Hash saved in settings: " . $tallyKeyFromSettings); |
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
#!/bin/bash | |
# Sprawdź stan połączenia 3G | |
status=$(sudo sakis3g status) | |
# Sprawdź, czy połączenie jest aktywne | |
if [[ "$status" == "E3131 connected to Orange (26003)" ]]; then | |
echo "Połączenie 3G jest aktywne. Sprawdzanie dostępności internetu..." | |
# Sprawdź dostępność internetu przez ping |
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
version: "3" | |
services: | |
# WireGuard VPN service | |
wireguard: | |
image: linuxserver/wireguard:latest | |
restart: always | |
container_name: wireguard | |
cap_add: | |
- NET_ADMIN |