This file contains hidden or 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 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'} | 
  
    
      This file contains hidden or 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
    
  
  
    
  | # 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 | 
OlderNewer