How to post php file stored in cPanel File Manager that can access a MySQL database? - Hack The Tech - Latest News related to Computer and Technology

Hack The Tech - Latest News related to Computer and Technology

Get Daily Latest News related to Computer and Technology and hack the world.

Tuesday, May 23, 2023

How to post php file stored in cPanel File Manager that can access a MySQL database?

I'm developing a Windows Forms application in Visual Studio C# that connects to a MySQL database on a remote server using cPanel tools. My boss now intends to sell it and therefore I need 2 things:

  1. Have the program check the license when the client writes it
  2. That from the license it downloads the connection string of that client (to access its database) It occurs to me that I could make a database that stores the client's connection string and only downloads it if a valid license has been registered but limits the number of attempts to query license (to prevent a program from trying strings randomly to find the license).

So it occurred to me that I could put a php file that requests the ip (to limit the number of attempts) of who is requesting and their license, that accesses the license database and if the license exists, returns the string corresponding connection.

To access the php file I intend to use the WebRequest class from the Windows Forms application in C#.

I followed the below tutorial to post a php file: https://www.youtube.com/watch?v=T7fZIxJzhKc

The problem is that when I try to access the php file from the url "domain.com/test.php" I get the 404 error, I tried giving all the permissions to that file but I still can't access it.

I'm not closed to listen to other alternatives, I need to solve the 2 problems mentioned above.

I especially appreciate notes regarding system security, (by the way I have a couple of routines to encrypt and decrypt the connection string, but maybe it's not enough because someone could monitor the pc's RAM to get the connection string and/or the license when the program decrypts that information).

Thanks in advance to all who respond.



source https://stackoverflow.com/questions/76308533/how-to-post-php-file-stored-in-cpanel-file-manager-that-can-access-a-mysql-datab

No comments:

Post a Comment