citronneur / rdpy

Remote Desktop Protocol in Twisted Python
GNU General Public License v3.0
1.67k stars 545 forks source link

RDP Screenshot Error #75

Closed amar-myana closed 6 years ago

amar-myana commented 6 years ago

Hi,

rdpy-rdpscreenshot.py is not taking the screenshot.

Example:

Here the rdp port on ip ( 216.157.16.132 ) is open

└─▪ nmap -sV --version-intensity -sC -sT 216.157.16.132

Starting Nmap 7.01 ( https://nmap.org ) at 2018-07-16 15:59 IST
Nmap scan report for 216.157.16.132
Host is up (0.23s latency).
Not shown: 991 filtered ports
PORT      STATE SERVICE            VERSION
21/tcp    open  ftp                Microsoft ftpd
25/tcp    open  smtp               Microsoft ESMTP 7.5.7601.17514
80/tcp    open  http               Microsoft IIS httpd 7.5
135/tcp   open  msrpc              Microsoft Windows RPC
139/tcp   open  netbios-ssn        Microsoft Windows 98 netbios-ssn
445/tcp   open  microsoft-ds       Microsoft Windows Server 2008 R2 microsoft-ds
2179/tcp  open  vmrdp?
3389/tcp  open  ssl/ms-wbt-server?
49154/tcp open  unknown
Service Info: Host: PrimusHost; OSs: Windows, Windows 98, Windows Server 2008 R2; CPE: cpe:/o:microsoft:windows, cpe:/o:microsoft:windows_98, cpe:/o:microsoft:windows_server_2008:r2

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 30.25 seconds

Even telnet is able to connect

└─▪ telnet 216.157.16.132 3389
Trying 216.157.16.132...
Connected to 216.157.16.132.
Escape character is '^]'.

but when I tried the handy rdpy-rdpscreenshot.py the following error is coming

└─▪ rdpy-rdpscreenshot.py 192.168.52.150
rdpy-rdpscreenshot.py: cannot connect to X server

I tried for different open RDP IPs but none of them worked.

Can anyone guide me how can I proceed with this.

Thanks!

amar-myana commented 6 years ago

Sorry, it just clicked I was executing it on ubuntu server, so using xvfb-run --auto-servernum --server-args='-screen 0, 1280x1024x24' it works!

Thanks!