Skip to content

Instantly share code, notes, and snippets.

Avatar
🦎
Working on Varanid.io

003random 003random

🦎
Working on Varanid.io
View GitHub Profile
View xss.html
<img src=x onerror=alert(0)>
@003random
003random / ssrf.go
Created Dec 8, 2019
Golang SSRF Protection & Prevention Using a Whitelist
View ssrf.go
package main
import (
"context"
"errors"
"log"
"net"
"net/http"
"strings"
"time"
@003random
003random / main.go
Last active Dec 7, 2020
Golang SSRF protection IPv4
View main.go
package main
import (
"context"
"errors"
"log"
"net"
"net/http"
"strings"
"time"
@003random
003random / ssrf.go
Last active Dec 8, 2019
Golang SSRF Protection/Prevention
View ssrf.go
package main
import (
"context"
"errors"
"log"
"net"
"net/http"
"strings"
"time"
View Get DNS return code (Rcode) in golang
package main
import (
"github.com/miekg/dns"
"net"
"os"
"log"
"fmt"
)
@003random
003random / SSL_CERT_INFO.go
Last active Jun 25, 2019
Displays SSL Certificate Info. Every property is either a string or a int. No objects, for easy storing.
View SSL_CERT_INFO.go
package main
import (
"fmt"
"os"
"net"
"bytes"
"strings"
"encoding/pem"
"crypto/tls"
@003random
003random / cert_info.go
Last active Mar 29, 2021
Prints SSL certificate info from a given URL. Including the encoded public key and cert itself
View cert_info.go
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 Apr 3, 2019
get neighbors from a 2 dimensional array index in python
View 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
View gist:84fab50e6707cc9f0b847d371a465bce
#!/usr/bin/env python3
import os, math
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):
View nmap get http|https|ssl services
nmap -p $(cat ports.txt | paste -sd "," -) $(dig +short poc-server.com | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b" | head -1) | grep -P "\b(https?|ssl)\b" | tail -n +2 | cut -d '/' -f1