This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// original author: https://www.php.net/manual/en/function.print-r.php#93529 | |
// another dev said it was fixed for null values, but I don't encountered errors with null values for Matt's: https://www.php.net/manual/en/function.print-r.php#121259 | |
// Matt | |
function print_r_reverse($in) { | |
$lines = explode("\n", trim($in)); | |
if (trim($lines[0]) != 'Array') { | |
// bottomed out to something that isn't an array | |
return $in; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd | |
mkdir work | |
cd work | |
git clone https://github.com/zmap/zmap.git | |
apt-get install build-essential cmake libgmp3-dev gengetopt libpcap-dev flex byacc libjson-c-dev pkg-config libunistring-dev | |
cd zmap | |
cmake . | |
make -j4 | |
make install | |
cd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
JAVA_HOME='/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home' | |
cd /tmp | |
cat > input_tmp.java <<EOF | |
public class input_tmp { | |
public static void main(String[] args) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd | |
mkdir work | |
cd work | |
git clone https://github.com/zmap/zmap.git | |
apt-get install build-essential cmake libgmp3-dev gengetopt libpcap-dev flex byacc libjson-c-dev pkg-config libunistring-dev | |
cd zmap | |
cmake . | |
make -j4 | |
make install | |
cd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Name: cloudscan.py | |
# Purpose: Run Nessus Cloud Scans Easily. | |
# By: Jerry Gamblin | |
# Date: 11.05.15 | |
# Modified 11.05.15 | |
# Rev Level 0.5 | |
# ----------------------------------------------- | |
import requests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: http://stackoverflow.com/a/29052019/404271 | |
echo JDK 7 is required | |
if not x%1==x goto doit | |
:usage | |
echo %~n0 ^<Java file without .java extension^> | |
goto end | |
:doit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
## Copyright (C) 2014 Guillaume Valadon <guillaume.valadon@ssi.gouv.fr> | |
## 2014 Alexis Sultan <alexis.sultan@sfr.com> | |
## 2012 ffranz <ffranz@iniqua.com> | |
## | |
## This program is published under a GPLv2 license | |
# scapy.contrib.description = GTP | |
# scapy.contrib.status = loads |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Check if a given ip is in a network | |
* @param string $ip IP to check in IPV4 format eg. 127.0.0.1 | |
* @param string $range IP/CIDR netmask eg. 127.0.0.0/24, also 127.0.0.1 is accepted and /32 assumed | |
* @return boolean true if the ip is in this range / false if not. | |
*/ | |
function ip_in_range( $ip, $range ) { | |
if ( strpos( $range, '/' ) == false ) { | |
$range .= '/32'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat >/etc/apt/sources.list.d/kali.list <<EOF | |
deb http://http.kali.org/kali kali main contrib non-free | |
deb-src http://http.kali.org/kali kali main contrib non-free | |
deb http://security.kali.org/kali-security kali/updates main contrib non-free | |
deb-src http://security.kali.org/kali-security kali/updates main contrib non-free | |
EOF | |
sudo apt-key adv --keyserver pgp.mit.edu --recv-keys ED444FF07D8D0BF6 | |
sudo apt-get update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Run this script on a running Linux OS that you want to be put into an image file. | |
# Ensure that the system you run this on is less than 10GB in size if you wish to | |
# deploy the image file to AWS EC2. | |
# Note: This is based on Michael Fairchild's instance-to-ebs-ami.sh script. | |
# -https://gist.github.com/249915 | |
imageFile=${1:-"awsImage-$(date +%m%d%y-%H%M).img"} | |
imageMountPoint=${2:-'/mnt/image'} | |
extraFilesArchive=${3:-'awsInstanceFiles.tar.gz'} |
NewerOlder