how to import Breaches into MongoDB
by blackboar - Sunday February 25, 2024 at 02:30 AM
#1
I feel most people could benefit how to import Breaches into MongoDB with this one single command (Assuming located in /mnt/data/Pemiblanc_BF/data/ )

% strings * | sed 's/:/,/g'|sed 's/"/DQUOTE/g'|mongoimport -c pemiblanc -d pemiblanc --host myhost --fields email,password --type csv --drop

Why:

- strings => display the file(s) but get rid of binary characters that can hang up "cat"

- sed 's/:/,/g'|sed 's/"/DQUOTE/g' => gets rid of the colon punctuation to be of type CSV

- mongoimport -c pemiblanc -d pemiblanc --host myhost --fields email,password --type csv --drop

Then once in MongoDB
% mongo --host myhost

Opening MongoDB
>> use pemiblanc
>> db.pemiblanc.find()
>> db.pemiblanc.createIndex({email:1})

Now you can query from the MongoDB client OR have ChatGPT/Microsoft Edge write you python/perl code to query every collection you have
Reply
#2
thanks appreciate it
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How To Bypass Selfie Verification HackingRealm 2,283 138,815 4 minutes ago
Last Post: Capta1n
  [FREE METHOD] FREE CHATGPT PREMIUM FOR 1 YEAR itskilim 57 1,979 45 minutes ago
Last Post: sdddddddd
  WiFi Hacking for beginners (E-Book) WHOISTHAT 83 3,872 53 minutes ago
Last Post: ronbau1735
  Search Exploits mobSc4W785 22 907 1 hour ago
Last Post: ronbau1735
  GMAIL Generator – Make Unlimited Reusable Emails in Seconds! ✅ Easy & HQ Site Jaded 22 485 1 hour ago
Last Post: ronbau1735

Forum Jump:


 Users browsing this forum: 1 Guest(s)