update black

This commit is contained in:
Grey_D
2023-03-17 15:16:20 +08:00
parent 9d53f7d479
commit 0d928517a1
12 changed files with 102 additions and 45 deletions

View File

@@ -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()