Skip to content

pr0xy-8L4d3/MyPwnedData

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Screenshot at 2022-04-13 23-00-58
This is my version of Have I been pwned web app written in Go. App is searching for pwned passwords stored in mysql, and is working very very fast. For example it can find data in database of 3 billions records, just in milliseconds.

So, first you need to create your own database and table in mysql.

CREATE DATABASE data;
CREATE TABLE pwned (idproducts INT(6) AUTO_INCREMENT PRIMARY KEY, email VARCHAR(100) NOT NULL, password VARCHAR(100) NOT NULL);

and add some data...

INSERT INTO pwned (email, password) VALUES ('joe@example.com', 'password');

Do not forget to change mysql username and password in main.go file.

db, err = sql.Open("mysql", "root:password@tcp(localhost:3306)/data")

Run the program and enjoy :)

sudo go run main.go

The program is running on port 8080, and of course you can change it.

In case of bigger quantity of data I recommend you to create index in database:

ALTER TABLE pwned ADD INDEX (email);

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published