mirror of
https://github.com/weyne85/PentestGPT.git
synced 2025-10-29 16:58:59 +00:00
update black
This commit is contained in:
@@ -21,11 +21,14 @@ Are you clear about it?
|
||||
keyword = "vulnerability detected!!!"
|
||||
prefix = "The output from terminal is :\n"
|
||||
|
||||
|
||||
class sqlmapHandler(chatGPTTemplate):
|
||||
# should override the run function
|
||||
def run(self):
|
||||
self.initialize()
|
||||
response = self.ask("Now please start, the website is: http://testphp.vulnweb.com/listproducts.php?cat=1")
|
||||
response = self.ask(
|
||||
"Now please start, the website is: http://testphp.vulnweb.com/listproducts.php?cat=1"
|
||||
)
|
||||
while True:
|
||||
# get the response from the bot
|
||||
# if the keyword is detected, break the loop
|
||||
@@ -47,11 +50,12 @@ class sqlmapHandler(chatGPTTemplate):
|
||||
# feed the output to the bot
|
||||
response = self.ask(output, need_prefix=True)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
#1. init the bot session
|
||||
# 1. init the bot session
|
||||
bot = ChatGPT()
|
||||
chat_handler = sqlmapHandler(bot, init_script=init_script)
|
||||
chat_handler._update_prefix(prefix)
|
||||
|
||||
#2. run the chat
|
||||
# 2. run the chat
|
||||
chat_handler.run()
|
||||
|
||||
Reference in New Issue
Block a user