#!/bin/bash
/usr/bin/echo "Building SYN-Scan-Firewall..."
go build -buildmode=pie -ldflags="-s -w -extldflags=-z,now,-z,relro" -tags=netgo -o SYN-Scan-Firewall SYN-Scan-Firewall.go

/usr/bin/echo "Setting up local bin..."
/usr/bin/sudo /usr/bin/cp SYN-Scan-Firewall /usr/local/bin/
/usr/bin/sudo /usr/bin/chown root:synfirewall /usr/local/bin/SYN-Scan-Firewall
/usr/bin/sudo /usr/bin/chmod 750 /usr/local/bin/SYN-Scan-Firewall
/usr/bin/sudo /usr/sbin/setcap 'cap_net_admin,cap_net_raw+ep' /usr/local/bin/SYN-Scan-Firewall
