From the course: Ethical Hacking: Hacking Web Servers and Web Applications

Unlock the full course today

Join today to access over 24,900 courses taught by industry experts.

Web access APIs

Web access APIs

- [Instructor] Many organizations now deploy web-based micro services to get or send information across the web. These work by accessing a webpage with URL parameters. One of the tools for building such services is CherryPy. We'll be using another library, which we can use for one-time password multifactor authentication, called PyOTP. Multifactor authentication is an important means of defeating unauthorized access to our web applications. Let's see how we can build an API on Hydra using CherryPy. Firstly, we install the CherryPy and PyOTP frameworks using pip. I already have them installed, but let's run the commands anyway. Pip three, install CherryPy. And pip three install PyOTP. Okay, we can now build our API. I've used the PyOTP demonstrator, so let's check it out. Nano OTP.Py. We import the libraries and then define an API called check within the OTP class. We've just defined one API endpoint, but we could…

Contents