Skip to content

Instantly share code, notes, and snippets.

View wsandin's full-sized avatar
:octocat:

William Sandin wsandin

:octocat:
View GitHub Profile
@wsandin
wsandin / README.md
Created September 25, 2018 11:15 — forked from FrankSpierings/README.md
Linux Container Escapes and Hardening
import sys
import socket
import ssl
class DNSproxy():
def __init__(self):
self.listen_addr = '127.0.0.1'
self.listen_port = 1053
self.upstream_dns = '1.1.1.1'
self.upstream_port = 853
#!/usr/bin/python3.10
"""
Playing around with PEP 634: Structural Pattern Matching
introduced in Python 3.10. This is just a very simple attempt
at solving Fizzbuzz using a "case switch".
Read more at https://doc.python.org/3.10/whatsnew/3.10.html
"""
@wsandin
wsandin / SimpleWebServer.java
Created April 11, 2021 21:57
SimpleWebServer.java
/***********************************************************************
SimpleWebServer.java
This toy web server is used to illustrate security vulnerabilities.
This web server only supports extremely simple HTTP GET requests.
This file is also available at http://www.learnsecurity.com/ntk
***********************************************************************/
import java.io.*;
@wsandin
wsandin / gist:a841131ab5fc75bb6d7767094972b48e
Last active May 6, 2022 07:55
FROM ZERO TO HERO ON THE TERMINAL
FROM ZERO TO HERO ON THE TERMINAL!
W. Sandin <wsandin@gmail.com>
May 2022
..::::.. ..,;;,,.
::::::::::::. .::t$$$$$$$$bu:,. .zn$$$$k

Keybase proof

I hereby claim:

  • I am wsandin on github.
  • I am wsandin (https://keybase.io/wsandin) on keybase.
  • I have a public key ASDaITGNxSmmeAOM_TqQ9TTt-tqavLUMxF9-jsNyecdC2go

To claim this, I am signing this object:

# Request the first page and save the cookies to a file
curl -c cookies.txt 'https://www.migrationsverket.se/ansokanbokning/valjtyp?0&enhet=U0586&sprak=sv&callback=https:/www.swedenabroad.se'
# Now request the second page, using the cookies saved from the first request
curl -b cookies.txt -s 'https://www.migrationsverket.se/ansokanbokning/wicket/page?2' \
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7' \
-H 'Accept-Language: en-GB,en-US;q=0.9,en;q=0.8' \
-H 'Cache-Control: max-age=0' \
-H 'Connection: keep-alive' \
-H 'Referer: https://www.migrationsverket.se/ansokanbokning/valjtyp?0&enhet=U0586&sprak=sv&callback=https:/www.swedenabroad.se' \