Skip to content

Instantly share code, notes, and snippets.

openpgp4fpr:FE66AABE0BFB52B45E034545CE25FD9C483D5E10

Keybase proof

I hereby claim:

  • I am flagranterror on github.
  • I am flagranterror (https://keybase.io/flagranterror) on keybase.
  • I have a public key ASDk_v0RFGnHgB6pwA_sNJQ1Qs4jr9fXaBNBNSGGPBOqzAo

To claim this, I am signing this object:

@flagranterror
flagranterror / batch_rename.ps1
Created November 1, 2019 13:30
Batch rename files from CSV manifest
$batchList = Import-Csv changes.csv -Header "OldName","NewName"
$batchList | foreach {
$oldName = $_.OldName
$newName = $_.NewName
Write-Host "Renaming $oldName to $newName"
Rename-Item $oldName $newName
@flagranterror
flagranterror / dhcpme.ps1
Created April 26, 2018 15:05
DHCP cmdlet
$wiredeth = get-netadapter -ifindex 10
function set-dhcpme {
[CmdletBinding()]
param()
PROCESS {
$wiredeth | remove-netipaddress -confirm:$false
$wiredeth | remove-netroute -confirm:$false
$wiredeth | set-netipinterface -dhcp enabled
$wiredeth | set-dnsclientserveraddress -resetserveraddresses
#!/usr/bin/perl
# perlsplit.pl input.txt
open(INPUT, $ARGV[0]);
open($dec,">" , "decoder.txt");
open($enc,">" , "encoder.txt");
my @array;
{
@flagranterror
flagranterror / OpenFrick.c
Created June 7, 2017 15:02
OpenF_ckV2 with fixes for 2017
/*
* E-DB Note: Updating OpenFuck Exploit ~ http://paulsec.github.io/blog/2014/04/14/updating-openfuck-exploit/
*
* OF version r00t VERY PRIV8 spabam
* Compile with: gcc -o OpenFuck OpenFuck.c -lcrypto
* objdump -R /usr/sbin/httpd|grep free to get more targets
* #hackarena irc.brasnet.org
*/
#include <arpa/inet.h>
@flagranterror
flagranterror / gist:18331b25d6773bfd54f0eeb0409308d1
Created January 10, 2017 20:56
CSV from JunOS show interfaces description
's/^([xgaf]e\S+)\s+(\w+)\s+(\w+)\s+(.*)/"\1","\2","\3","\4"/'
@flagranterror
flagranterror / exchange-online-netblocks.rb
Created August 22, 2016 19:06
List Exchange Online netblocks
#!/bin/ruby
require 'net/http'
require 'nokogiri'
response = Net::HTTP.get_response(URI.parse('https://support.content.office.net/en-us/static/O365IPAddresses.xml'))
xml = Nokogiri::XML(response.body)
@flagranterror
flagranterror / Makefile
Last active March 17, 2016 15:03
XKCD 149 IMPL
USERID := $(shell id -u)
.DEFAULT:
@sleep .1
sandwich:
ifeq ($(USERID), 0)
@echo "Okay:"
@echo
@echo " ##############"
#!/usr/bin/env python
from __future__ import print_function
import os
import hashlib
import sys
# I use this to sort through images and movies. Keep RAM utilization low.
# http://stackoverflow.com/questions/3431825/generating-a-md5-checksum-of-a-file
def hashfile(afile, hasher, blocksize=65536):
buf = afile.read(blocksize)