Supports :
- install
- upgrade
Keeps your config !
Uses default arguments !
| #!/bin/sh | |
| export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin":$PATH | |
| #echo $PATH | |
| INPUT_PORTS="22,21,20,80,443,3306,8006" | |
| FORWARD_PORTS="3306,80,443,8080" | |
| cd /sbin/ | |
| echo "[IpTables] Reset..." | |
| sleep 1 | |
| iptables -F | |
| iptables -X |
| #!/bin/bash | |
| # | |
| # Docker OR OPENVPN rules | |
| # | |
| #Reset rules | |
| iptables -F | |
| iptables -X | |
| iptables -t nat -F |
| # See : https://github.com/williamdes/sql-backup |
| /** | |
| * Get fingerprint from a certificate in android.content.pm.Signature | |
| * @return String fingerprint that contains the SHA-256 digest | |
| */ | |
| private static String getFingerprint(android.content.pm.Signature ce){ | |
| String certificate = ""; | |
| InputStream input = new ByteArrayInputStream(ce.toByteArray()); | |
| CertificateFactory cf = null; | |
| try { |
| //FROM | |
| //https://stackoverflow.com/a/34571089/5155484 | |
| typedef unsigned char uchar; | |
| static const std::string b = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";//= | |
| static std::string base64_encode(const std::string &in) { | |
| std::string out; | |
| int val=0, valb=-6; | |
| for (uchar c : in) { |