hhh_start_process.py 570 B

123456789101112131415161718192021222324
  1. import rpyc
  2. import os
  3. # RDP HOME
  4. conn = rpyc.classic.connect("192.168.192.58",18812)
  5. conn.execute('import os')
  6. conn.execute('import subprocess')
  7. conn.execute('import psutil')
  8. rsubprocess=conn.modules.subprocess
  9. rpsutil=conn.modules.psutil
  10. #processlist=list()
  11. for process in rpsutil.process_iter():
  12. try:
  13. print(process.name())
  14. print(process.exe())
  15. print(process.username())
  16. except:
  17. print('except')
  18. # print(process)
  19. #rsubprocess.Popen(['python', 'C:/gitlab/kw_tools/hhh/SEO/local_1777.py'],cwd=r'C:\gitlab\kw_tools\hhh\SEO')