mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 08:11:00 +00:00
17 lines
389 B
Python
17 lines
389 B
Python
|
#!/usr/bin/env python3
|
||
|
import fileinput
|
||
|
import sys
|
||
|
|
||
|
if __name__ == "__main__":
|
||
|
if len(sys.argv) < 3:
|
||
|
print(f"Usage: {sys.argv[0]} port filenames")
|
||
|
sys.exit()
|
||
|
|
||
|
port = sys.argv[1]
|
||
|
matches = False
|
||
|
for line in fileinput.input(sys.argv[2:]):
|
||
|
if line.startswith("["):
|
||
|
matches = port in line
|
||
|
if matches:
|
||
|
print(line, end="")
|