Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
github.com/codered-by-ec-council/hands-on-network-programming-with-go
Hands-on Network Programming with Go, by EC-Council
To run this project, you will need to add the following environment variables to your .env file
SSH_USER
SSH_PASSWORD
POSTGRES_USER
POSTGRES_PASSWORD
DSN
export POSTGRES_USER=postgres
export POSTGRES_PASSWORD=postgres
export DSN=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@localhost:5432/device_inventory
Clone the project
git clone https://github.com/codered-by-ec-council/Hands-on-Network-Programming-with-Go.git
Go to the project directory
cd Hands-on-Network-Programming-with-Go
Install dependencies
go mod download
Spin up the postgres container
# create the volume initially
docker-compose up
Start the web server
go run cmd/web/*.go
cd cmd/server
go build -o custom-server
sudo -E ./custom-server
package main
import (
"flag"
"fmt"
"log"
"github.com/codered-by-ec-council/Hands-on-Network-Programming-with-Go/pkg/devcon"
)
func main() {
target := flag.String("target", "127.0.0.1", "target against which to run a command")
cmd := flag.String("cmd", "", "command to run against target device")
flag.Parse()
client := devcon.NewClient(*target)
output, err := client.Run(*cmd)
if err != nil {
log.Fatal(err)
}
fmt.Println(output)
}
package main
import (
"log"
"github.com/codered-by-ec-council/Hands-on-Network-Programming-with-Go/pkg/cmdrunner"
)
func main() {
isisAdj := &cmdrunner.ISISAdjacencyRpcReply{Target: "labsrx", ExpectedNeighbor: "lab_srx100"}
sr := &cmdrunner.SpecificRouteRpcReply{Target: "labsrx", ExpectedNextHop: "192.168.0.1"}
cmds := []cmdrunner.Runner{isisAdj, sr}
if err := cmdrunner.Stepper(cmds); err != nil {
log.Println(err)
}
}
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.