Skip to content

Instantly share code, notes, and snippets.

View nu11secur1ty's full-sized avatar
:octocat:
root@kali:~# 🐫Perl

nu11secur1ty nu11secur1ty

:octocat:
root@kali:~# 🐫Perl
View GitHub Profile
@nu11secur1ty
nu11secur1ty / git_cheat-sheet.md
Created April 21, 2019 12:03 — forked from davfre/git_cheat-sheet.md
git commandline cheat-sheet
@nu11secur1ty
nu11secur1ty / install_python3.6_opensuse42.3.sh
Created June 12, 2018 10:57 — forked from amoilanen/install_python3.6_opensuse42.3.sh
Installing Python 3.6 on OpenSUSE Leap 42.3
# !/bin/bash
# Step 1. Install pyenv
git clone https://github.com/pyenv/pyenv.git ~/.pyenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bashrc
# Step 2. Install missing headers for all the Python modules to be built
@nu11secur1ty
nu11secur1ty / cspheader.php
Created January 9, 2018 09:12 — forked from phpdave/cspheader.php
CSP Header for PHP or Apache or .htaccess - Content Security Protocol
<?
//CSP only works in modern browsers Chrome 25+, Firefox 23+, Safari 7+
$headerCSP = "Content-Security-Policy:".
"connect-src 'self' ;". // XMLHttpRequest (AJAX request), WebSocket or EventSource.
"default-src 'self';". // Default policy for loading html elements
"frame-ancestors 'self' ;". //allow parent framing - this one blocks click jacking and ui redress
"frame-src 'none';". // vaid sources for frames
"media-src 'self' *.example.com;". // vaid sources for media (audio and video html tags src)
"object-src 'none'; ". // valid object embed and applet tags src
"report-uri https://example.com/violationReportForCSP.php;". //A URL that will get raw json data in post that lets you know what was violated and blocked
@nu11secur1ty
nu11secur1ty / xss_clean.php
Created January 7, 2018 11:32 — forked from mbijon/xss_clean.php
XSS filtering in PHP (cleans various UTF encodings & nested exploits)
<?php
/*
* XSS filter, recursively handles HTML tags & UTF encoding
* Optionally handles base64 encoding
*
* ***DEPRECATION RECOMMENDED*** Not updated or maintained since 2011
* A MAINTAINED & BETTER ALTERNATIVE => kses
* https://github.com/RichardVasquez/kses/
*
* This was built from numerous sources
@nu11secur1ty
nu11secur1ty / AGO_PullHostedFeatures.py
Created November 26, 2017 18:41 — forked from oevans/AGO_PullHostedFeatures.py
Python script to pull hosted features with attachments into a local file geodatabase. See ReadMe below.
import os, urllib, urllib2, datetime, arcpy, json
## ============================================================================== ##
## function to update a field - basically converts longs to dates for date fields ##
## since json has dates as a long (milliseconds since unix epoch) and geodb wants ##
## a proper date, not a long.
## ============================================================================== ##
def updateValue(row,field_to_update,value):
outputfield=next((f for f in fields if f.name ==field_to_update),None) #find the output field
@nu11secur1ty
nu11secur1ty / get_oauth2_token.py
Created November 26, 2017 17:45 — forked from burnash/get_oauth2_token.py
Simple command line script to fetch a Google API's access token.
'''
This script will attempt to open your webbrowser,
perform OAuth 2 authentication and print your access token.
It depends on two libraries: oauth2client and gflags.
To install dependencies from PyPI:
$ pip install python-gflags oauth2client
obj-m += rootkit.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
@nu11secur1ty
nu11secur1ty / install-gcc48-linuxbrew-centos6.md
Created April 16, 2016 14:08 — forked from stephenturner/install-gcc48-linuxbrew-centos6.md
Installing gcc 4.8 and Linuxbrew on CentOS 6

Installing gcc 4.8 and Linuxbrew on CentOS 6

The GCC distributed with CentOS 6 is 4.4.7, which is pretty outdated. I'd like to use gcc 4.8+. Also, when trying to install Linuxbrew you run into a dependency loop where Homebrew's gcc depends on zlib, which depends on gcc. Here's how I solved the problem.

Note: Requires sudo privileges.

Resources:

@nu11secur1ty
nu11secur1ty / chromedriver.sh
Created March 29, 2016 07:02 — forked from mikesmullin/chromedriver.sh
easily install chromedriver on linux/osx
sudo apt-get install unzip;
wget -O /tmp/chromedriver.zip http://chromedriver.googlecode.com/files/chromedriver_linux64_19.0.1068.0.zip && sudo unzip /tmp/chromedriver.zip chromedriver -d /usr/local/bin/;