Skip to content

Instantly share code, notes, and snippets.

@justinsteven
justinsteven / fix_cydia_error_20180811.md
Last active September 22, 2019 01:05
How to fix Cydia Impactor "http-win.cpp:160" error as of 2018-08-11
@dublado
dublado / instapy-example.py
Last active June 21, 2022 11:02
Instapy example
from instapy import InstaPy
#if you don't provide arguments, the script will look for INSTA_USER and INSTA_PW in the environment
session = InstaPy(username='clubedelider', password='pass', headless_browser=True)
'''
session.set_relationship_bounds(enabled=True,
potency_ratio=1.34,
delimit_by_numbers=True,
max_followers=850000,
@uluQulu
uluQulu / Instapy-Quota-Supervisor.md
Last active April 23, 2021 17:10
Description of Quota Supervisor and its usage

Take Full Control Of The Actions With The Most Sophisticated Approaches:

likes, comments, follows, unfollows, server calls

in daily/hourly basis fully featured and highly flexible easily maintainable universal solution

Quota Supervisor

session.set_quota_supervisor(enabled=True, sleep_after=['likes', 'comments_d', 'follows', 'unfollows', 'server_calls_h'], sleepyhead=True, stochastic_flow=True, notify_me=True,
                              peak_likes=(57, 585),
 peak_comments=(21, 182),
#!/bin/bash
read -p "Enter your Site Name to be created (include .com):" SITENAME
#1. Create apache2 site and it's folders
mkdir /var/www/html/$SITENAME
mkdir /var/www/html/$SITENAME/public_html/
chmod -R 755 /var/www/html/$SITENAME/public_html/
cat > /etc/apache2/sites-available/$SITENAME.conf << EOF
<VirtualHost *:80>
ServerAdmin admin@$SITENAME
ServerName $SITENAME
@jessfraz
jessfraz / boxstarter.ps1
Last active April 11, 2024 16:02
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
@mattifestation
mattifestation / FileReadPrimitive.ps1
Last active June 12, 2023 16:33
A WMI file content read primitive - ROOT/Microsoft/Windows/Powershellv3/PS_ModuleFile
$CimSession = New-CimSession -ComputerName 10.0.0.2
$FilePath = 'C:\Windows\System32\notepad.exe'
# PS_ModuleFile only implements GetInstance (versus EnumerateInstance) so this trick below will force a "Get" operation versus the default "Enumerate" operation.
$PSModuleFileClass = Get-CimClass -Namespace ROOT/Microsoft/Windows/Powershellv3 -ClassName PS_ModuleFile -CimSession $CimSession
$InMemoryModuleFileInstance = New-CimInstance -CimClass $PSModuleFileClass -Property @{ InstanceID= $FilePath } -ClientOnly
$FileContents = Get-CimInstance -InputObject $InMemoryModuleFileInstance -CimSession $CimSession
$FileLengthBytes = $FileContents.FileData[0..3]
[Array]::Reverse($FileLengthBytes)
@rsmudge
rsmudge / eternalblue.cna
Last active October 10, 2023 15:05
Script to deliver Cobalt Strike's Beacon payload with the Metasploit Framework's exploit/windows/smb/ms17_010_eternalblue exploit.
#
# script to help move around with ms17-010 from Metasploit
# Go to Attacks -> Eternal Blue
#
# target, listener, where to save .rc file
sub generate_rc_file {
local('$target $listener $where $handle $shellcode');
($target, $listener, $where) = @_;
@VirtuBox
VirtuBox / protect.conf
Created June 23, 2017 20:54
Nginx Configuration to block SQL Injection and similar attacks
location ~* "(eval\()" { deny all; }
location ~* "(127\.0\.0\.1)" { deny all; }
location ~* "([a-z0-9]{2000})" { deny all; }
location ~* "(javascript\:)(.*)(\;)" { deny all; }
location ~* "(base64_encode)(.*)(\()" { deny all; }
location ~* "(GLOBALS|REQUEST)(=|\[|%)" { deny all; }
location ~* "(<|%3C).*script.*(>|%3)" { deny all; }
location ~ "(\\|\.\.\.|\.\./|~|`|<|>|\|)" { deny all; }
location ~* "(boot\.ini|etc/passwd|self/environ)" { deny all; }
location ~* "(thumbs?(_editor|open)?|tim(thumb)?)\.php" { deny all; }
@thyn
thyn / java.sh
Last active November 22, 2018 10:14
java
#!/bin/sh
JAVA_VER=jdk-9.0.4
JAVA_FILE=jdk-9.0.4_linux-x64_bin.tar.gz
cd /opt/
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/9.0.4+11/c2514751926b4512b076cc82f959763f/jdk-9.0.4_linux-x64_bin.tar.gz"
tar xzf $JAVA_FILE
rm -rf $JAVA_FILE
cd "/opt/${JAVA_VER}/"
alternatives --install /usr/bin/java java "/opt/${JAVA_VER}/bin/java" 1
alternatives --install /usr/bin/javac javac "/opt/${JAVA_VER}/bin/javac" 1
@alexellis
alexellis / boostrap_faas_arm.md
Last active June 21, 2019 12:55
FaaS serverless framework bootstrap for Raspberry Pi

FaaS serverless framework bootstrap for Raspberry Pi

This bootstraps FaaS onto your Raspberry Pi or ARM board with Docker.

Any Linux/UNIX process can be made a serverless function. Communication with functions is via an API gateway with an easy to use UI portal.

https://github.com/alexellis/faas

Here's the one-shot equivalent from the TestDrive guide