Skip to content

Instantly share code, notes, and snippets.

View 003random's full-sized avatar
:shipit:
../../../dev/random

003random 003random

:shipit:
../../../dev/random
View GitHub Profile
package main
import (
"log"
"net"
"os"
"github.com/google/gopacket"
"github.com/google/gopacket/layers"
"github.com/google/gopacket/pcap"
package main
import (
"fmt"
"log"
"net"
"os"
"time"
"github.com/google/gopacket"
<img src=x onerror=alert(0)>
@003random
003random / ssrf.go
Created December 8, 2019 20:09
Golang SSRF Protection & Prevention Using a Whitelist
package main
import (
"context"
"errors"
"log"
"net"
"net/http"
"strings"
"time"
@003random
003random / main.go
Last active December 7, 2020 15:15
Golang SSRF protection IPv4
package main
import (
"context"
"errors"
"log"
"net"
"net/http"
"strings"
"time"
@003random
003random / ssrf.go
Last active October 2, 2023 21:13
Golang SSRF Protection/Prevention
package main
import (
"context"
"errors"
"log"
"net"
"net/http"
"strings"
"time"
package main
import (
"github.com/miekg/dns"
"net"
"os"
"log"
"fmt"
)
@003random
003random / SSL_CERT_INFO.go
Last active June 25, 2019 18:34
Displays SSL Certificate Info. Every property is either a string or a int. No objects, for easy storing.
package main
import (
"fmt"
"os"
"net"
"bytes"
"strings"
"encoding/pem"
"crypto/tls"
@003random
003random / cert_info.go
Last active March 20, 2024 15:05
Prints SSL certificate info from a given URL. Including the encoded public key and cert itself
package main
import (
"fmt"
"os"
"bytes"
"encoding/pem"
"crypto/tls"
"crypto/x509"
)
@003random
003random / get neighbors from a 2 dimensional array index in python
Last active November 18, 2022 20:52
get neighbors from a 2 dimensional array index in python
def neighbors(matrix, rowNumber, colNumber):
result = []
for rowAdd in range(-1, 2):
newRow = rowNumber + rowAdd
if newRow >= 0 and newRow <= len(matrix)-1:
for colAdd in range(-1, 2):
newCol = colNumber + colAdd
if newCol >= 0 and newCol <= len(matrix)-1:
if newCol == colNumber and newRow == rowNumber:
continue