Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
antoninoLorenzo committed Jul 3, 2024
2 parents 8f4456f + 0d454e8 commit a5cacef
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![pylint](https://img.shields.io/badge/PyLint-8.82-yellow?logo=python&logoColor=white)
![pylint](https://img.shields.io/badge/PyLint-8.84-yellow?logo=python&logoColor=white)

# AI-OPS

Expand Down
7 changes: 4 additions & 3 deletions ai-ops-cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def new_session(self):
response.raise_for_status()

self.current_session = {'sid': response.json()['sid'], 'name': session_name}
self.chat()
self.chat(print_name=True)

def save_session(self):
"""Save the current session"""
Expand All @@ -87,7 +87,6 @@ def save_session(self):
self.console.print(f'[!] Failed: {response.status_code}')
else:
self.console.print(f'[+] Saved')
self.chat()

def rename_session(self):
"""Renames the current session"""
Expand All @@ -102,7 +101,7 @@ def rename_session(self):
)
response.raise_for_status()
self.current_session['name'] = session_name
self.chat()
self.chat(print_name=True)

def delete_session(self):
"""Deletes the current session"""
Expand Down Expand Up @@ -199,6 +198,8 @@ def execute_plan(self):
for task_str in resp.iter_content():
if task_str:
self.console.print(task_str.decode(), end='')
print()
self.chat()

def list_plans(self):
"""Retrieve the plans in the current session and
Expand Down
1 change: 1 addition & 0 deletions src/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ def new_session(name: str):
else:
new_id = max(sorted(sessions.keys())) + 1
agent.new_session(new_id)
agent.get_session(new_id).name = name

return {'sid': new_id}

Expand Down
27 changes: 22 additions & 5 deletions tools_settings/hashcat.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,25 @@
{
"name": "",
"tool_description": "",
"name": "hashcat",
"tool_description": "Hashcat is a password cracking tool that is used to crack hashed passwords.",
"args_description": [
"command: \n",
"When using gobuster with a wordlist remember to ALWAYS ask the path to the wordlist to the user."
"command: hashcat -m [hash-type] -a [attack-mode] -o [output-file] [hash-file] [wordlist]\n",
"Arguments:\n",
"- `-m [hash-type]`: Specifies the hash type to be cracked. Common hash types include:\n",
" - 100: SHA1\n",
" - 1400: SHA256\n",
" - 1800: sha512crypt $6$, SHA512 (Unix)\n",
" - 3200: bcrypt $2*$, Blowfish (Unix)\n",
"- `-a [attack-mode]`: Specifies the attack mode to be used. Common attack modes include:\n",
" - 0: Dictionary Attack\n",
" - 1: Combination Attack\n",
" - 3: Brute Force Attack\n",
" - 6: Dictionary + Mask Hybrid Attack\n",
" - 7: Mask + Dictionary Hybrid Attack\n",
"- `-o [output-file]`: Specifies the file where cracked passwords will be saved.\n",
"- `[hash-file]`: Path to the file containing the hashes to be cracked.\n",
"- `[wordlist]`: Path to the wordlist file used for dictionary attacks. Ensure to ask the user for the correct path to the wordlist.\n",
"\nGuidelines:\n",
"- When using hashcat with a wordlist remember to ALWAYS ask the path to the wordlist to the user.\n",
"- When writing the output to a file, the next command should be `cat <output_file>`"
]
}
}

0 comments on commit a5cacef

Please sign in to comment.