[Release] Simple MySQL Lib Connector for C#

07/17/2019 20:14 12tails#1
Hey guys,

I've done this some time ago (about 2 years i guess), i use it alot until now, works pretty fine (this is an old version and you can implement it as you wish, do not wait for me to support this).

Basically imports the native libmysql.dll functions and use them as done in the old C++ leaked source of TQ Digital.

Some people likes to use NHibernate, i hate it got many failures with it, so i use this instead.

This code is used as an extension to get the field names as they are done in your tables:

You will find a folder named Tables, with samples of the structure to be done.

Here is a sample of a way to use it:

To set the configurations just set the global variables:

Be aware: If you make any, i mean ANYTHING wrong with your SQL command syntax, the source will just close, this is a problem for you to solve :D. So make sure that your SQL commands are allways right.

I guess that's all!

P.S: The LibMySQL.DLL must be at the folder with the .exe, otherwise you'll get errors.
07/17/2019 23:41 Super Aids#2
Nice sql injection examples :D (I really hope you're not using this in production because if anyone with just a tiny bit of sql injection knowledge knows what to do then they could possibly compromise your whole database.)

Also another side note is that you do not encrypt passwords in a database, in fact that has little to no effect. You hash passwords because it's not possible to reverse (in general speaking, there are of course md5 databases etc. - but you can usually get around those too with seeds etc.)
07/18/2019 09:48 KraHen#3
[Only registered and activated users can see links. Click Here To Register...]
07/18/2019 13:12 12tails#4
Quote:
Originally Posted by Super Aids View Post
Nice sql injection examples :D (I really hope you're not using this in production because if anyone with just a tiny bit of sql injection knowledge knows what to do then they could possibly compromise your whole database.)

Also another side note is that you do not encrypt passwords in a database, in fact that has little to no effect. You hash passwords because it's not possible to reverse (in general speaking, there are of course md5 databases etc. - but you can usually get around those too with seeds etc.)
Ah yes, this is an old code, just took it as sample, ignore the password thing...

Also, i've never had a problem with the MySQL injection, works fine and pretty "secure", with many changes made in this old code, of course...

Thanks for feedback tho <3 u guys!
07/18/2019 13:18 Super Aids#5
Quote:
Originally Posted by 12tails View Post
Ah yes, this is an old code, just took it as sample, ignore the password thing...

Also, i've never had a problem with the MySQL injection, works fine and pretty "secure", with many changes made in this old code, of course...

Thanks for feedback tho <3 u guys!
It's not "pretty secure" just because you never had issues with mysql injection.

Plenty of big companies aren't secure but never had that issue either.

This code allows anyone to literally just drop your whole database in an instant, you're not even sanitizing input which means anyone can do anything.

Don't ever write queries directly, use prepared statements.

They're actually easier to use and maintain AND they're secure.
07/18/2019 15:34 Spirited#6
Honestly, there are plenty of other libraries that are secure using parameterization that gets sanitized. I applaud your effort, but this library shouldn't be used in any production scenario. I agree with the rest of the group here.