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
#include <openssl/rsa.h> | |
#include <openssl/pem.h> | |
int encryptData(const unsigned char *plaintext, int plaintextLength, unsigned char *ciphertext, EVP_PKEY *publicKey) | |
{ | |
EVP_PKEY_CTX *ctx = EVP_PKEY_CTX_new(publicKey, NULL); | |
if (!ctx) | |
{ | |
// Handle error | |
return -1; |
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 React from "react"; | |
import axios from "axios"; | |
import 'semantic-ui-css/semantic.min.css'; | |
import { | |
Form, | |
Button, | |
GridRow, | |
Grid, | |
Container, | |
} from "semantic-ui-react"; |
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
FROM golang:1.18 AS builder | |
# Ignore APT warnings about not having a TTY | |
ENV DEBIAN_FRONTEND noninteractive | |
RUN apt-get update \ | |
&& apt-get install -y \ | |
wget build-essential \ | |
pkg-config \ | |
--no-install-recommends \ |
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 ( | |
"crypto/tls" | |
"fmt" | |
"io" | |
"log" | |
"net" | |
"net/mail" | |
"time" |
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
sudo apt-get install autoconf automake libtool curl make g++ unzip -y | |
git clone https://github.com/google/protobuf.git | |
cd protobuf | |
git submodule update --init --recursive | |
./autogen.sh | |
./configure | |
make | |
make check | |
sudo make install | |
sudo ldconfig # refresh shared library cache. |
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
// Code generated by go-swagger; DO NOT EDIT. | |
package models | |
// This file was generated by the swagger tool. | |
// Editing this file might prove futile when you re-run the swagger generate command | |
import ( | |
"strconv" |
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
// Code generated by go-swagger; DO NOT EDIT. | |
package models | |
// This file was generated by the swagger tool. | |
// Editing this file might prove futile when you re-run the swagger generate command | |
import ( | |
"strconv" |
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
#!/usr/bin/perl -w | |
use strict; | |
use warnings; | |
use POSIX; | |
use File::Pid; | |
# Имя демона | |
my $daemonName = "mydaemon"; | |
# Используется в цикле для выхода | |
my $dieNow = 0; | |
# Путь к файлу PID, важно добавить свой путь куда есть доступ |