Skip to content

Commit cafd173

Browse files
committed
Add small changes
1 parent 2b30053 commit cafd173

File tree

5 files changed

+42
-20
lines changed

5 files changed

+42
-20
lines changed

EventTranscriptParser.py

Lines changed: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -176,56 +176,70 @@ def PnPDeviceParse(f):
176176
return pnp_device_dict
177177

178178

179-
180179
if __name__=="__main__":
181180

182181
event_transcript_parser=argparse.ArgumentParser(
183182
description='''EventTranscript.db parser by Abhiram Kumar.''',
184183
epilog= '''For any queries, please reach out to me via Twitter - @_abhiramkumar''')
185184

186185
event_transcript_parser.add_argument('-f','--file', required=True, help="Please specify the path to EventTranscript.db")
186+
event_transcript_parser.add_argument('-o','--output-dir', required=True, help="Please specify the output directory")
187187

188188
parser, empty_list = event_transcript_parser.parse_known_args()
189189

190+
191+
print("""\033[1;97m _____ _ _____ _ _ ____
192+
| ____|_ _____ _ __ | |_ |_ _| __ __ _ _ __ ___ ___ _ __(_)_ __ | |_ | _ \ __ _ _ __ ___ ___ _ __
193+
| _| \ \ / / _ \ '_ \| __| | || '__/ _` | '_ \/ __|/ __| '__| | '_ \| __| | |_) / _` | '__/ __|/ _ \ '__|
194+
| |___ \ V / __/ | | | |_ | || | | (_| | | | \__ \ (__| | | | |_) | |_ | __/ (_| | | \__ \ __/ |
195+
|_____| \_/ \___|_| |_|\__| |_||_| \__,_|_| |_|___/\___|_| |_| .__/ \__| |_| \__,_|_| |___/\___|_|
196+
|_| \033[0m\n""")
197+
198+
print("Author: Abhiram Kumar (Twitter: @_abhiramkumar)\nGithub: https://github.com/stuxnet999/EventTranscriptParser\n")
199+
print("-"*50)
200+
190201
if os.path.exists(parser.file):
202+
if not os.path.isdir(parser.output_dir):
203+
os.makedirs(parser.output_dir)
204+
191205
BrowsingHistory = BrowserHistoryParse(parser.file)
192206
df = pd.DataFrame(BrowsingHistory)
193-
outfile = "BrowserHistory.csv"
207+
outfile = os.path.join(parser.output_dir, "BrowserHistory.csv")
194208
df.to_csv(outfile, index=False)
195-
print ("Output written to " + outfile)
209+
print ("Output written to " + os.path.abspath(outfile))
196210

197211
software_inventory = SoftwareInventory(parser.file)
198212
df = pd.DataFrame(software_inventory)
199-
outfile = "SoftwareInventory.csv"
213+
outfile = os.path.join(parser.output_dir, "SoftwareInventory.csv")
200214
df.to_csv(outfile, index=False)
201-
print ("Output written to " + outfile)
215+
print ("Output written to " + os.path.abspath(outfile))
202216

203217
WlanScan = WlanScanResults(parser.file)
204218
df = pd.DataFrame(WlanScan)
205-
outfile = "WlanScan.csv"
219+
outfile = os.path.join(parser.output_dir, "WlanScan.csv")
206220
df.to_csv(outfile, index=False)
207-
print ("Output written to " + outfile)
221+
print ("Output written to " + os.path.abspath(outfile))
208222

209223
pnp_device = PnPDeviceParse(parser.file)
210224
df = pd.DataFrame(pnp_device)
211-
outfile = "PnpDeviceInstall.csv"
225+
outfile = os.path.join(parser.output_dir, "PnpDeviceInstall.csv")
212226
df.to_csv(outfile, index=False)
213-
print ("Output written to " + outfile)
227+
print ("Output written to " + os.path.abspath(outfile))
214228

215229
wificonnectedevents = WiFiConnectedEvents(parser.file)
216230
df = pd.DataFrame(wificonnectedevents)
217-
outfile = "WiFiConnectedEvents.csv"
231+
outfile = os.path.join(parser.output_dir, "WiFiConnectedEvents.csv")
218232
df.to_csv(outfile, index=False)
219-
print ("Output written to " + outfile)
233+
print ("Output written to " + os.path.abspath(outfile))
220234

221-
outfile = "UserDefaults.txt"
222-
userdefaults = UserDefault(os.path.abspath(parser.file), outfile)
223-
print("Output written to "+ outfile)
235+
outfile = os.path.join(parser.output_dir, "UserDefaults.txt")
236+
userdefaults = UserDefault(parser.file, outfile)
237+
print ("Output written to " + os.path.abspath(outfile))
224238
userdefaults.close()
225239

226-
outfile = "PhysicalDiskInfo.txt"
240+
outfile = os.path.join(parser.output_dir, "PhysicalDiskInfo.txt")
227241
physical_disk_info = PhysicalDiskInfo(parser.file, outfile)
228-
print("Output written to "+ outfile)
242+
print ("Output written to " + os.path.abspath(outfile))
229243
physical_disk_info.close()
230244

231245
else:

README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# EventTranscriptParser
1+
![logo](./img/logo.png)
2+
3+
### About
24

35
**EventTranscriptParser** is python based tool to extract forensically useful details from EventTranscript.db (Windows Diagnostic Database).
46

@@ -20,7 +22,7 @@ Python 3.8 or above. The older versions of Python 3.x should work fine as well.
2022

2123
#### Dependencies
2224

23-
These are the required libraries/modules needed to run the script
25+
These are the required python libraries/modules needed to run the script
2426
+ json
2527
+ sqlite3
2628
+ pandas
@@ -32,12 +34,18 @@ These are the required libraries/modules needed to run the script
3234
The tool is completely CLI based.
3335

3436
```python
35-
python EventTranscriptParser.py -f <Path-To-EventTranscript.db>
37+
python EventTranscriptParser.py -f <Path-To-EventTranscript.db> -o <Path-To-Output-Directory>
3638
```
39+
![usage](./img/usage.png)
3740

3841
**Tip**: Before running the tool against the database, make sure that the **-wal (Write Ahead Log)** file data is merged with the original database. Because you might miss out on crucial/juicy data.
3942

40-
![usage](./img/usage.png)
43+
To view help,
44+
```
45+
python EventTranscriptParser.py -h
46+
```
47+
48+
![help](./img/help.png)
4149

4250
### Acknowledgements
4351

img/help.png

24.4 KB
Loading

img/logo.png

183 KB
Loading

img/usage.png

-60 KB
Loading

0 commit comments

Comments
 (0)