Skip to content

Instantly share code, notes, and snippets.

View zstix's full-sized avatar
📚
Studying infosec

Zack Stickles zstix

📚
Studying infosec
View GitHub Profile

Keybase proof

I hereby claim:

  • I am zstix on github.
  • I am zstix (https://keybase.io/zstix) on keybase.
  • I have a public key ASAAsi-pB8NHsbDlzsr9zMGeKnuVO0MY6xyMhjk7wlTNdwo

To claim this, I am signing this object:

@zstix
zstix / sql-snapshot.py
Last active June 4, 2019 19:35
sql-snapshot.py
#!/usr/bin/env python
import sys
import os
import time
import getopt
def show_help():
help_text = """Usage: %s <options>
Available Options:
--help
#!/usr/bin/env python
import sys
import requests
import itertools
XML = """
<?xml version="1.0" encoding="iso-8859-1"?>
<methodCall>
<methodName>wp.getUsersBlogs</methodName>
<params>
import os
import sys
import hashlib
def check_args():
if len(sys.argv) != 3:
print("[!] Insufficient artuments")
print("[*] Usage: %s <filepath> <email>" % sys.argv[0])
sys.exit(1)
import sys
import urllib2
from HTMLParser import HTMLParser
# TODO: unique list
# TODO: kick out external urls?
# TODO: output file
# TODO: better CLI interface
@zstix
zstix / navFromEdges.js
Last active May 12, 2020 19:04
Generate a nested navigation from a flat list of markdown edges
const linkWithoutDirs = ({ url, displayName }) => ({ url, displayName });
const linkFromEdge = edge => ({
url: edge?.node?.frontmatter?.path,
displayName: edge?.node?.frontmatter?.title
});
const addDirsToLink = link => ({
...link,
dirs: link.url.split('/').slice(1)
@zstix
zstix / ping_sites.ex
Last active August 31, 2020 23:22
A quick script to ping all of the site on a sitemap and check status codes
defmodule Crawl do
def process_resp({:ok, %{body: xml}}) do
XmlToMap.naive_map(xml)
end
def get_urls(xml) do
xml
|> Map.get("urlset")
|> Map.get("url")
|> Enum.map(&Map.get(&1, "loc"))
const visit = require('unist-util-visit');
const indentedCodeBlock = () => (tree) => {
visit(
tree,
(node) => node.type === 'code',
(codeBlock, index, parent) => {
const values = codeBlock.value.split('```').filter(Boolean);
for (const value of values) {
const index = values.indexOf(value);
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zstix
zstix / svg.js
Last active January 19, 2021 16:25
const labels = ['Q1', 'Q2', 'Q3', 'Q4'];
const data = [
[800000, 1200000, 1400000, 1300000],
[200000, 400000, 500000, 300000],
[100000, 200000, 400000, 600000]
];
const WIDTH = 400;
const HEIGHT = 300;
const LEFT = 20;