Link to home
Start Free TrialLog in
Avatar of maurice cristen
maurice cristen

asked on

I need a python coder to help me with this script

I need a python(2.7) coder to help me with this script:  https://pastebin.com/zYLbFwpi  (rdpy-rdpscreenshot.py)
Original site: https://github.com/citronneur/rdpy 
Now i run this .bat: https://pastebin.com/SYHy0EsB  ,everything goes well but the problem is that it stops at line 2 trying and re-trying  to connect endlessly without going to the 3rd line (maybe NLA is activated),anyway all i want is to close & exit and pass to the 3rd line.
THANK YOU!

P.S.
- here a succesull line: https://pastebin.com/XqWpn3RU
- here problem line: https://pastebin.com/daRqSV0Y

i used a small tool to compare the 2 files and the diference is this:
rdpy.core.error.RDPSecurityNegoFail: negotiation failure code 5
[*] INFO:       save screenshot into C:/tmp/24.73.34.125.jpg

Open in new window

Avatar of Louis LIETAER
Louis LIETAER
Flag of France image

you could try to replace this code :
  1.  68             if reason.type == RDPSecurityNegoFail and self._security != "rdp":
  2.  69                 log.info("due to RDPSecurityNegoFail try standard security layer")
  3.  70                 self._security = rdp.SecurityLevel.RDP_LEVEL_RDP
  4.  71                 connector.connect()
  5.  72                 return

by :
  1.  68             if reason.type == RDPSecurityNegoFail and self._security != "rdp":
  2.  69                 log.info("due to RDPSecurityNegoFail try standard security layer")
  3.  70                 self._security = rdp.SecurityLevel.RDP_LEVEL_RDP
  4.  71                 RDPScreenShotFactory.__INSTANCE__ = 0
  5.  72                 self._reactor.stop()
  6.  73                 self._app.exit()

*line numbers should be removed (of course)
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.