Discovering the Power of ChatGPT: My Experiences and Insights | by Shubham Bhamare | Feb, 2023

Hi guys, It’s Shubham Bhamare again. Today’s Medium story is quite different as it’s not a bug bounty write-up. It’s about ChatGPT. Since its launch, I have been playing with it and thought I should write a story to share my experiences with it.

For those who still don’t know, ChatGPT (Chat Generative Pre-trained Transformer) is a chatbot developed by OpenAI that uses the GPT-3 language model to generate responses to user input. It can be used for a variety of purposes, such as having casual conversations, answering questions, generating creative content for websites and social media, solving coding challenges, generating useful automation scripts, getting suggestions on various things, and so on.

When I first heard about ChatGPT, I was immediately intrigued by its capabilities. I started experimenting with it by having casual conversations with it and asking it various questions. I was really impressed by how well it was able to respond to my queries and carry on a conversation. It was almost like talking to a real person, except that the responses were generated by a machine.

Below are the things that I have tried with it so far 👇

Things I tried first:

When I heard about ChatGPT, I thought it is a virtual assistant just like Amazon Alexa, Apple’s Siri, and Google Assistant so the very first thing that I asked it was 👇 (Don’t laugh please🤭)

And it gave me the following results respectively 👇

Okay, now I got to know that it can’t access the internet and can only provide results based on internet data available till the year 2021. TBH, at that time I thought that it’s a useless thing as it can’t provide real-time results, and other services are far better than this. So I didn’t use it for the next few days even after hearing the news that it crossed 1M+ users in just 5 days. 🤯

Later I saw some Tweets and LinkedIn posts where people had generated some cool results with ChatGPT such as a python script to generate XSS payloads, python scripts to automate various tasks, creative content for websites and social media, creative tagline suggestions for businesses, and so on. So I thought to use it that way and it was time when I fall in love with ChatGPT and realized why many people are talking about it.

You can’t love the product until you fully understand how to use it.

— Shubham Bhamare 😇

I tried it from a security researcher’s perspective:

After understanding what things ChatGPT can do, the very first thing that came to my mind is to generate some useful python scripts so I asked ChatGPT 👇

And ta-da! I was really impressed by the result it gave 🤩👇

import re
import subprocess
import csv

def find_subdomains(url):
# Use the 'dig' command to find the subdomains of the given URL
output = subprocess.check_output(["dig", "NS", url]).decode("utf-8")
# Extract the subdomains from the output of the 'dig' command
subdomains = re.findall(r"\b[\w.-]+%s\b" % url, output)
return subdomains

def main():
# Get the URL from the user
url = input("Enter a URL: ")
# Add the appropriate protocol if the user hasn't already included it
if not url.startswith("http://") and not url.startswith("https://"):
url = "http://" + url
# Find the subdomains of the URL
subdomains = find_subdomains(url)
# Print the subdomains
print("Subdomains:")
for subdomain in subdomains:
print(subdomain)
# Ask the user if they want to export the subdomains to a CSV file
export = input("Export subdomains to CSV file? (y/n) ")
if export.lower() == "y":
# Get the filename from the user
filename = input("Enter a filename: ")
# Add the .csv extension if it's not already there
if not filename.endswith(".csv"):
filename += ".csv"
# Write the subdomains to the CSV file
with open(filename, "w", newline="") as csvfile:
writer = csv.writer(csvfile)
writer.writerow(["Subdomain"])
for subdomain in subdomains:
writer.writerow([subdomain])
print("Subdomains exported to %s" % filename)

if __name__ == "__main__":
main()

Another impressive thing was it not only gave me the python code but also explained how it actually works.

Okay, we should not ignore that warning given at the bottom too. (So these results are for educational purposes only. 😬)

Later, I tried many different things like 👇

  1. Python program for port scanning
  2. Python program for XSS payload generator
  3. Python program to find XSS vulnerabilities
  4. Python program to find SQLi vulnerabilities
  5. Writing a bug bounty PoC (Yeah, ChatGPT can write bug bounty PoC too. But you’ll have to give some details of your finding and I don’t think it’s a good idea)
  6. And this was EPIC… 😅👇

I tried it from a developer’s perspective:

I asked ChatGPT 👇

import 'package:flutter/material.dart';

class HomeScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.transparent,
elevation: 0,
leading: IconButton(
icon: Icon(Icons.menu),
onPressed: () {},
),
actions: <Widget>[
IconButton(
icon: Icon(Icons.search),
onPressed: () {},
),
],
),
body: Container(
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Colors.red,
Colors.pink,
],
),
),
child: Column(
children: <Widget>[
Container(
height: 100,
width: double.infinity,
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Colors.red,
Colors.pink,
],
),
),
child: Padding(
padding: EdgeInsets.all(20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
"FlutDate",
style: TextStyle(
color: Colors.white,
fontSize: 32,
fontWeight: FontWeight.bold,
fontFamily: "Poppins",
),
),
SizedBox(
height: 10,
),
Text(
"Find your match",
style: TextStyle(
color: Colors.white,
fontSize: 18,
fontWeight: FontWeight.bold,
fontFamily: "Poppins",
),
),
],
),
),
),
Expanded(
child: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(40),
topRight: Radius.circular(40),
),
),
child: SingleChildScrollView(
child: Padding(
padding: EdgeInsets.all(40),
child: Column(
children: <Widget>[
Container(
height: 300,
child: ListView(
scrollDirection: Axis.horizontal,
children: <Widget>[
Container(
width: 200,
decoration: BoxDecoration(
image: DecorationImage(
image: NetworkImage(
"https://via.placeholder.com/200x300",
),
fit: BoxFit.cover,
),
borderRadius: Border
Radius.circular(20),
),
margin: EdgeInsets.only(right: 20),
),
Container(
width: 200,
decoration: BoxDecoration(
image: DecorationImage(
image: NetworkImage(
"https://via.placeholder.com/200x300",
),
fit: BoxFit.cover,
),
borderRadius: BorderRadius.circular(20),
),
margin: EdgeInsets.only(right: 20),
),
Container(
width: 200,
decoration: BoxDecoration(
image: DecorationImage(
image: NetworkImage(
"https://via.placeholder.com/200x300",
),
fit: BoxFit.cover,
),
borderRadius: BorderRadius.circular(20),
),
margin: EdgeInsets.only(right: 20),
),
],
),
),
SizedBox(
height: 20,
),
Container(
height: 50,
child: ListView(
scrollDirection: Axis.horizontal,
children: <Widget>[
Container(
width: 100,
decoration: BoxDecoration(
color: Colors.red,
borderRadius: BorderRadius.circular(20),
),
margin: EdgeInsets.only(right: 20),
child: Center(
child: Text(
"Home",
style: TextStyle(
color: Colors.white,
fontSize: 18,
fontWeight: FontWeight.bold,
fontFamily: "Poppins",
),
),
),
),
Container(
width: 100,
decoration: BoxDecoration(
color: Colors.pink,
borderRadius: BorderRadius.circular(20),
),
margin: EdgeInsets.only(right: 20),
child: Center(
child: Text(
"Date",
style: TextStyle(
color: Colors.white,
fontSize: 18,
fontWeight: FontWeight.bold,
fontFamily: "Poppins",
),
),
),
),
Container(
width: 100,
decoration: BoxDecoration(
color: Colors.pink,
borderRadius: BorderRadius.circular(20),
),
margin: EdgeInsets.only(right: 20),
child: Center(
child: Text(
"Chat",
style: TextStyle(
color: Colors.white,
fontSize: 18,
fontWeight: FontWeight.bold,
fontFamily: "Poppins",
),
),
),
),
Container(
width: 100,
decoration: BoxDecoration(
color: Colors.pink,
borderRadius: BorderRadius.circular(20),
),
margin: EdgeInsets.only(right: 20),
child: Center(
child: Text(
"Profile",
style: TextStyle(
color: Colors.white,
fontSize: 18,
fontWeight: FontWeight.bold,
fontFamily: "Poppins",
),
),
),
),
],
),
),
],
),
),
),
],
),
),
],
),
),
);
}

In this example, I have generated Dart code but you can try it with any programming language with your own prompts.

administrator

Leave a Reply

Your email address will not be published. Required fields are marked *

fb logo
recover dogecoin from a scam
recover ethereum from a scammer
hire a hacker to hack iphone
hire a hacker to hack snapchat
hire a hacker to hack a windows computer
error: Content is protected !!