Skip to content

Instantly share code, notes, and snippets.

View maslowivan's full-sized avatar
:electron:
Focusing

Ivan Maslow | JavaScript & Web Performance Enthusiast maslowivan

:electron:
Focusing
View GitHub Profile
@maslowivan
maslowivan / mongo_db_recover_delete_record-2.4.py
Created August 4, 2017 10:15 — forked from guss77/mongo_db_recover_delete_record-2.4.py
Try to recover deleted documents from a mongodb 2.4 data file. Based on https://gist.github.com/egguy/2788955 with help from https://yazadk.wordpress.com/2015/07/15/a-forensic-perspective-on-recovering-deleted-data-from-big-data-systems/#MongoDB . Make sure to change `decode_chunk` so it properly detects the objects you are trying to recover - i…
#!/usr/bin/python
"""A little script to recover deleted recording of a mongoDB db file
There's no optimization but it work and has saved me
"""
import struct
import bson
import pymongo
.idea
*.pyc
.DS_Store