From the course: Penetration Testing Essential Training
Unlock the full course today
Join today to access over 24,900 courses taught by industry experts.
Leveraging OpenAI for testing - Linux Tutorial
From the course: Penetration Testing Essential Training
Leveraging OpenAI for testing
- [Instructor] Increasingly, we're hearing about the capabilities of AI to assist us in everything we do. While some of what is reported is hype, we can certainly use AI to assist with our penetration testing, either using the public portals or by querying it programmatically. Let's check how we do this in Python. In order to follow along with this, you'll need to register an account with OpenAI and obtain an API key. There's no charge for this. To use OpenAI, we'll need to install the OpenAI Python Library. We can do that with PIP. Sudo pip3 install openai. We'll now need to write a short Python script to call the library. We'll call it nano myai.py. We import the OpenAI library and the OS library, and we start up OpenAI by sending in our OpenAI key that we were provisioned. We then print out some general information and ask the user what they want the AI to do. We then set up a query for OpenAI, selecting the GPT-3.5 Turbo AI engine, and specifying our role as a university lecturer.…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.