Skip to content

Instantly share code, notes, and snippets.

👔
Working like I should

shadowbq shadowbq

👔
Working like I should
Block or report user

Report or block shadowbq

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View make_garbage_files.sh
#! /bin/bash
for d in {1..100}; do
mkdir -p ./dir-$(printf %03d "$d") && cd ./dir-$(printf %03d "$d")
for n in {1..100}; do
( dd if=/dev/urandom of=file-$( printf %03d "$n" ).bin bs=1 count=$(( RANDOM + 1024 )) ) > /dev/null 2>&1
done
cd ..
done
@shadowbq
shadowbq / Window_Time.bat
Last active Apr 15, 2019
Windows Time Force for Cloud Snapshots
View Window_Time.bat
@echo off
:: Reference: https://www.pahoehoe.net/configure-w32time-ntp-on-a-standalone-windows-box/
:: Reference: https://community.spiceworks.com/topic/1951714-ntp-setting-server-2012-r2-settings-not-working
:: Reference: https://www.mcbsys.com/blog/2014/08/basic-windows-time-service-setup/
:: ## Look @config
w32tm /query /configuration
w32tm /query /status
:: # Changing the Polling Flag (its listed in decimal seconds)
@shadowbq
shadowbq / Powershell.log
Last active Mar 1, 2019
PDH with Powershell for Network Stats
View Powershell.log
' Notes:
' https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.diagnostics/get-counter?view=powershell-5.1
' https://docs.bmc.com/docs/display/public/bcmco95/Windows+IPv4+and+IPv6+Statistics
' https://kb.paessler.com/en/topic/50673-how-can-i-find-out-the-names-of-available-performance-counters
' https://docs.microsoft.com/en-us/windows-server/networking/technologies/network-subsystem/net-sub-performance-counters
' https://leanpub.com/windowspowershellnetworkingguide/read#leanpub-auto-performance-counters
PS C:\Users\jdoe> powershell –ExecutionPolicy Bypass
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
@shadowbq
shadowbq / Firewallpol.json
Last active Feb 14, 2019
Nsm javascript pseudo
View Firewallpol.json
{
"FirewallPolicyId": 120,
"Name": "TestFirewallPolicy",
"DomainId": 0,
"VisibleToChild": true,
"Description": "test the firewallpolicy",
"LastModifiedTime": "2012-12-12 12:32:44",
"IsEditable": true,
"PolicyType": "ADVANCED",
"PolicyVersion": 1,
View vss_powershell_restore.ps1
# VSS Location
# \\localhost\D$\@GMT-2011.09.20-06.00.04_Data\Folder\SubFolder
$source="\\localhost\D$\@GMT-2011.09.20-06.00.04_Data\Folder\SubFolder"
$dest="C:\temp\dest"
$logfile="C:\logs\VSS-restoration.log"
$what = @("/COPYALL","/MIR")
View gist:57e194fb2331a3cdb0dae6231c1611e2
$ yum update
$ sudo yum install gcc libtool perl-core zlib-devel openssl-devel libxslt-devel libxml-devel libyaml-devel -y
$ sudo update-ca-trust
$ cd /usr/src/
$ wget https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz
$ tar zxvf Python-2.7.10.tgz
$ cd Python-2.7.10/
$ ./configure
@shadowbq
shadowbq / vmkernel_prep.sh
Last active Mar 11, 2018
AskUbuntu SO #966585 - Post Kernel Upgrade
View vmkernel_prep.sh
#!/usr/bin/env bash
# Must be run as root / sudo
# Reference: https://askubuntu.com/questions/966585/ubuntu-17-10-upgrade-broke-vmware-workstation-12-5
if [ $(dpkg-query -W -f='${Status}' linux-headers-generic 2>/dev/null | grep -c "ok installed") -eq 0 ];
then
echo "Kernel Headers Package Missing"
echo "apt-get install linux-headers-generic";
exit 1
fi
View MAR searches
NetworkFlow process, process_id where NetworkFlow src_ip contains 10.250.45.0/24
and NetworkFlow dst_ip equals 10.0.0.2
CurrentFlow process_id where CurrentFlow local_ip contains 10.250.45.0/24 and
CurrentFlow remote_ip equals 10.0.0.2
View 594a43cce38b7f6812190596.csv
Indicator type Indicator Description
FileHash-SHA256 426142a23d356f105dfdfa27e9855d3ee47fe7149a502e9eb3cde1f368025fee
FileHash-SHA256 f82e90c02b05f86cd720f7f15667356a7e997c5cf13a1d6f6492db0c5ffbe6a2
domain sqnhh67wiujb3q6x.onion
FileHash-MD5 bda230a18d42aabca4b6b9ccdd62dedd
FileHash-MD5 d5bc571d34a80fc91ed6189f50b47772
FileHash-SHA1 1eb97c7ca98e75d64ad2d7b1ec5d5f6a67bb5c30
FileHash-SHA1 6b1589c5cd84d52ee091580355e99c9560064ebb
domain fxn5ao5mmaktpsug.onion
@shadowbq
shadowbq / update_cloudwatch_vpncount
Last active Jun 8, 2016
describe ipsec vpns for aws
View update_cloudwatch_vpncount
#!/usr/bin/python
import boto.ec2.cloudwatch
import boto.vpc
AWS_Regions=["us-east-1","us-west-2","us-west-1","eu-west-1","ap-southeast-1","ap-northeast-1","ap-southeast-2","sa-east-1","eu-central-1"]
#AWS_Regions=boto.ec2.regions()
CloudWatch_Region="us-east-1"
cw = boto.ec2.cloudwatch.connect_to_region(CloudWatch_Region)
for region in AWS_Regions:
You can’t perform that action at this time.