코드 스니펫
🔍
재사용 가능한 코드 조각들을 저장하고 관리합니다.
bash
상세 보기
iproxy 연결
#!/bin/bash
# 대박폰 연결
UDID="00008101-0002359E3E38001E"
LOCAL_PORT=2221
DEVICE_PORT=22
iproxy $LOCAL_PORT $DEVICE_PORT -u $UDID &
echo "iproxy started on port $LOCAL_PORT"
python
상세 보기
SSH 명령 실행
import subprocess
def ssh_exec(host, command, user="hacker"):
"""SSH로 원격 명령 실행"""
cmd = f"ssh {user}@{host} \"{command}\""
result = subprocess.run(cmd, shell=True, capture_output=True, text=True)
return result.stdout, result.stderr