From f28fbc42dd845ace0ae187bbe802c715e13a7e4c Mon Sep 17 00:00:00 2001 From: imnyang Date: Sat, 7 Jun 2025 17:32:36 +0900 Subject: [PATCH] =?UTF-8?q?README.md=20=ED=8C=8C=EC=9D=BC=20=EC=97=85?= =?UTF-8?q?=EB=8D=B0=EC=9D=B4=ED=8A=B8:=20=EA=B8=B0=EC=97=AC=20=EB=B0=A9?= =?UTF-8?q?=EB=B2=95=20=EB=B0=8F=20=EC=98=88=EC=A0=9C=20=EC=BD=94=EB=93=9C?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ba08865..ce0f841 100644 --- a/README.md +++ b/README.md @@ -16,4 +16,45 @@ venv와 패키지가 설치가 됩니다. uv run main.py ``` -이러면 http(s)://localhost:11080로 서버가 열리게 됩니다. \ No newline at end of file +이러면 http(s)://localhost:11080로 서버가 열리게 됩니다. + +# 기여 방법 + +`./addon/init.py` +```py +from example_check import Example + +class LoggerAddon: + def __init__(self): + self.checker = Example() + + def request(self, flow: http.HTTPFlow): # 비동기가 필요할 경우 async def로 할 것 + self.checker.test(flow) + def response(self, flow: http.HTTPFlow): # 비동기가 필요할 경우 async def로 할 것 + self.checker.test(flow) + +``` + +`./addon/example.py` +```py +import lib.target as target +from lib.report import save_report + +class Example: + async def test(self, flow): + req = flow.request + method = req.method + url = req.pretty_url + + # data/report.csv에 저장 + report_data = [{ + 'target': target.load(), + 'status': "CRITICAL", + 'title': "PKCE Downgrade Vulnerability", + 'description': "PKCE downgrade vulnerability detected! Both URLs returned authorization code.", + 'uri': f"Original: {url}\nDowngraded: {downgraded_url}" + }] + save_report(report_data) +``` + +이러한 예제를 참고하여 작성하여주세요. \ No newline at end of file