-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
32 lines (26 loc) · 1.03 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# === CONFIG =======================================================
WANNACRY_ISH_PROJECT_NAME="wannacry-ish"
CRYPTO_KEY_PROJECT_NAME="crypto-key"
# === BUILD =======================================================
build-wannacry-ish:
@echo "---> Building $(WANNACRY_ISH_PROJECT_NAME)"
go build -o build/wannacry_ish cmd/$(WANNACRY_ISH_PROJECT_NAME)/main.go
.PHONY: build-wannacry-ish
build-crypto-key:
@echo "---> Building $(CRYPTO_KEY_PROJECT_NAME)"
go build -o build/crypto_key cmd/$(CRYPTO_KEY_PROJECT_NAME)/main.go
.PHONY: build-crypto-key
build: build-wannacry-ish build-crypto-key
# === RUN =======================================================
# Generate AES and RSA key pair
run-crypto-key:
go run ./cmd/$(CRYPTO_KEY_PROJECT_NAME)/main.go
.PHONY: run-crypto-key
# Encrypt files
run-wannacry-ish-encrypt:
go run ./cmd/$(WANNACRY_ISH_PROJECT_NAME)/main.go encrypt -d $(d)
.PHONY: run-wannacry-ish
# Decrypt files
run-wannacry-ish-decrypt:
go run ./cmd/$(WANNACRY_ISH_PROJECT_NAME)/main.go decrypt -d $(d)
.PHONY: run-wannacry-ish