Skip to content

Instantly share code, notes, and snippets.

View 0x1881's full-sized avatar
🎯
Focusing

Mehmet Can ÜSTÜL 0x1881

🎯
Focusing
View GitHub Profile
@egyjs
egyjs / Direct Link of YouTube videos.md
Last active November 11, 2024 10:13
PHP API To get Direct Link of YouTube videos
@VirtuBox
VirtuBox / nginx-geoip-module.md
Last active January 24, 2024 08:44
How to configure GeoIP module for Nginx

Create a folder to store the databases :

mkdir -p /usr/share/GeoIP

Download Country IP database

wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
gunzip GeoIP.dat.gz
@kopiro
kopiro / tor_exit_nodes.md
Last active October 20, 2022 13:30
ProTip: Specify country exit nodes

With TOR, you can specify the country of exit nodes to test a particular website from a specific country.

Just add these 4 lines in the torrc file.

ExitNodes {jp}
StrictNodes 1
GeoIPExcludeUnknown 1
AllowSingleHopCircuits 0
@wzed
wzed / guzzle_pool_example.php
Created February 8, 2017 08:57
GuzzleHttp\Pool example: identifying responses to concurrent async requests
<?php
/*
* Using a key => value pair with the yield keyword is
* the cleanest method I could find to add identifiers or tags
* to asynchronous concurrent requests in Guzzle,
* so you can identify which response is from which request!
*/
$client = new GuzzleHttp\Client(['base_uri' => 'http://httpbin.org']);
#Hooking SafetyNet stuff for fun (no profit tho :( )
#Several Functions just uncomment to use or modify :)
#by T31M
import frida
import sys
PACKAGE_NAME = "com.nianticlabs.pokemongo"
process = frida.get_usb_device().attach(PACKAGE_NAME)
@alexeygrigorev
alexeygrigorev / vimeo-download.py
Created September 17, 2016 09:09
Downloading segmented video from vimeo
import requests
import base64
from tqdm import tqdm
master_json_url = 'https://178skyfiregce-a.akamaihd.net/exp=1474107106~acl=%2F142089577%2F%2A~hmac=0d9becc441fc5385462d53bf59cf019c0184690862f49b414e9a2f1c5bafbe0d/142089577/video/426274424,426274425,426274423,426274422/master.json?base64_init=1'
base_url = master_json_url[:master_json_url.rfind('/', 0, -26) + 1]
resp = requests.get(master_json_url)
content = resp.json()
@ddaws
ddaws / AdWordsScriptRunner.js
Last active October 16, 2023 06:37
Executes AdWords scripts across 50+ accounts in parallel and sequentially
// the script will run across all accounts with exactly this label. If you want the script to run
// accross all accounts just remove this all together
var SCRIPT_LABEL = 'Your Script!';
function run() {
// your script goes here
}
// this will execute your script sequentially accounts and is only used for accounts in excess of 50
function executeInSequence(sequentialIds, executeSequentiallyFunc) {
@kremalicious
kremalicious / tor-relay-setup.sh
Last active November 26, 2023 02:59
Set up new server as Tor relay
##
# Ubuntu 16.04 Xenial Xerus
##
######################################
# INITIAL SERVER SETUP & HARDENING
######################################
ssh [email protected]
@Rodrigo54
Rodrigo54 / php-html-css-js-minifier.php
Last active June 29, 2025 14:27 — forked from taufik-nurrohman/php-html-css-js-minifier.php
PHP Function to Minify HTML, CSS and JavaScript
<?php
/**
* -----------------------------------------------------------------------------------------
* Based on `https://github.com/mecha-cms/mecha-cms/blob/master/system/kernel/converter.php`
* -----------------------------------------------------------------------------------------
*/
// HTML Minifier
function minify_html($input) {
@mdpuma
mdpuma / gist:b5a7fdc7f0a052f77732
Last active May 2, 2022 08:03
scan php infections
#!/bin/bash
find ! -perm 000 -type f -name \*.php -print0 | xargs -0 -n2 grep -E "mail\s*\(" |less
find ! -perm 000 -type f -name \*.php -print0 | xargs -0 -n2 grep -E 'eval\(|move_uploaded_file' |less
find ! -perm 000 -type f -name \*.php -print0 | xargs -0 -n2 grep 'eval(stripslashes' |less
find ! -perm 000 -type f -name \*.php -print0 | xargs -0 -n2 grep 'eval($_' |less
find ! -perm 000 -type f -name \*.php -print0 | xargs -0 -n2 grep 'base64_decode(' |less
find ! -perm 000 -type f -name \*.php -print0 | xargs -0 -n2 grep 'base64_encode(gzcompress' |less
find ! -perm 000 -type f -name \*.php -print0 | xargs -0 -n2 grep "\\\x" |less
find ! -perm 000 -type f -name \*.php -print0 | xargs -0 -n2 grep -E "(system|exec)\(" |less