Skip to content

Instantly share code, notes, and snippets.

View chmodx's full-sized avatar
🪲
Hack today to save the future

Ali Huseyn Aliyev chmodx

🪲
Hack today to save the future
View GitHub Profile
@chmodx
chmodx / wall.sh
Last active January 27, 2017 13:33
iptables rules (bash script)
#!/bin/bash
echo "@b4ut4 | Writing firewall rules..."
IPT="/sbin/iptables"
echo "0" > /proc/sys/net/ipv4/ip_forward
echo "1" > /proc/sys/net/ipv4/tcp_syncookies
@chmodx
chmodx / dockerGUI
Last active September 12, 2023 08:51
Using GUI's with Docker
docker pull kalilinux/kali-linux-docker
# Available metapackages for Kali Linux (apt-get update && apt-cache search kali-linux)
# To see the list of tools included in a metapackage (apt-cache show kali-linux-web |grep Depends)
xhost +local:`docker inspect --format='{{ .Config.Hostname }}' $containerId`
docker run -ti --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v /home/bauta/Downloads:/bt kalilinux maltego
@chmodx
chmodx / mysqlSrvDocker
Created February 8, 2016 14:54
simple way for installation mySql server in a docker container
mkdir -p /storage/mysql/datadir
docker pull mysql/mysql-server
docker run --name mysql-master-container -p 6603:3306 -v /storage/mysql/datadir:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=toor -d mysql/mysql-server
awk -vDate=`date --date="$(date +%b) $(date +%d) $(date +%Y) 8:00" +[%d/%b/%Y:%H:%M:%S` -vDate2=`date --date="$(date +%b) $(date +%d) $(date +%Y) 10:00" +[%d/%b/%Y:%H:%M:%S` '$4 > Date && $4 < Date2 && ($9 ~ /502/) {printf "Time: %s, Response: %d, Size: %d, Request: %s\n",$4,$9,$10,$7}' access.log
@chmodx
chmodx / xss
Last active August 19, 2016 14:50
alert("hi");
#!/bin/sh
### BEGIN INIT INFO
# Provides: fuelwebsocket
# Required-Start: $local_fs $network $named $time $syslog
# Required-Stop: $local_fs $network $named $time $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: Script like as zver
### END INIT INFO
# reload config file
bind r source-file ~/.tmux.conf \; display "Config Reloaded!"
# tmux display things in 256 colors
set -g default-terminal "screen-256color"
set -g status-utf8 on
set-option -g allow-rename off
# copy & paste shortcuts
set-window-option -g mode-keys vi
set -g mouse on
@chmodx
chmodx / simple_server
Created November 27, 2022 23:45
Python3 simple SSL server. In order to generate private key and certificate file use letsencrypt or something similar
from http.server import HTTPServer, SimpleHTTPRequestHandler
import ssl, os
import json, logging
class HTTPSHandler(SimpleHTTPRequestHandler):
def _set_headers(self):
self.send_response(200)
self.send_header('Content-type', 'application/json')