Files
Pennyw0rth-NetExec/setup/setup_database.py
T
byt3bl33d3r 10a12a9a0f Initial v3.0 commit to master
Quick re-cap on the new features:

* Credentials and hosts are now stored in a database, the cme_db.py script can be used to query it
* Module system has been implemented allowing anyone to create payloads
* All underlying powershell code has been ported to a module
* The HTTP/HTTPS server now tracks connections: no more guessing when to CTRL-C
* All around better code quality, error handling and logging
2016-03-27 15:17:18 -06:00

31 lines
616 B
Python
Executable File

import sqlite3
conn = sqlite3.connect('../data/cme.db')
c = conn.cursor()
# try to prevent some of the weird sqlite I/O errors
c.execute('PRAGMA journal_mode = OFF')
c.execute('''CREATE TABLE "hosts" (
"id" integer PRIMARY KEY,
"ip" text,
"hostname" text,
"domain" test,
"os" text
)''')
# type = hash, plaintext
c.execute('''CREATE TABLE "credentials" (
"id" integer PRIMARY KEY,
"credtype" text,
"domain" text,
"username" text,
"password" text
)''')
# commit the changes and close everything off
conn.commit()
conn.close()
print "[*] Database setup completed!"