Skip to content

Instantly share code, notes, and snippets.

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

OK omarkurt

:octocat:
Working from home
View GitHub Profile
@s4l1h
s4l1h / php-fcgi.sh
Created March 11, 2012 11:54
FAST CGI
#!/bin/bash
#BIND=127.0.0.1:9000
BIND=/tmp/php.socket
USER=www-data
ulimit -v 512000
PHP_FCGI_CHILDREN=15
PHP_FCGI_MAX_REQUESTS=50000
PHP_CGI=/usr/bin/php-cgi
PHP_CGI_NAME=`basename $PHP_CGI`
@s4l1h
s4l1h / nginx-ram.sh
Created March 13, 2012 11:12
Nginx'in ne kadar ram kullandığı gösterir.
#/bin/sh
total=0; for i in `ps -C nginx -o rss=`; do total=$(($total+$i)); done; echo "Nginx memory usage: $total kb";
@s4l1h
s4l1h / php-cgi-ram.sh
Created March 13, 2012 11:10
php-cgi'nin ne kadar ram kullandığı gösterir.
#/bin/sh
total=0; for i in `ps -C php-cgi -o rss=`; do total=$(($total+$i)); done; echo "php-cgi memory usage: $total kb";
@s4l1h
s4l1h / online.sh
Created December 20, 2012 16:17
Sunucuda 80 portuna yapılan istek sayısı ve ip adreslerini görüntüler.
#/bin/sh
netstat -plan|grep :80|awk {'print $5'}|cut -d: -f 1|sort|uniq -c|sort -nk 1
@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
@aricih
aricih / Colorized Slack.user.js
Last active April 17, 2018 07:12
Colorized Slack Threads and more
// ==UserScript==
// @name Colorized Slack
// @namespace https://www.netsparker.com/
// @version 1.4.1
// @description Colorizes the message threads.
// @author Hakan Arıcı
// @include *.slack.com*
// ==/UserScript==
(function() {
@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
#!/bin/bash
chromium-browser --headless --disable-gpu --window-size=1920,1080 --screenshot http://$1 --screenshot=$RANDOM.jpg >/dev/null 2>&1
echo "[*] Screenshot Taken of http://$1 [*]"
@nuryslyrt
nuryslyrt / cloud_metadata.txt
Created July 2, 2018 12:48 — forked from BuffaloWill/cloud_metadata.txt
Cloud Metadata Dictionary useful for SSRF Testing
## 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/user-data
http://169.254.169.254/latest/user-data/iam/security-credentials/[ROLE NAME]
http://169.254.169.254/latest/meta-data/iam/security-credentials/[ROLE NAME]
http://169.254.169.254/latest/meta-data/ami-id
http://169.254.169.254/latest/meta-data/reservation-id
http://169.254.169.254/latest/meta-data/hostname
http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key
@random-robbie
random-robbie / bookmarks.html
Last active April 1, 2019 11:39
Private Bookmarks
https://medium.com/handy-tech/analysis-of-a-kubernetes-hack-backdooring-through-kubelet-823be5c3d67c
https://www.cidrcalculator.com/asn/asn-to-prefix.html?lang=en
https://itnext.io/aks-kubernetes-security-walk-through-challenge-2-dbe3ed16beec
https://www.digitalinterruption.com/single-post/2018/06/04/Are-Your-Cookies-Telling-Your-Fortune
https://blog.innerht.ml/