Parse sql to csv
by - Thursday, January 1, 1970 at 12:00 AM
Hi, got a lot sql dump from breached.co ; how do you guys export it to easy to read csv.

thx
Reply
Hey,

You could use a script like this possibly depending on the dump format: https://pastebin.com/sK3K3JzY (Only works well for dumps that are extended inserts, won't work well for dumps that are 1 insert a line i.e. if the dump was made using mysqldump --extended-insert=FALSE)

(Modified ver of this, https://github.com/yashsmehta/mysqldump-to-csv )

It's not the best and there's probably more options out there

https://pompur.in
Reply
awesome ! would try this, thanks mate
Reply
For fast usage, open in a text editor like em, and delete sections you donot need and turn data into csv/tsv and save
Reply
rg and awk -F come in very handy
Reply
I like to convert it to sqlite and use sqlitebrowser to view the data or run queries. You can also export individual tables as CSV (cleanly).
=> you probably only care about the username/password tables
=> but you might want to do joins and make giant CSV (how is your SQL skills?)

https://github.com/dumblob/mysql2sqlite
Dark & Unclean
Reply
Just use a linux pipe chain with a clever usage of grep/awk ... it will be easy to control it and test it incrementally.
Reply
You should load it in first in sql management studio and then export it to csv.
Reply
if u are new to sql or bash install mariadb. U can upload your sql file, explore it using the sql statements and then output everything to CSV file with INTO OUTFILE
Reply
Most SQL's have comma spacing in them, if you find whatever table you want in the file, load up the sql in sublime or something, copy the table contents to another text file, save it as csv, load it up in excel or some sort of excel style program and remove all the columns you dont want.

Its long winded, but it uses common apps and freeware and doesn't require huge knowledge or need to learn the ropes of new software.
\"History is never fated to repeat, it just rhymes from time to time\"
Reply


 Users viewing this thread: Parse sql to csv: No users currently viewing.