곡무(Linux) β μ무PC(Windows 192.168.0.50) ν΅ν© μ격 μ μ΄. SSH λ Έν¬ β WOL κΉ¨μ°κΈ° β Flask Agent β ν ν° μΈμ¦ β 35+ μλν¬μΈνΈ.
hermes_seomu_2026 β νμ¬ 25802580λ‘ λ³κ²½λ¨ (2026-06-27). μ΄μ ν ν° μ¬μ© μ 403 Forbidden λ°νλ¨.
ssh -o ConnectTimeout=5 seomu "echo OK"
| μλ΅ | μν | λ€μ |
|---|---|---|
OK | β κΉ¨μ΄μμ | β 3λ¨κ³ |
Connection refused | β S3 μ μ | β 2λ¨κ³ (WOL) |
timeout | β λ€νΈμν¬ λλ μ μ | β 2λ¨κ³ (WOL) |
from wakeonlan import send_magic_packet
send_magic_packet('9C:6B:00:0B:3B:C2')
μ μ/μ μ μ€μ (κ· νν νλ, 2026-06-27 14:23 KST μ€μΈ‘):
| λ¨κ³ | μμ | λμ |
|---|---|---|
| ν면보νΈκΈ° | 30λΆ (ScreenSaveTimeOut=1800) | ν면보νΈκΈ° νμ (ScreenSaveActive=1, μ κΈ μμ) |
| νλ©΄ λκΈ° | 30λΆ (VIDEOIDLE=0x00000708) | λͺ¨λν°λ§ κΊΌμ§ |
| S3 μ μ | 40λΆ (STANDBYIDLE=0x00000960) | SSH/Agent μ μ λΆκ° |
| μ΅λμ μ | λΉνμ± (HIBERNATEIDLE=0) | WOL μν₯ μμ |
| νμ΄λΈλ¦¬λ μ μ | νμ± (HYBRIDSLEEP=1) | S3 + hibernation image λμ |
GET http://192.168.0.50:5000/?token=25802580 β "Windows Kakao Agent v2 (monitor support)"
Agent μ£½μ΄μμΌλ©΄ Session 1μμ μ¬μ€ν:
ssh -o ConnectTimeout=10 seomu "schtasks /run /tn hermes_agent" sleep 8 # Agent λΆν λκΈ°
tasklist /fi "PID eq 20944" /v /fo list β Session#: 1νμ¬ ν ν°: 25802580 (2026-06-27 λ³κ²½)
νΈμΆ ν¨ν΄ (query string):
import urllib.request url = "http://192.168.0.50:5000/windows?token=25802580" req = urllib.request.Request(url) resp = urllib.request.urlopen(req, timeout=5).read().decode()
νΈμΆ ν¨ν΄ (Bearer header):
import urllib.request, json
TOKEN = "25802580"
req = urllib.request.Request("http://192.168.0.50:5000/exec",
data=json.dumps({"cmd": "powershell -Command 'Get-Date'"}).encode(),
headers={"Authorization": f"Bearer {TOKEN}", "Content-Type": "application/json"},
method="POST")
urllib.request.urlopen(req, timeout=35).read()
***λ‘ μλ λ§μ€νΉλ¨. Python one-linerμ μ§μ μ½μ
ν΄μΌ λμ. export TOKEN=... ν $TOKEN μ°Έμ‘° μ λΉ λ¬Έμμ΄λ‘ μΉνλμ΄ 401/403 λ°ν.
import ctypes, time
user32 = ctypes.windll.user32
EXCEL_HWND = 1247082 # μ€μ PID/PowerShellμμ νμΈ
SWP_SHOWWINDOW = 0x0040
SWP_NOZORDER = 0x0004
# β
κ²μ¦λ ν¨ν΄ (1λ² λͺ¨λν° λ΄λΆ μ’ν λͺ
μ)
user32.SetWindowPos(EXCEL_HWND, 0, 100, 100, 1700, 1000,
SWP_SHOWWINDOW | SWP_NOZORDER)
time.sleep(0.5)
user32.ShowWindow(EXCEL_HWND, 3) # SW_MAXIMIZE
import win32com.client, pythoncom
pythoncom.CoInitialize()
try:
excel = win32com.client.Dispatch("Excel.Application")
excel.Visible = True
wb = excel.Workbooks.Open(r"C:\Users\lee\Desktop\hermes_test.xlsx")
ws = wb.Worksheets(1)
# λ³ν© ν΄μ ν μ΄κΈ°ν
ws.UsedRange.UnMerge()
ws.Cells.Clear()
while ws.Shapes.Count > 0:
ws.Shapes(1).Delete()
# μ
μ
λ ₯
ws.Range("A1").Value = "ν
μ€νΈ"
# λν (λ³)
cell = ws.Range("E5")
shape = ws.Shapes.AddShape(12, cell.Left, cell.Top, cell.Width, cell.Height)
shape.Fill.ForeColor.RGB = 65535 # λ
Έλμ
shape.TextFrame.Characters().Text = "λ³"
wb.Save()
finally:
pythoncom.CoUninitialize()
import xlsxwriter
wb = xlsxwriter.Workbook(r"E:\OneDrive\Telegram\report.xlsx")
# β οΈ xlsxwriterλ hex λ¬Έμμ΄ μμλ§!
def _hex(n):
return "#{:06X}".format(n & 0xFFFFFF)
fmt_title = wb.add_format({
"bold": True, "font_size": 18,
"bg_color": _hex(4474445), # μ§ν μ²λ‘
"font_color": "#FFFFFF",
"align": "center", "valign": "vcenter",
})
ws = wb.add_worksheet("κ°μ")
ws.merge_range("B2:D2", "ποΈ λ³΄κ³ μ μ λͺ©", fmt_title)
wb.close()
.click() β μΊλμ μ체 λ²νΌ 무μSetWindowPos μ’ν μ΄λ β 무μλ¨# demo.scr _-LAYER N MyLayer C 7 S MyLayer _-LINE 0,0 100,0 100,100 0,100 0,0 _-QSAVE
κ·μΉ: _ = μμ΄ λͺ
λ Ή κ°μ , - = CLI λͺ¨λ (λ€μ΄μΌλ‘κ·Έ ννΌ)
| λμ | λ¨μΆν€ |
|---|---|
| μ νμΌ | Alt+N λλ Alt+O |
| μ μ₯ | Ctrl+S |
| λ€λ₯Έ μ΄λ¦ μ μ₯ | Ctrl+Shift+S |
| μΈμ | Ctrl+P |
| μ€ν μ·¨μ | Ctrl+Z |
| νμΌ λ©λ΄ | Alt+F |
| λ«κΈ° | Alt+F4 |
ssh seomu 'powershell -NoProfile -Command "Get-Date"'
import urllib.request, json, base64
TOKEN = "25802580"
cmd = '"C:/Users/lee/AppData/Local/Programs/Python/Python312/python.exe" "C:/path/script.py" > "C:/path/out.txt" 2>&1'
req = urllib.request.Request("http://192.168.0.50:5000/exec",
data=json.dumps({"cmd": cmd, "timeout": 60}).encode(),
headers={"Authorization": f"Bearer {TOKEN}", "Content-Type": "application/json"},
method="POST")
urllib.request.urlopen(req, timeout=65).read()
| κ²½λ‘ | μν |
|---|---|
C:\Python312\python.exe | β μμ |
C:\Python311\python.exe | β μμ |
C:\Users\lee\AppData\Local\Programs\Python\Python312\python.exe | β μ μΌν νμ± |
| μΈμ | win32com (Excel) | GUI μ μ΄ | SendKeys |
|---|---|---|---|
| Session 0 (Services) | β WebView2 κΆν μ€λ₯ | β Session 1 μ°½ μ κ·Ό λΆκ° | β Session 1 μ°½ λλ¬ λΆκ° |
| Session 1 (Console) | β μ μ | β μ μ | β μ μ |
AGENT_PID=$(curl -s "http://192.168.0.50:5000/sysinfo?token=25802580" | python3 -c "import json,sys; print(json.load(sys.stdin)['pid'])") ssh -o ConnectTimeout=10 seomu "tasklist /fi \"PID eq $AGENT_PID\" /v /fo list | findstr \"Session#:\"" # Session#: 1 β μ μ # Session#: 0 β μ¬μ€ν νμ:
ssh seomu "taskkill /f /im python.exe" ssh seomu "schtasks /run /tn hermes_agent" sleep 8
| μν | μ€ν¬ | μν |
|---|---|---|
| β ν΅ν© μ (4κ°) | seomu-agent-httpseomu-excel-controlseomu-wol-wakecross-platform-delegation |
λΆμ° κ΄λ¦¬, νΈμΆ μ 4κ° skill_view νμ, λ©λͺ¨λ¦¬ μ€λ³΅ |
| β ν΅ν© ν (1κ°) | seomu-remote-connect |
λ¨μΌ umbrella μ€ν¬, "μ무PC" ν€μλλ‘ μλ κ°λ, λ©λͺ¨λ¦¬ μ μ½ |
# SSH μ μ νμΈ ssh -o ConnectTimeout=5 seomu "echo OK" # Python νλ‘μΈμ€ + μΈμ νμΈ ssh seomu 'tasklist /fi "imagename eq python.exe" /v /fo list' # Flask Agent μν curl -s "http://192.168.0.50:5000/sysinfo?token=25802580" | python3 -m json.tool # νμ± μλμ° λͺ©λ‘ curl -s "http://192.168.0.50:5000/windows?token=25802580" | python3 -m json.tool | head -50 # quser (μ¬μ©μ λ‘κ·ΈμΈ νμΈ) ssh seomu 'quser' # ν면보νΈκΈ° μν ssh seomu 'powershell -NoProfile -Command "Get-ItemProperty -Path ''HKCU:\Control Panel\Desktop'' | Select ScreenSaveActive, ScreenSaverIsSecure"' # μ μ μ€μ ssh seomu 'powercfg /getactivescheme'
| νλͺ© | κ° |
|---|---|
| νΈμ€νΈ | DESKTOP-2DTT7CO |
| MAC | 9C:6B:00:0B:3B:C2 |
| IP | 192.168.0.50 |
| SSH μ¬μ©μ | lee |
| SSH alias | seomu |
| Flask Agent | http://192.168.0.50:5000 |
| ν ν° | 25802580 (2026-06-27 λ³κ²½) |
| Python | C:\Users\lee\AppData\Local\Programs\Python\Python312\python.exe |
| μμ΄μ νΈ ν΄λ | C:\Users\lee\hermes_kakao\ |
| Flask Agent μμ€ | C:\Users\lee\hermes_kakao\agent.py |
| μμ ν΄λ | C:\Users\lee\AppData\Local\Temp\ |