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
from ryu.base import app_manager | |
from ryu.controller import ofp_event | |
from ryu.controller.handler import MAIN_DISPATCHER, CONFIG_DISPATCHER | |
from ryu.controller.handler import set_ev_cls | |
from ryu.ofproto import ofproto_v1_3 | |
class Hub(app_manager.RyuApp): | |
OFP_VERSIONS = [ ofproto_v1_3.OFP_VERSION ] | |
@set_ev_cls(ofp_event.EventOFPSwitchFeatures , CONFIG_DISPATCHER) |
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 requests | |
import string | |
from multiprocessing import Pool, shared_memory | |
URL = 'http://localhost/index.php' | |
MAX_LEN = 100 | |
POOL_SIZE = 32 | |
password_memory = shared_memory.SharedMemory(create=True, size=MAX_LEN) |
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 requests | |
import string | |
from threading import Thread | |
URL = 'http://localhost/index.php' | |
MAX_LEN = 1000 | |
password = '' | |
found_for_location = False |
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 requests | |
URL = 'http://localhost/index.php' | |
MAX_LEN = 1000 | |
def exploit(): | |
password = '' | |
charset = string.printable | |
for start in range(1, MAX_LEN): |
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 unittest | |
import os | |
from check_pk_and_py import microservice | |
class TestPokeOnlyDown(unittest.TestCase): | |
def setUp(self): | |
os.system('cp /etc/hosts /etc/hosts.orig') | |
os.system('echo "127.0.0.1\tpokeapi.co" >> /etc/hosts') | |
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 requests | |
from flask import Flask | |
app = Flask(__name__) | |
@app.route("/<input_string>") | |
def microservice(input_string): | |
pypi_endpoint = "https://pypi.org/simple/{module_name}" | |
poke_api_endpoint = "https://pokeapi.co/api/v2/pokemon/{pokemon}" | |
response = dict( |
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
subnet 192.168.1.0 netmask 255.255.255.0 { | |
range 192.168.1.150 192.168.1.160; | |
option routers 192.168.1.1; | |
option domain-name-servers 192.168.1.1; | |
option domain-name "example.org"; | |
} |
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
FROM ubuntu | |
RUN apt-get update && apt-get install -y vim net-tools isc-dhcp-server |
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
# .... | |
AuthorizedKeysFile .ssh/authorized_keys | |
# ... | |
PasswordAuthentication yes | |
# ... | |
AllowTcpForwarding yes | |
GatewayPorts no | |
X11Forwarding no |
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
FROM linuxserver/openssh-server | |
ADD sshd_config /etc/ssh/sshd_config |
NewerOlder