WebSockets

Maybe the most radical addition in HTML5 is the introduction of WebSockets as a persistent bidirectional communication between the client and server over the HTTP protocol, which is a stateless protocol.

As mentioned in Chapter 1, Introduction to Penetration Testing and Web Applications, WebSockets communication starts with the handshake between client and server. In the code shown in the following screenshot, taken from Damn Vulnerable Web Sockets (https://github.com/snoopysecurity/dvws), you can see a basic JavaScript implementation of WebSockets:

This code starts a WebSockets connection as soon as the HTML document is loaded. ...

Get Web Penetration Testing with Kali Linux - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.