Skip to content

Instantly share code, notes, and snippets.

View karagenit's full-sized avatar

Caleb Smith karagenit

View GitHub Profile
@karagenit
karagenit / Makefile
Last active December 1, 2017 00:32
PHP Hardcoded Credential Cleaner
main: install
install:
sudo cp ./clean-creds.sh /usr/bin/clean-creds
sudo chmod 777 /usr/bin/clean-creds
#!/usr/bin/env ruby
require 'uri'
# Helper to get hostnames from referrer fields
def get_host(url)
begin
URI.parse(url).host.to_s
rescue StandardError
''