Skip to content

Instantly share code, notes, and snippets.

View jas-'s full-sized avatar
🏃‍♂️

Jason Gerfen jas-

🏃‍♂️
View GitHub Profile
@jas-
jas- / readme.md
Last active February 26, 2024 09:43
Samba FS Active Directory Implementation

Samba Configuration for Active Directory

Kerberos realm authentication using LDAP authorization via MS Windows Active Directory

Some details on the SAMBA configuration. Original Samba, ADS, Winbind documention was found http://gentoo-wiki.com/HOWTO_Adding_a_Samba_Server_into_an_existing_AD_Domain.

Pre-Installation for Gentoo using emerge

This particular installation of Samba requires a few additional packages and features to ensure that Active Directory authentication works properly. In this first step we add the necessary use flags to the Gentoo Portage package system.

@jas-
jas- / readme.md
Last active August 29, 2015 14:04
LAMP stack w/ DHCPD 802.1Q Configuration

802.1Q networking, LAMP stack, TFPT & MySQL user permissions

Details on the current configuration of tyr.example.com can be found below. 10/11/2012

Kernel

Raid

Details for the raid1 configuration are as follows:

fdisk

@jas-
jas- / class.stream.php
Last active June 2, 2022 18:22
PHP stream handler w/ support for multiple files over PUT
<?php
/**
* stream - Handle raw input stream
*
* LICENSE: This source file is subject to version 3.01 of the GPL license
* that is available through the world-wide-web at the following URI:
* http://www.gnu.org/licenses/gpl.html. If you did not receive a copy of
* the GPL License and are unable to obtain it through the web, please
*
@jas-
jas- / recovery
Created September 27, 2014 13:57
Recovery tool for deleted files
#!/bin/bash
#######################################################################################################
#######################################################################################################
#######################################################################################################
###### #######
###### #######
###### This script will help you to recover the accidentally #######
###### deleted data from crashed linux file systems #######
###### Version-2 #######
###### Script created by (Srijan Kishore) #######
@jas-
jas- / ufw-intel.sh
Created December 9, 2014 17:04
Intel gathering for UFW logs
dmesg | awk '{split($7, arr, "="); if (match(arr[2], /[0-9.]/)){print "\nHOST: " arr[2] " ================\n";system("host " arr[2]);system("whois " arr[2]);system("dig " arr[2]);}}' > log
@jas-
jas- / accuracy.js
Last active December 23, 2017 23:32
node.js libnmap example usage
/*!
* libnmap
* Copyright(c) 2013-2015 Jason Gerfen <jason.gerfen@gmail.com>
* License: MIT
*/
var nmap = require('libnmap')
, opts = {
timeout: 900, // 900s = 10m and increases the reliability of scan results
flags: [
@jas-
jas- / json-output.json
Last active November 1, 2015 16:27
libnmap output examples (both make use of the examples/accuracy.js example script)
{
"172.17.190.241-255": {
"$": {
"scanner": "nmap",
"args": "nmap --host-timeout=900s -T0 --max-retries 10 --ttl 200ms --scan-delay 10s --max-rate 30 -oX - -p1-1024 172.17.190.241-255",
"start": "1445783304",
"startstr": "Sun Oct 25 14:28:24 2015",
"version": "6.40",
"xmloutputversion": "1.04"
},
@jas-
jas- / .bashrc
Last active November 27, 2016 17:19
.bashrc alias functions to handle GPG encrypt/decrypt operations per file/folder
# Define the encryption algo for gpg
algo="aes256"
# Define the gpg binary name (Solaris is gpg2)
gpg_name="gpg"
# Use ${gpg_name} to get full path of GPG
gpg=$(which ${gpg_name} 2>/dev/null)
# Validate GPG is installed
@jas-
jas- / .bashrc
Last active July 8, 2017 14:07
Parse UFW log
# Default path of UFW parser
parse_ufw=/path/to/parse-ufw.awk
# Default path of UFW log
log_ufw=/var/log/ufw.log
# Function for filtering outbound comms
function ufw_out
{
#!/bin/bash
# Create a timestamp
ts="$(date +%Y%m%d)"
# Determine running directory
cwd="$(pwd $(dirname $0))"
# Define build_file
build_file=