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
  OPEN UK BANK ACCOUNTS AND PHISH BUSINESS EMAILS 1926 301 14,704 28 minutes ago
Last Post: unconcided
  Free iptv sources autoupdated CrimsonLust 260 8,233 36 minutes ago
Last Post: vps24ZE3212
  Forums and Telegrams channels Databases leak sites j4c1nt0 3,110 194,179 3 hours ago
Last Post: sikisgen31
  Google Dorking - Advanced Guide pokerface 742 39,938 4 hours ago
Last Post: narchyy23
  HOW TO GET ANYONES INFORMATION NotInfinity 701 20,541 4 hours ago
Last Post: T1nt1n

Forum Jump:


 Users browsing this forum: 1 Guest(s)