Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server > CO2 PServer Guides & Releases
You last visited: Today at 13:54

  • Please register to post and access all features, it's quick, easy and FREE!


[Release] Simple MySQL Lib Connector for C#

Discussion on [Release] Simple MySQL Lib Connector for C# within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Apr 2009
Posts: 754
Received Thanks: 433
[Release] Simple MySQL Lib Connector for C#

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 . 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.
Attached Files
File Type: rar GeniusMySQLCore.rar (62.4 KB, 5 views)
File Type: rar libmysql.rar (614.2 KB, 4 views)



12tails is offline  
Old 07/17/2019, 23:41   #2
 
elite*gold: 0
Join Date: Dec 2012
Posts: 1,719
Received Thanks: 911
Nice sql injection examples (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.)


Super Aids is offline  
Thanks
4 Users
Old 07/18/2019, 09:48   #3
Moderator

 
elite*gold: 0
Join Date: Jul 2006
Posts: 2,055
Received Thanks: 711
KraHen is offline  
Thanks
1 User
Old 07/18/2019, 13:12   #4
 
elite*gold: 0
Join Date: Apr 2009
Posts: 754
Received Thanks: 433
Quote:
Originally Posted by Super Aids View Post
Nice sql injection examples (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!


12tails is offline  
Old 07/18/2019, 13:18   #5
 
elite*gold: 0
Join Date: Dec 2012
Posts: 1,719
Received Thanks: 911
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.
Super Aids is offline  
Thanks
2 Users
Old 07/18/2019, 15:34   #6
 
elite*gold: 12
Join Date: Jul 2011
Posts: 7,323
Received Thanks: 3,565
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.


Spirited is offline  
Reply



« COPS v6 - F.A.Q. & Bug-fixes | Redux V2 Auto Arrow Equip »

Similar Threads
Mysql funktioniert nicht.. service mysql status mysql does not exist in /etc/rc.d
07/09/2015 - Metin2 Private Server - 8 Replies
Hey, mein Mysql Server funktíoniert von jetzt auf gleich nicht mehr.. Kam aus dem Freibad und alles war down.. Wenn ich den Mysql Server starten will sagt er mir: " service mysql status mysql does not exist in /etc/rc.d or the local startup directories (/usr/local/etc/rc.d) " Und wenn ich meinen Metin Server starte "cant connect to 127.0.0.1" weil der Mysql Server down ist..
Problem With MySql's Connector
07/07/2014 - C/C++ - 1 Replies
Hello Guys :) I've a problem with MySql's connector, i download mysql's connector ( MySQL :: Download Connector/C++ ) but there isn't mysql.h and libmysql can you help me? Thanks All
Lib.epk/eix statt /lib Verzeichniss???
04/26/2014 - Metin2 Private Server - 2 Replies
Hallo, meine Frage ist wie man es schafft in der "Binary" einzustellen, das er den Inhalt des "lib" Ordners also die ganzen "pyc" Scripts beispielsweiße aus den "root" epk,eix liest oder halt aus lib.epk /eix. Wäre so etwas möglich? MfG Tom Jessel
MySQL C++ connector Dokumentation
12/03/2013 - C/C++ - 4 Replies
Hi, weiß jemand ob es zu der oben genannten Library eine Dokumentation existiert? Ich habe bereits die komplette MySQL Seite abgesucht, außer ein paar Codeschnipsel finde ich einfach nichts dazu. Für ein Projekt benötige ich einige stabile Datenbankverbindungen (Connectionpool) zu einer MySQL Datenbank. Die Datenbank wird dauernd abgefragt sowie geupdatet. Evtl. kann mir auch jemand eine Alternative anbieten.
MySQL connector i cant install
02/27/2010 - SRO Private Server - 0 Replies
When i try install mysql connector net i cant beouse when install finish i have error ended prematurely becouse of an error Your system has not been modified To install this program at a later time run setup wizard again and i must click only finish -.- sry but im no write in csremu thread becouse to big spam im try install older version mysql connector but that same i cant install who can help me ?



All times are GMT +2. The time now is 13:54.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

BTC: 33E6kMtxYa7dApCFzrS3Jb7U3NrVvo8nsK
ETH: 0xc6ec801B7563A4376751F33b0573308aDa611E05

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2019 elitepvpers All Rights Reserved.