본문 바로가기

Code/Python

python, echo 16진수 입력


-----------------------------------------------

리눅스

 

argv의 경우

./실행파일명 `python -c 'print "문자열"'`

echo -e 'test' | ./file

python -c 'test

(echo -e 'test'; cat) | ./file

 

(scanf, get 의 경우)

python -c "print 'test'" | test.exe

python -c "for i in range(100): print 'test'" | test2.exe

 

\xFF와 같이 입력

 

*netcat으로 넘길경우..

(python -c 'print "데이터"') | nc 주소 포트