This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
Very simple HTTP server in python for logging requests | |
Usage:: | |
./server.py [<port>] | |
""" | |
from http.server import BaseHTTPRequestHandler, HTTPServer | |
import logging | |
class S(BaseHTTPRequestHandler): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Reset the slugs on a particular post type to use the default sanitized slugs | |
* @param string $post_type filter by post type | |
* @param int $offset set the paginated post to start | |
* @param boolean $force_guid_update * WARNING * never enable this | |
* | |
* @example add the following code into your theme's functions.php file, ensure |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tmux new-session -d -s backend_proj | |
tmux send-keys -t backend_proj:0 'cd ~/Projects/project-name;poetry shell' C-m | |
tmux send-keys -t backend_proj:0 './manage.py runserver' C-m | |
tmux rename-window 'backend_project' | |
tmux split-window -h | |
tmux select-window -t backend_proj:0 | |
tmux send-keys -t backend_proj:0 'cd ~/Projects/another-project-name' C-m | |
tmux send-keys -t backend_proj:0 'yarn start' C-m | |
tmux split-window -v -t 0 | |
tmux send-keys -t backend_proj:0 'cd ~/Projects/projectname/foldername;poetry shell' C-m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from scapy.all import * | |
def make_dns_request(dns_server, domain_name): | |
answer = sr1(IP(dst=dns_server)/UDP(dport=53)/DNS(rd=1,qd=DNSQR(qname=domain_name)),verbose=3) | |
print(answer[DNS].summary()) | |
if __name__=='__main__': | |
make_dns_request(sys.argv[1], sys.argv[2]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import string, random | |
#============ Word List Gen ============ | |
minimum=eval(input('Please enter the minimum length of any give word to be generated: ')) | |
maximum=eval(input('Please enter the maximum length of any give word to be generated: ')) | |
wmaximum=eval(input('Please enter the max number of words to be generate in the dictionary: ')) | |
alphabet = string.ascii_letters[0:52] + string.digits | |
string='' | |
FILE = open("wl.txt","w") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ncat -lk localhost 8080 --sh-exec "ncat www.example.gr 443 --ssl" -vvvv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
B="100K" | |
F="ogg" | |
ssh <remote_host> ffmpeg -b $B -an -f video4linux2 \ | |
-s 320x240 -r 10 -i /dev/video0 -b $B -f $F - \ | |
| vlc - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# YOUR LOCAL BOX | |
socat -t0 -T0 tcp4-listen:6667,reuseaddr,fork UDP:localhost:4445 | |
ssh user@remote_server -N -R 6667:localhost:6667 | |
# REMOTE MACHINE | |
socat -t0 -T0 udp4-recvfrom:4445,reuseaddr,fork tcp:localhost:6667 |