- Messages
- 1,253
- Reaction score
- 942
- Points
- 973
This is a 'part 2' to this thread:
C# Key Login + Selling Tutorial | CabConModding
This won't be needed for free programs, and this method is very un-secure, however, for small tools that have < 50 users (like private tools)
Before it starts, huge shout out to @thahitcrew for giving me the PHP writing code
Requirements -
Step #1 - Setting up your webserver
Download the files attached (Server Files for CCM) and upload them to your webserver.
You can configure these if you know how, but its unnecessary for now.
Upload these to your webserver.
Step #2 - Reading and Writing
Now we need to make a program to read and write to this file. This is simple, create a form and 1 checkBox and 1 label.
Double click your form and paste this (please, try and understand it somewhat):
Now double click on your checkBox and paste this:
Simple as that!
Step 3 - Integrating this
Now to put this into your login, simply use the same system as my last tutorial (linked above) or:
Make a new label on your form.
Double click your login button, and go to the top of the code.
Paste this:
Now double click on the form and paste this:
Simple as that
Any question, leave em below!
- This is NOT incredibly secure! There are better ways of making this, but, if you want to remove the .PHP after updating, or making a program to allow for FTP of the PHP when changing this, and removing when exiting the program can make it much more secure
Have a good day
C# Key Login + Selling Tutorial | CabConModding
This won't be needed for free programs, and this method is very un-secure, however, for small tools that have < 50 users (like private tools)
Before it starts, huge shout out to @thahitcrew for giving me the PHP writing code
Requirements -
- Visual Studio
- Atleast 1 webserver/webhosting (can be free, as long as FTP is accessible)
- Somewhat knowledge of my previous thread
- Some memes (optional)
Step #1 - Setting up your webserver
Download the files attached (Server Files for CCM) and upload them to your webserver.
You can configure these if you know how, but its unnecessary for now.
Upload these to your webserver.
Step #2 - Reading and Writing
Now we need to make a program to read and write to this file. This is simple, create a form and 1 checkBox and 1 label.
Double click your form and paste this (please, try and understand it somewhat):
Code:
WebClient web = new WebClient(); System.IO.Stream stream = web.OpenRead("http://yourwebsite.com/FreeMode.txt");
using (System.IO.StreamReader reader = new System.IO.StreamReader(stream))
{
label1.Text = (reader.ReadToEnd());
}
System.Threading.Thread.Sleep(2500);
if(label1.Text == "False")
{
checkBox1.Checked = false;
}
else if(label1.Text == "True")
{
checkBox1.Checked = true;
}
Now double click on your checkBox and paste this:
Code:
if(checkBox1.Checked == false)
{
webBrowser1.Navigate("http://yourwebsite.com/FreeMode.php?FreeMode=False");
}
else
{
webBrowser1.Navigate("http://yourwebsite.com/FreeMode.php?FreeMode=True");
}
Simple as that!
Step 3 - Integrating this
Now to put this into your login, simply use the same system as my last tutorial (linked above) or:
Make a new label on your form.
Double click your login button, and go to the top of the code.
Paste this:
Code:
if (label.Text == "True")
{
MessageBox.Show("Logged In to Free Mode", "Logged In");
//What you want here
}
else
{
//your login code goes here
}
Now double click on the form and paste this:
Code:
WebClient web = new WebClient(); System.IO.Stream stream1 = web.OpenRead("http://whysomoddingteam.xyz/ServerLogin/FreeMode.txt");
using (System.IO.StreamReader reader1 = new System.IO.StreamReader(stream1))
{
label.Text = (reader1.ReadToEnd());
}
Simple as that
Any question, leave em below!
- This is NOT incredibly secure! There are better ways of making this, but, if you want to remove the .PHP after updating, or making a program to allow for FTP of the PHP when changing this, and removing when exiting the program can make it much more secure
Have a good day