Skip to content

Instantly share code, notes, and snippets.

View chapinb's full-sized avatar

Chapin Bryce chapinb

View GitHub Profile
for filename in PATH:
if filename.lower().__contains__("ntuser.dat"):
do= "Things"
@chapinb
chapinb / gist:af709f104e5374cf2b20
Last active August 29, 2015 14:09
Read & Search lines of a file
fin = inputFile
fout = open('logfile.txt'), 'w')
flag = False
with open(fin, 'r') as infile:
content = infile.readline()
if content.startwith("diff --"):
content2 = infile.readline() # read next line and see if it has keyword
if content2.__contains__("keyword"):
fout.write(content)
@chapinb
chapinb / yara_install.sh
Last active August 29, 2015 14:10
Install Yara
#!/bin/bash
# Written by CBRYCE on 11/23/14
# Licensed under GPLv3
# Update everything
sudo apt-get update && sudo apt-get upgrade -y
# install dependencies
sudo apt-get install git autotools-dev aclocal automake pkg-config -y
# pull code
def get_sqlite_veiw_info(db_path):
"""
Read all SQLite table names
:param db_path: String path to database
:return: List of table names
"""
# TODO: Add ability to filter responsive table names
__author__ = 'cbryce'
__license__ = 'GPLv3'
__date__ = '20140109'
__version__ = '0.00'
"""
anparser - an Open Source Android Artifact Parser
Copyright (C) 2015 Chapin Bryce
This program is free software: you can redistribute it and/or modify
import os
import hashlib
input_path = '' # Type the full path here, must be directory
output_path = '' # Type output path here, must be file
if not os.path.is_dir(input_path): quit()
if not os.path.is_file(output_path): quit()

Keybase proof

I hereby claim:

  • I am chapinb on github.
  • I am cbryce (https://keybase.io/cbryce) on keybase.
  • I have a public key whose fingerprint is 4799 6E37 B763 6C4C D1A2 DC66 BE16 B1E9 490F 9775

To claim this, I am signing this object:

@chapinb
chapinb / sample_replacement.py
Last active August 29, 2015 14:23
Sample Replacement
# This will do the bulk of the data based on the sample, you will have to add in headers and the accrual amounts. The script is not complete, but includes most of the info needed to get started/research
## Steps
# 1. define lists
# a. list of company names
# b. list of input data to iterate over int the for loop
# c. empty list to apply input data to after it has been processed in the loop
# 2. Iterate over input list
# a. replace values
# b.
@chapinb
chapinb / first-ten-minutes.sh
Last active January 8, 2021 06:52
First ten minutes on a server
# Based on blogpost https://www.codelitt.com/blog/my-first-10-minutes-on-a-server-primer-for-securing-ubuntu/
# Update and upgrade all
sudo apt-get update
sudo apt-get upgrade -y
# install packages
sudo apt-get install ufw fail2ban unattended-upgrades libpam-google-authenticator -y
# Setup ufw
@chapinb
chapinb / vshot.sh
Last active June 29, 2017 03:43
Modified vshot.sh script for use in the SANS SIFT 3 VM
#!/bin/bash
# vshot - The Volatile Shotgun
# by Devin Gergen ([email protected])
version="4.01"
#updates to come
# 1) extended volatilty tools
# 2) profile specific tools
# 3) -oshm option to use /dev/shm for ouput only (do not copy the memory image file to /dev/shm)
# 4) timeline support