Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
PCAPFILE=$1
LOG_LOCATION='/tmp/suricata/'
if [ -z $PCAPFILE ] || [ ! -f $PCAPFILE ]; then
echo "File ${PCAPFILE} doesnt seem to be there - please supply a pcap file."
exit 1;
fi
#!/usr/bin/env bash
# Author: Josh Stroschein
# Date: 22 Nov 2020
# Reference: https://suricata-update.readthedocs.io/en/latest/quickstart.html#directories-and-permissions
if (($EUID != 0)); then
echo -e "[!] Please run this script as root or with \"sudo\"\n"
exit 1
fi
@jstrosch
jstrosch / cuckoo-setup-virtualenv.sh
Last active October 19, 2023 10:56
This script will setup Python virtualenv, I made it specifically for setting up Cuckoo. Please see the notes in the script before running.
#!/usr/bin/env bash
# Author: Josh Stroschein
# Source: https://askubuntu.com/questions/244641/how-to-set-up-and-use-a-virtual-python-environment-in-ubuntu
# NOTES: Run this script as: sudo -u <USERNAME> cuckoo-setup-virtualenv.sh
# Additionally, your environment may not allow the script to source bashrc and you may need to do this manually after the script completes
# install virtualenv
sudo apt-get update && sudo apt-get -y install virtualenv
@jstnlvns
jstnlvns / git: gitignore.md
Created November 16, 2018 19:42
a gitignore cheatsheet

Git sees every file in your working copy as one of three things:

  1. tracked - a file which has been previously staged or committed;
  2. untracked - a file which has not been staged or committed; or
  3. ignored - a file which Git has been explicitly told to ignore.

Ignored files are usually build artifacts and machine generated files that can be derived from your repository source or should otherwise not be committed. Some common examples are:

  • dependency caches, such as the contents of /node_modules or /packages
  • compiled code, such as .o, .pyc, and .class files
@LiveOverflow
LiveOverflow / googlectf2018_js_safe_2.py
Last active March 15, 2023 02:54
GoogleCTF2018 - JS Safe 2
import random
import re
# python3
# STAGE 1
"""
stage1 = 'Ӈ#7ùª9¨M¤ŸÀ.áÔ¥6¦¨¹.ÿÓÂ.։£JºÓ¹WþʖmãÖÚG¤…¢dÈ9&òªћ#³­1᧨'
out = ""
key = "\x82\x1e\x0a\x9a"
@gaearon
gaearon / minification.md
Last active October 15, 2024 07:39
How to Set Up Minification

In production, it is recommended to minify any JavaScript code that is included with your application. Minification can help your website load several times faster, especially as the size of your JavaScript source code grows.

Here's one way to set it up:

  1. Install Node.js
  2. Run npm init -y in your project folder (don't skip this step!)
  3. Run npm install terser

Now, to minify a file called like_button.js, run in the terminal:

@maiers
maiers / gist:3a9dd183dd5e6c434a85694c1fb2a57a
Created May 27, 2018 14:58
Compare DNS output from two Servers for multiple domains
#!/bin/bash
# This script will create a visual comparison of the
# output of the two DNS servers defined as NS0 and
# NS1 for the fqdn defined in DOMAINS
#
# Created: 2018-05-27
# Author: Sebastian <sebastian@progether.com>
#
# Source: https://stackoverflow.com/a/29079962/683977
@bonzanini
bonzanini / config.py
Last active September 3, 2024 07:38
Twitter Stream Downloader
consumer_key = 'your-consumer-key'
consumer_secret = 'your-consumer-secret'
access_token = 'your-access-token'
access_secret = 'your-access-secret'
@glnds
glnds / less-cheatsheet.md
Last active November 4, 2024 06:42
Less Cheatsheet

Less Cheatsheet

less {filename}

Navigation
SPACE forward one window
b backward one window
d forward half window