Skip to content

Instantly share code, notes, and snippets.

@jo-makar
jo-makar / Dockerfile
Last active January 23, 2023 06:59
Metasploit framework as a docker container including persistent database storage
FROM debian:10
RUN apt-get update && \
apt-get install -y curl gnupg2 nmap postgresql postgresql-client
# Ref: https://docs.rapid7.com/metasploit/installing-the-metasploit-framework/#installing-the-metasploit-framework-on-linux
RUN cd /root && curl -o msfinstall https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb && chmod +x msfinstall
RUN cd /root && ./msfinstall
# Ref: https://www.offensive-security.com/metasploit-unleashed/using-databases/
@MarkBaggett
MarkBaggett / 1 - pythons_sinister_secrets.md
Last active April 16, 2023 21:37
Come To The Darkside - Pythons Sinister Secrets
@GAS85
GAS85 / split_tunnel_VPN.md
Last active May 18, 2024 12:25
Force Torrent/user Traffic through VPN Split Tunnel on Ubuntu 16.04
@stefanhendriks
stefanhendriks / cookieshelper.cs
Last active June 4, 2023 17:14
A cookies helper class to easily read and set cookies on HttpRequest (Asp.Net Core)
public class CookiesHelper
{
// Inspired from:
// https://github.com/aspnet/Mvc/blob/538cd9c19121f8d3171cbfddd5d842cbb756df3e/test/Microsoft.AspNet.Mvc.FunctionalTests/TempDataTest.cs#L201-L202
public static IDictionary<string, string> ExtractCookiesFromResponse(HttpResponseMessage response)
{
IDictionary<string, string> result = new Dictionary<string, string>();
IEnumerable<string> values;
@10pies
10pies / PMAbkp.sh
Created December 10, 2014 11:42
Download entire database(s) using the PhpMyAdmin web interface. Useful when the hosting provider does not allow remote connections with the database server.
#!/bin/bash
HOST="example.com"
USER="dbuser"
PASS="pass123"
TARGETDIR="/backup"
TMPFN=".export.tmp"
for DB in "xyz" "pqr"
@joey-qc
joey-qc / TSQL-to-POCO
Created September 26, 2013 06:56
A simple TSQL script to quickly generate c# POCO classes from SQL Server tables and views. You may tweak the output as needed. Not all datatypes are represented but this should save a bunch of boilerplate coding. USAGE: Run this query against the database of your choice. The script will loop through tables, views and their respective columns. Re…
declare @tableName varchar(200)
declare @columnName varchar(200)
declare @nullable varchar(50)
declare @datatype varchar(50)
declare @maxlen int
declare @sType varchar(50)
declare @sProperty varchar(200)
DECLARE table_cursor CURSOR FOR