How to generate local SDP on Python without - websocket

I'm creating an application with Python to simulate a WebRTC client a/v connection. I'm at the stage where i need to generate the local client's SDP to send to the remote server. I've done some searches on the internet and most of the results points to using java script. Is there a way to do this on Python without Java scripting?

You might want to give aiortc a try, it is a Python WebRTC implementation.

Related

JMETER Record a scenario that contains calls using microsoft remote desktop protocol and check 3 party tool activity and come back to application?

My scenario is given as below :
I login into application and upload a doc file then request send to server where thrid party tool (doc to pdf)is running and convert doc file to pdf and send file conversion status pass\fail on application. Can i Record scenarion in JMETER that access microsoft remote desktop protocol and check third party tool activity and come back to application?
Thanks,
Raman
If you want to "record" the RDP protocol the answer is "no", JMeter's HTTP(S) Test Script Recorder can only record HTTP or HTTPS protocols, other traffic will not be recognized.
If you want to take some screenshots of the remote Windows machine you can use i.e. JavaRDP library from JSR223 Test Elements
If you need to read the conversion log and add it to JMeter test results it might make more sense to consider connecting to the machine using PowerShell Remoting from the OS Process Sampler.
Check out How to Run External Commands and Programs Locally and Remotely from JMeter article for more information on the concept and example configurations.

Xterm.js and websockets

I have a c++ server that use libssh to create a Linux shell. I send Linux commands from a javascript client application in a browser for example 'ls' or 'pwd' ecc ecc. to the c++ server by websockets, then I write the command in the libssh buffer followed by /n and a thread get the replay. I write the replay in a Json structure and by websockets again send it to the web client. Then I show the replay in a textarea and if the replay is plain ascii all is ok. Obviously replays to commands like nano doesn't work. So I would like javascript terminal emulators like Xterm. But every example connect it to socket.io or node.pty. I tried to use directly write but nothing is showed. How it's possible to connect Xterm.js to websockets or visualize a generic string?
xterm.js provides an 'addOn' that makes connecting to a websocket very easy. There is a very simplified example on this page that can help get you started, I believe.
https://xtermjs.org/docs/api/addons/attach/

what decides ftp download and stream?

While trying to setup an streaming server with my raspberry pi, the instructions seem to contain just installing an ftp server.
This made me wonder, what decides whether a file stored in the ftp server to be downloaded or streamed?
In other words, is the choice of downloading or streaming dependent on the client side and not the server side?
If using FTP, streaming is implemented client side using the REST command (for Start Position), as explained at How does a FTP server resume a download? and (in more detail) at http://cr.yp.to/ftp/retr.html .
Your server therefore needs to allow the REST verb (most do by default). Throttling (flow control) is also managed client side.
Long story:
This mechanism is similar to the strategy used by HTTP too. Streaming, however, is a wide subject. and there are other approaches to streaming. Some protocols provide extra verbs to signal other events like changes of bandwidth/resolution to account for unstable connections (like videoconference / desktop share protocols). Some are more suitable for live broadcasting and others for buffered/stored video.
Nowadays, most Streaming Players like YouTube are web based and built on top of the HTTP protocol. Streaming is achieved using the HTTP RANGE Header and by dividing the media in chunks that can be retrieved separately, as explained in this magnific video: https://www.youtube.com/watch?v=OqQk7kLuaK4 .

Real-time HTTP stream writing console

Is there a program available that will allow me to interactively write HTTP stream data and send it to a server? Ideally I'm looking for a console app that will allow me to type or paste HTTP headers and body, send it to my server, and get the response headers and body back.
Does such a program already exist?
I'm running W7 64-bit with .NET 4.0.
if you change your mind and want a GUI app
http://code.google.com/p/rest-client/
or you can also use fiddler
Edit:
http://code.google.com/p/rest-client/ also supports commandline
Maybe telnet is an option for you? If it's not already installed on your machine, take a look at this guide from MS.
To connect to your server use it like this:
telnet www.myserver.de 80
After the connection is established, you can paste your HTTP GET reqests or what ever you like.
tinyget is a useful MSFT tool that will make simple get requests. You can store these requests in text files and stream them in.

How do I monitor what commands my ftp application is sending to a ftp server

F
Is there a way to monitor the FTP port so that I can know what commands my FTP application is sending to a FTP server?
I am using a closed-source FTP client application, which is not working with a closed-source FTP application server. The client and the server are not communicating well with each other, and I would like to find out why. I wish to reverse-engineer the client to see what commends the client are sending to the sever. I used a web test tool before that allowed me to monitor the content transferring through HTTP, but I can't seem to find such tool for FTP. I appreciate it if you can help me out, thanks.
Sounds like you need a packet sniffer - assuming your network admins/company policy allows it...I have used wireshark fairly successfully before.
The core FTP commands should be visible in the packets.
You can use the Wireshark application: http://www.wireshark.org/
It should have decent parsing capabilities for FTP as well as other protocols.
Can you configure a proxy with the client? Then you could install an ftp proxy server using the logging on that to see what's going on?
There's a proxy server for Linux here: http://frox.sourceforge.net/doc/FAQ.html
Paul.
Do you have access to ftp-server logs? Its likely those commands would be logged there.
If they aren't, your next option would be to configure the server to log them, if you have access.
If thats not an option or server does not log such things, then you have to go to either packet sniffer or a proxy, as suggested by previous posters.
On Unix, tcpdump might be your friend. Maybe you should first state which OS you're targeting, though.
If you have the ability (often requiring root access) to use a packet sniffer, tcpflow sniffing the TCP control channel will show you the commands and responses going back and forth in an easy-to-read format.
If you don't have such access, tools such as ktrace and strace will allow you to see all data read and written on the socket for this connection, though it will be a little work to extract it.
If you could tell us just what tool you were using for HTTP traffic, that would allow us to look for something similar for FTP traffic.

Resources