Skip to content

Instantly share code, notes, and snippets.

package main
import (
"bytes"
"fmt"
"math"
"strings"
"time"
"github.com/coreos/etcd/raft"
@oiooj
oiooj / rsaencryption.go
Created January 26, 2019 05:31 — forked from hansstimer/rsaencryption.go
Go: rsa public key encryption
package main
import (
"bytes"
"crypto/rand"
"crypto/rsa"
"crypto/sha1"
"fmt"
)
#!/bin/sh
BASE_PATH='/data/htdocs/net'
RRD_PATH='/data/htdocs/net/rrd'
FLOW_LOG="/data/htdocs/net/script/switch-ip.log"
community="secret"
function checkip {
dot=`echo $1 | awk -F '.' '{print NF-1}'`
if [ $dot -ne 3 ]; then