Skip to content

dbogunia/anonymizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple go program for smart anonymizing database

Requires list of columns in file tables.txt

Example file attached

To run program put this line in terminal:

linux: sh ./start.sh "username:password@protocol(address)/dbname"

windows: go run main.go "username:password@protocol(address)/dbname"

Or simply use included Dockerfile

Currently it supports only MySQL DB


Changing from updates on DB to generating SQL file

Comment lines from 101 to 110

add code for appengind updateQuery string to file:

f, err := os.OpenFile("output.sql", os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)

if err != nil {

log.Println(err)

}

defer f.Close()

if _, err := f.WriteString(updateQuery + ";\n"); err != nil {

log.Println(err)

}

WARNING: THIS PIECE OF CODE WAS NOT TESTED - PLEASE TEST BEFORE USING IN REAL LIFE SCENARIO!!!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published