0w0

[primalsecurity] 0x4 – Python to EXE 본문

Primalsecurity/Primalsecurity_Python-tutorials

[primalsecurity] 0x4 – Python to EXE

0w0 2019. 12. 23. 06:46
728x90
반응형

Generating Python Executables with PyInstaller ( PyInstaller를 사용한 파이썬 실행 파일 생성 )

 

파이썬 스크립트를 PyInstaller 모듈을 사용해서 실행 파일로 만들수 있음

pyinstaller 패키지 설치(pip install pyinstaller)

 

테스트 코드 생성 및 컴파일

 

1
2
3
4
5
6
import datetime
 
if __name__ == "__main__" :
 
    now = datetime.datetime.now()
    print(now)

 

출력

2019-12-23 06:34:00.360133

 

해당 파일 경로에서 pyinstaller 명령 수행

 

명령:

>pyinstaller --onefile [파일.py]

 

 

 

dist 폴더 안에 .exe 파일이 생성되었음을 확인 할 수 있음

 

 

리버스 쉘 등 다양한 악성 코드를 .exe 실행 파일로 제작 할 수 있음

728x90
반응형
Comments