ChatGPT currently cannot replace a skilled programmer. You'd still need to know what you are doing for any exploit code to be fashionned in a working state. And OpenAI are constantly making adjustments to prevent these type of uses. This generally results in ChatGPT replying that it's not allowed to write that kind of code. (yes, there are ways to partly work around it, but it's something being actively improved on by OpenAI).
A few days ago I tried to get ChatGPT to write me a short perl script that would connect to a remote service and handle some basic functions. Basically a 20-30 lines script. After trying for three hours, I gave up. It kept providing code that flat out wouldn't even run, making use of functions that didn't exist in the specific Perl module I asked it to use for the API. It was like asking a junior programmer to write something, and instead of reading the API documentation, he was trying to blindly guess it.
After the first 5-6 iterations ("It returns errror BLAH@" "My apologies, here is a fixed version"), I cleared my conversation, and generated a new query with all the desired parameters (it must connect using this specific Perl module, using TLS, etc...), including specifying a different, more modern Perl module to handle the API calls. This time, it refused to provide me with a complete script, due to it being potentially harmful (for the records, there was nothing nefarious at all about that script). It would only provide me with portions of the scripts, and generic recommendations.
So I eventually had to give up. If I had been a skilled Perl programmer, I could probably have reused what it provided, and fixed it - but I wasn't.
Bottom line is, ChatGPT isn't a replacement for a skilled, knowledgeable programmer. It's merely a tool, just like StackExchange, to help you.
Wikipedia didn't kill off encyclopedias and libraries...