![]() |
|
[.NET] How to safely let users connect to a mysql - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [.NET] How to safely let users connect to a mysql (/showthread.php?tid=5999637) |
How to safely let users connect to a mysql - Footer - Aug 16, 2019 VB.NET related topic. I want to create a program that let users to have their own account stored in a mysql database. How to do that in a safe way? I know it can be reversed to know mysql database login details. I should use api? RE: How to safely let users connect to a mysql - devvariety - Aug 16, 2019 Yes, you should make an API instead of leaving credentials in your application. Anything you don't want your users seeing should be server sided RE: How to safely let users connect to a mysql - Footer - Aug 16, 2019 Tutorial where I can start from? RE: How to safely let users connect to a mysql - memento - Aug 16, 2019 (Aug 16, 2019 12:19 PM)Loque Wrote: Tutorial where I can start from? You'll need 3 things: Web API, Standalone VB.NET App and a MySQL database. You will interact with the database via your Web API and you'll need interact with your Web API through HTTP requests on your VB.NET app. RE: How to safely let users connect to a mysql - slober - Aug 16, 2019 (Aug 16, 2019 11:49 AM)devvariety Wrote: Yes, you should make an API instead of leaving credentials in your application. Absolutely right. you shouldn't leave Database credentials in your application. There are a lot of services exactly for this (ex. rest API's). Not only that but also a few MySQL alternatives
You can also write a simple API in PHP. I've done something like this a few years ago for my Honeypot project PotHead https://github.com/Slober3/PotHead/tree/master/Website%2BBackend/api PHP Code Please do not put your credentials to your DB inside your application use an API. You can read the json in VB.net quite simply by using the newtonsoft library here is a small example: Code Imports System.IORE: How to safely let users connect to a mysql - Fhack - Aug 17, 2019 Hi, make post https request with username and password as data on php page hosted on your server and echo 1 if it's good and 0 if not for example then read the answer in JSON format if you want more data than 0 or 1 ! The php code should check if credentials are valid with the mysql database ! Also check post parameters before connect and making your request on mysql to avoid SQL injection ! |