Last active
November 10, 2023 19:08
-
-
Save RKursatV/67068b9be9691b0ac870b4bb93e5f8c7 to your computer and use it in GitHub Desktop.
Angell
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
#!/usr/bin/env python3 | |
from http.server import BaseHTTPRequestHandler, HTTPServer | |
import logging | |
class S(BaseHTTPRequestHandler): | |
def do_GET(self): | |
logging.info("GET request,\nPath: %s\nHeaders:\n%s\n", str(self.path), str(self.headers)) | |
self.send_response(200) | |
self.send_header('Content-type', 'text/html') | |
self.end_headers() | |
self.wfile.write("OK".encode('utf-8')) | |
def run(server_class=HTTPServer, handler_class=S, port=1337): | |
logging.basicConfig(level=logging.INFO) | |
server_address = ('', port) | |
httpd = server_class(server_address, handler_class) | |
logging.info('Starting Angel...\n') | |
try: | |
httpd.serve_forever() | |
except KeyboardInterrupt: | |
pass | |
httpd.server_close() | |
logging.info('Stopping Angel...\n') | |
if __name__ == '__main__': | |
run() |
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
#!/bin/bash | |
hostname inek31 | |
iptables -t nat -A OUTPUT -p tcp -d 144.122.71.142 --dport 15214 -j DNAT --to-destination 127.0.0.1:1337 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment