views:

865

answers:

1

I want to create a web application similar to TS Web Access, where I can create rdp files on the fly for Remote Apps configured on the server. Any idea??

A: 

well Having looked at a 'rdp' file this is the contents:

screen mode id:i:2
desktopwidth:i:1280
desktopheight:i:768
session bpp:i:32
winposstr:s:2,3,1430,104,2230,704
compression:i:1
keyboardhook:i:2
displayconnectionbar:i:1
disable wallpaper:i:1
disable full window drag:i:1
allow desktop composition:i:0
allow font smoothing:i:0
disable menu anims:i:1
disable themes:i:0
disable cursor setting:i:0
bitmapcachepersistenable:i:1
full address:s: [YOUR IP]
audiomode:i:0
redirectprinters:i:1
redirectcomports:i:0
redirectsmartcards:i:1
redirectclipboard:i:1
redirectposdevices:i:0
autoreconnection enabled:i:1
authentication level:i:0
prompt for credentials:i:0
negotiate security layer:i:1
remoteapplicationmode:i:0
alternate shell:s:
shell working directory:s:
gatewayhostname:s:
gatewayusagemethod:i:4
gatewaycredentialssource:i:4
gatewayprofileusagemethod:i:0
promptcredentialonce:i:1
drivestoredirect:s:

Just create that as a string, seems straightforward.

ps I have no idea what the 'winposstr' parameter is...

Darknight
this is perfectly fine, but my remoteapps are digitally signed with a certificate, which adds 2 additional parameters in my rdp file:1. signscope:s2. signature:sHow can I create values for these parameters, these are using SHA1 hash...???
Gaurav Arya
I don't know whats going on with these certs. can't you create a valid 'remote application' RDP and then copy that sig? or is the sig different each time?
Darknight
Signature is same everytime, but i hv to open diff. app on diff buttons, and signature depends on the remote app program name, so i hv to change the signature on the fly. Sample rdp file content:
Gaurav Arya
span monitors:i:1prompt for credentials on client:i:1remoteapplicationmode:i:1server port:i:3389allow font smoothing:i:1promptcredentialonce:i:1authentication level:i:0gatewayusagemethod:i:2gatewayprofileusagemethod:i:0gatewaycredentialssource:i:0full address:s:LUTRONTS1alternate shell:s:||TSClient_TS2remoteapplicationprogram:s:||TSClient_TS2gatewayhostname:s:remoteapplicationname:s:TSClient_TS2remoteapplicationcmdline:s:
Gaurav Arya
signscope:s:Full Address,Server Port,GatewayHostname,GatewayUsageMethod,GatewayProfileUsageMethod,GatewayCredentialsSource,PromptCredentialOnce,Alternate Shell,RemoteApplicationProgram,RemoteApplicationMode,RemoteApplicationName,RemoteApplicationCmdLine,Authentication Level,RedirectDrives,RedirectPrinters,RedirectCOMPorts,RedirectSmartCards,RedirectPOSDevices,RedirectClipboard,DevicesToRedirect,DrivesToRedirect
Gaurav Arya
signature:s:AQABAAEAAACVBAAAMIIEkQYJKoZIhvcNAQcCoIIEgjCCBH4CAQExCzAJBgUrDgMC GgUAMAsGCSqGSIb3DQEHAaCCAvowggL2MIIB3qADAgECAhCMel1Y/5YAjUXCeMhU Fzi8MA0GCSqGSIb3DQEBBQUAMCQxIjAgBgNVBAMTGWx1dHJvbnRzMS5nZ24ubmFn YXJyby5jb20wHhcNMDkxMTE5MDc0NTIyWhcNMTAxMTE4MDAwMDAwWjAkMSIwIAYD VQQDExlsdXRyb250czEuZ2duLm5hZ2Fycm8uY29tMIIBIjANBgkqhkiG9w0BAQEF AAOCAQ8AMIIBCgKCAQEAn+ExkAWD10vOi0TDOyZl9XGuh6Q7qSKVTzaumgUx1S88 H3KS8wLgO6eWThGKaFzLhPhO98G6RRbtxcdcSjeP+3RSQPNA8chbYZ5I3zhPQ8J3 D1d7fvdgWodL+ltvrnTMr0cxZWGR5xtCljwqcKhoUDHnPJQiU9g2WGhs7PqmPOFA
Gaurav Arya
QtFrHUo1hrHyawYWfqekNhVnWtyI0xxnM3rpnwile6LWJAPGPYolHc/qTV9NaLwq 7c3a4NfshM24UN7WUo/0I4pnHbwjjyUHWxCDOQPO5nRGGmVdFh2Jwn5F+P82qLUE TvT2vJJ0tRn/TEMXZEEMOztBEONN9QtKhaRI+2HJdwIDAQABoyQwIjALBgNVHQ8E BAMCBDAwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDQYJKoZIhvcNAQEFBQADggEBAEDj cor3tOY/4JnwNuQxOWbdV2yIW/gITWsJXpkM6X+0XcFTKHtPjmthGphwxAniiw7D rgpBokzh/8tRNMIZD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