Socket
Book a DemoInstallSign in
Socket

ilya.app/udpspoof

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ilya.app/udpspoof

v0.0.0-20230227215007-bf723afa29dd
Go
Version published
Created
Source

GoDoc

About

This is an experimental library that allows you to send packets with an arbitrary source IP-address and doesn't depend on gopacket. The code is heavily based on the work by @chrisnc.

It will truncate your payload if the maximum length is exceeded.

Usage example

package main

import (
	"log"
	"net"

	"ilya.app/udpspoof"
)

func main() {
	conn, err := udpspoof.NewUDPConn("127.0.0.1:5000")
	if err != nil {
		log.Fatal(err)
	}

	_, err = conn.WriteAs(net.ParseIP("8.8.8.8"), uint16(53), []byte("Hello\n"))
	if err != nil {
		log.Fatal(err)
	}
}

FAQs

Package last updated on 27 Feb 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.