Merge RAG usecase into HackerBuddy#111
Conversation
|
Thank you for your update... this looks good already. Could you also link your README.md from the project's mein readme.md? If you want to, you can also add documentation to docs.hackingbuddy (separate repository). |
There was a problem hiding this comment.
Copilot reviewed 16 out of 18 changed files in this pull request and generated 3 comments.
Files not reviewed (2)
- .env.example: Language not supported
- src/hackingBuddyGPT/usecases/rag/rag_storage/.gitignore: Language not supported
Comments suppressed due to low confidence (1)
src/hackingBuddyGPT/utils/openai/openai_llm.py:67
- The exception message is missing a closing parenthesis. Consider updating it to: raise Exception(f"Error from OpenAI Gateway ({response.status_code})")
raise Exception(f"Error from OpenAI Gateway ({response.status_code}")
| print("Received 408 Status Code, trying again.") | ||
| return self.get_response(prompt, azure_retry = azure_retry + 1) | ||
| else: | ||
| raise Exception(f"Error from Gateway ({response.status_code}") |
There was a problem hiding this comment.
The exception message is missing a closing parenthesis. Consider updating it to: raise Exception(f"Error from Gateway ({response.status_code})")
| raise Exception(f"Error from Gateway ({response.status_code}") | |
| raise Exception(f"Error from Gateway ({response.status_code})") |
| This usecase is an extension of `usecase/privesc`. | ||
|
|
||
| ## Setup | ||
| ### Depdendencies |
There was a problem hiding this comment.
The word 'Depdendencies' is misspelled. It should be corrected to 'Dependencies'.
| ### Depdendencies | |
| ### Dependencies |
| The code for the vector store setup can be found in `rag_utility.py`. Currently the vectore store uses two sources: `GTFObins` and `hacktricks`. To use RAG, download the markdown files and place them in `rag_storage/GTFObinMarkdownfiles` (`rag_storage/hacktricksMarkdownFiles`). You can download the markdown files either from the respective github repository ([GTFObin](https://github.com/GTFOBins/GTFOBins.github.io/tree/master), [hacktricks](https://github.com/HackTricks-wiki/hacktricks/tree/master/src/linux-hardening/privilege-escalation)) or scrape them from their website ([GTFObin](https://gtfobins.github.io/), [hacktricks](https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html)). | ||
|
|
There was a problem hiding this comment.
The word 'vectore' is misspelled. It should be corrected to 'vector'.
| The code for the vector store setup can be found in `rag_utility.py`. Currently the vectore store uses two sources: `GTFObins` and `hacktricks`. To use RAG, download the markdown files and place them in `rag_storage/GTFObinMarkdownfiles` (`rag_storage/hacktricksMarkdownFiles`). You can download the markdown files either from the respective github repository ([GTFObin](https://github.com/GTFOBins/GTFOBins.github.io/tree/master), [hacktricks](https://github.com/HackTricks-wiki/hacktricks/tree/master/src/linux-hardening/privilege-escalation)) or scrape them from their website ([GTFObin](https://gtfobins.github.io/), [hacktricks](https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html)). | |
| The code for the vector store setup can be found in `rag_utility.py`. Currently the vector store uses two sources: `GTFObins` and `hacktricks`. To use RAG, download the markdown files and place them in `rag_storage/GTFObinMarkdownfiles` (`rag_storage/hacktricksMarkdownFiles`). You can download the markdown files either from the respective github repository ([GTFObin](https://github.com/GTFOBins/GTFOBins.github.io/tree/master), [hacktricks](https://github.com/HackTricks-wiki/hacktricks/tree/master/src/linux-hardening/privilege-escalation)) or scrape them from their website ([GTFObin](https://gtfobins.github.io/), [hacktricks](https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html)). |
Added usecase
rag. The base architecture is the same asPrivesc, but it has several optional extensions:query_next_commandprompt.query_next_commandprompt.