__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
#!/usr/bin/python
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
from bcc import BPF
from pyroute2 import IPRoute
ipr = IPRoute()
text = """
int hello(struct __sk_buff *skb) {
return 1;
}
"""
try:
b = BPF(text=text, debug=0)
fn = b.load_func("hello", BPF.SCHED_CLS)
ipr.link("add", ifname="t1a", kind="veth", peer="t1b")
idx = ipr.link_lookup(ifname="t1a")[0]
ipr.tc("add", "ingress", idx, "ffff:")
ipr.tc("add-filter", "bpf", idx, ":1", fd=fn.fd,
name=fn.name, parent="ffff:", action="ok", classid=1)
ipr.tc("add", "sfq", idx, "1:")
ipr.tc("add-filter", "bpf", idx, ":1", fd=fn.fd,
name=fn.name, parent="1:", action="ok", classid=1)
finally:
if "idx" in locals(): ipr.link("del", index=idx)
print("BPF tc functionality - SCHED_CLS: OK")
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| distributed_bridge | Folder | 0755 |
|
|
| http_filter | Folder | 0755 |
|
|
| neighbor_sharing | Folder | 0755 |
|
|
| tunnel_monitor | Folder | 0755 |
|
|
| vlan_learning | Folder | 0755 |
|
|
| xdp | Folder | 0755 |
|
|
| net_monitor.py | File | 3.74 KB | 0755 |
|
| simple_tc.py | File | 852 B | 0755 |
|
| simulation.py | File | 5.13 KB | 0644 |
|
| sockmap.py | File | 3.47 KB | 0755 |
|
| tc_perf_event.py | File | 2.52 KB | 0755 |
|