Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am mchow01 on github.
  • I am mchow01 (https://keybase.io/mchow01) on keybase.
  • I have a public key ASD3tAYLUGE0d2ujgxnDV4ongyd6RzhfCeZYFigFwNyfOAo

To claim this, I am signing this object:

@mchow01
mchow01 / telemetry.md
Last active July 22, 2019 04:24
Microsoft Edge Telemetry

HTTP Request Header

`POST /windows/browser/edge/service/navigate/4 HTTP/1.1 Accept-Encoding: gzip, deflate User-Agent: SmartScreen/2814750931223057 Authorization: SmartScreenHash eyJhdXRoSWQiOiJhZGZmZjVhZC1lZjllLTQzYTYtYjFhMy0yYWQ0MjY3YWVlZDUiLCJoYXNoIjoiWFQyeUNoU0RmNGM9Iiwia2V5IjoicVRZQU9vVGtkMlcvVEhDSlgxUnBZUT09In0= Content-Length: 1768 Content-Type: application/json; charset=utf-8 Host: nav.smartscreen.microsoft.com Connection: Keep-Alive

@mchow01
mchow01 / cyber_security_skills_shortage.md
Last active February 20, 2024 06:17
How long we have been playing this "cyber security skills shortage" game for?
#!/usr/bin/perl
### FooVirus.pl
### Author: Avi kak (kak@purdue.edu)
### Date: April 19, 2006
print "\nHELLO FROM FooVirus\n\n";
print "This is a demonstration of how easy it is to write\n";
print "a self-replicating program. This virus will infect\n";
@mchow01
mchow01 / server.js
Created March 2, 2018 06:58
A deliberately simple and insecure server written in Node.js
var http = require('http');
http.createServer(function (request, response) {
if (request.method === 'POST') {
var data = '';
request.addListener('data', function(chunk) {
console.log("Got some data! => " + chunk);
data += chunk;
});
request.addListener('end', function() {
console.log("...and end.")
@mchow01
mchow01 / create_github_repos.rb
Created February 17, 2018 04:02
Create private GitHub repos under an organization for students in a class for homework and lab submissions
require "csv"
require 'Octokit'
# See documentation at:
# 1. https://github.com/octokit/octokit.rb
# 2. http://www.rubydoc.info/github/pengwynn/octokit/Octokit
# Settings
# *.tsv is a tab-delimited file with the columns separated by tab: lastname, firstname, githubusername
tsv_file_name = "20.tsv"
@mchow01
mchow01 / create_semester_group_project_repos.rb
Created February 17, 2018 04:01
Create private GitHub repos for semester group project in COMP 20: Web Programming
require "csv"
require 'Octokit'
# See documentation at:
# 1. https://github.com/octokit/octokit.rb
# 2. http://www.rubydoc.info/github/pengwynn/octokit/Octokit
# Settings
# roster.tsv contains two columns separated by tab: username and team_number
roster_file_name = "roster.tsv"
@mchow01
mchow01 / alarm.py
Last active March 1, 2024 18:32
A working Scapy program that sniffs traffic on a live work or from a PCAP file. Goal is to expand this to identify basic vulnerabilities (e.g., credentials sent in plaintext)
#!/usr/bin/python3
from scapy.all import *
import argparse
def packetcallback(packet):
try:
# The following is an example of Scapy detecting HTTP traffic
# Please remove this case in your actual lab implementation so it doesn't pollute the alerts
if packet[TCP].dport == 80:
@mchow01
mchow01 / pwcount.py
Last active March 3, 2021 04:35
A tally program for password cracking competition
import glob, os
passwords =[]
results = {}
student_totals = {}
password_totals = {}
for filename in os.listdir("."):
if filename.endswith(".html"):
results[filename] = {}
@mchow01
mchow01 / overflow_example.c
Created November 9, 2017 07:17
From Jon Erickson's Hacking: The Art of Exploitation, 2nd Edition
#include <stdio.h>
#include <string.h>
int main(int argc, char *argv[]) {
int value = 5;
char buffer_one[8], buffer_two[8];
strcpy(buffer_one, "one"); /* put "one" into buffer_one */
strcpy(buffer_two, "two"); /* put "two" into buffer_two */