- Katılım
- 28 Mart 2020
- Mesajlar
- 2.985
- Makaleler
- 4
- Çözümler
- 19
[CODE lang="csharp" title="C# ile XenForo girişi kodları:"]Imports System.Security.Principal
using System.Net;
using System.IO;
//2 adet textbox oluşturun birisi kullanıcı adı birisi şifre olacak.
//1 adet giriş yap butonu oluşturun ve bunları yazın:
TextBox1.Enabled = false;
TextBox2.Enabled = false;
Buton1.Enabled = false;
Timer1.Start();
WebBrowser1.Document.GetElementById("login").InnerText = TextBox1.Text;
WebBrowser1.Document.GetElementById("login").InnerText = TextBox1.Text;
WebBrowser1.Document.GetElementById("password").InnerText = TextBox2.Text;
WebBrowser1.Document.GetElementById("password").InnerText = TextBox2.Text;
var Result = (from T in WebBrowser1.Document.GetElementsByTagName("button").Cast<HtmlElement>()
select T).ToList;
foreach (HtmlElement item in Result)
{
if (item.GetAttribute("classname") == "button--primary button button--icon button--icon--login")
{
if (!string.IsNullOrWhiteSpace(item.GetAttribute("onClick")))
item.InvokeMember("click");
else.
item.InvokeMember("click");
}
}
//Bir tane Timer oluştur ve içine bunları yaz. Timer'ın Interval'i 6000 yap.
if ((WebBrowser1.Url.ToString().Contains("SİTE ADRESİNİZ BURAYA GELECEK")))
Interaction.MsgBox("Giriş başarılı!");
else if ((WebBrowser1.Url.ToString().Contains("SİTENİZİN LOGİN KISMI BURASI OLACAK YANİ WWW.****/LOGİN GİBİ")))
{
Timer_Login.Stop();
TextBox1.Enabled = true;
TextBox2.Enabled = true;
Button1.Enabled = true;
Interaction.MsgBox("Kullanıcı adı veya Şifre yanlış.", MsgBoxStyle.Exclamation, "");
}
else.
{
Timer_Login.Stop();
TextBox1.Enabled = true;
TextBox2.Enabled = true;
Button1.Enabled = true;
Interaction.MsgBox("Sunucu Hatası!", MsgBoxStyle.Critical, "");
}[/CODE]
[CODE lang="csharp" title="C# İle Deneme Sürümü Sistemi"]DateTime dt1 = DateTime.Now;
DateTime dt2 = DateTime.Parse("15/01/2021"); //Hangi tarihe kadar?
if (dt1.Date >= dt2.Date)
{
label1.Text = "Kullanım Süreniz Bitmiştir..";
MessageBox.Show("Deneme Süresi Dolmuştur! Lütfen Lisans Satın Alın.", "Deneme Periodu", MessageBoxButtons.OK, MessageBoxIcon.Information);
this.Close();
}
else.
{
Form2 frm2 = new Form2();
frm2.Show();
}
//Bu kodu bir ftp'ye yükleyip güvenli olmasını sağlayabilirsiniz.[/CODE]
[CODE lang="csharp" title="C# İle otomatik Güncelleme V1"]using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net;
using System.IO;
using System.Diagnostics;
using System.Threading;
namespace Auto_Update_V1._0
{
class Update.
{
WebClient webClient;
static void Main(string[] args)
{
WebClient myClient = new WebClient();
string url = "http://mortalxesc.cf/y.png";
string yol = @"C:\y.png";
string Status;
try.
{
using (var client = new WebClient())
{
using (client.OpenRead("https://google.com"))
{
Console.ForegroundColor = ConsoleColor.Green;
Status = "Online";
}
}
}
catch.
{
Status = "Offline";
}
string Version = myClient.DownloadString("https://raw.githubusercontent.com/keytestcode/Version-V1.1/main/Version-V1.1");
string Yenilikler = myClient.DownloadString("https://raw.githubusercontent.com/keytestcode/Yenilikler/main/Yenilikler");
Console.ForegroundColor = ConsoleColor.Yellow;//Konsol rengi sarı.
Console.WriteLine("---------------------------");
Console.WriteLine("[+] Yapımcı: ");
Console.WriteLine("[+] Ad: Auto Update V1.5");
Console.WriteLine($"[+] Status: {Status}");
Console.WriteLine("---------------------------");
Console.SetCursorPosition(0, Console.CursorTop -0);
Console.ForegroundColor = ConsoleColor.Green;
Console.WriteLine($"Yeni Sürüm Bulundu {Version}");
Thread.Sleep(TimeSpan.FromSeconds(2));
Console.ForegroundColor = ConsoleColor.Blue;
Console.WriteLine($"{Yenilikler}");
Thread.Sleep(TimeSpan.FromSeconds(6));
Console.Clear();
Console.ForegroundColor = ConsoleColor.Yellow;
Console.WriteLine("[+] İndirme İşleminiz 5 Saniye içinde başlatılacak!");
Thread.Sleep(TimeSpan.FromSeconds(5));
Console.ForegroundColor = ConsoleColor.Cyan;
if (true)
{
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
myClient.DownloadFile("http://mortalxesc.cf/y.png", @"C:\y.png");
myClient.DownloadFileAsync(new System.Uri(url), yol);
Console.WriteLine("[+] İndirme İşleminiz Başladı ...");
Console.ReadKey();
}
else.
{
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("[+] İndirme işleminiz Başlatılamadı!");
}
}
}
}
//Alıntıdır[/CODE]
Dahası eklenecek, takipte kalın
.
using System.Net;
using System.IO;
//2 adet textbox oluşturun birisi kullanıcı adı birisi şifre olacak.
//1 adet giriş yap butonu oluşturun ve bunları yazın:
TextBox1.Enabled = false;
TextBox2.Enabled = false;
Buton1.Enabled = false;
Timer1.Start();
WebBrowser1.Document.GetElementById("login").InnerText = TextBox1.Text;
WebBrowser1.Document.GetElementById("login").InnerText = TextBox1.Text;
WebBrowser1.Document.GetElementById("password").InnerText = TextBox2.Text;
WebBrowser1.Document.GetElementById("password").InnerText = TextBox2.Text;
var Result = (from T in WebBrowser1.Document.GetElementsByTagName("button").Cast<HtmlElement>()
select T).ToList;
foreach (HtmlElement item in Result)
{
if (item.GetAttribute("classname") == "button--primary button button--icon button--icon--login")
{
if (!string.IsNullOrWhiteSpace(item.GetAttribute("onClick")))
item.InvokeMember("click");
else.
item.InvokeMember("click");
}
}
//Bir tane Timer oluştur ve içine bunları yaz. Timer'ın Interval'i 6000 yap.
if ((WebBrowser1.Url.ToString().Contains("SİTE ADRESİNİZ BURAYA GELECEK")))
Interaction.MsgBox("Giriş başarılı!");
else if ((WebBrowser1.Url.ToString().Contains("SİTENİZİN LOGİN KISMI BURASI OLACAK YANİ WWW.****/LOGİN GİBİ")))
{
Timer_Login.Stop();
TextBox1.Enabled = true;
TextBox2.Enabled = true;
Button1.Enabled = true;
Interaction.MsgBox("Kullanıcı adı veya Şifre yanlış.", MsgBoxStyle.Exclamation, "");
}
else.
{
Timer_Login.Stop();
TextBox1.Enabled = true;
TextBox2.Enabled = true;
Button1.Enabled = true;
Interaction.MsgBox("Sunucu Hatası!", MsgBoxStyle.Critical, "");
}[/CODE]
[CODE lang="csharp" title="C# İle Deneme Sürümü Sistemi"]DateTime dt1 = DateTime.Now;
DateTime dt2 = DateTime.Parse("15/01/2021"); //Hangi tarihe kadar?
if (dt1.Date >= dt2.Date)
{
label1.Text = "Kullanım Süreniz Bitmiştir..";
MessageBox.Show("Deneme Süresi Dolmuştur! Lütfen Lisans Satın Alın.", "Deneme Periodu", MessageBoxButtons.OK, MessageBoxIcon.Information);
this.Close();
}
else.
{
Form2 frm2 = new Form2();
frm2.Show();
}
//Bu kodu bir ftp'ye yükleyip güvenli olmasını sağlayabilirsiniz.[/CODE]
[CODE lang="csharp" title="C# İle otomatik Güncelleme V1"]using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net;
using System.IO;
using System.Diagnostics;
using System.Threading;
namespace Auto_Update_V1._0
{
class Update.
{
WebClient webClient;
static void Main(string[] args)
{
WebClient myClient = new WebClient();
string url = "http://mortalxesc.cf/y.png";
string yol = @"C:\y.png";
string Status;
try.
{
using (var client = new WebClient())
{
using (client.OpenRead("https://google.com"))
{
Console.ForegroundColor = ConsoleColor.Green;
Status = "Online";
}
}
}
catch.
{
Status = "Offline";
}
string Version = myClient.DownloadString("https://raw.githubusercontent.com/keytestcode/Version-V1.1/main/Version-V1.1");
string Yenilikler = myClient.DownloadString("https://raw.githubusercontent.com/keytestcode/Yenilikler/main/Yenilikler");
Console.ForegroundColor = ConsoleColor.Yellow;//Konsol rengi sarı.
Console.WriteLine("---------------------------");
Console.WriteLine("[+] Yapımcı: ");
Console.WriteLine("[+] Ad: Auto Update V1.5");
Console.WriteLine($"[+] Status: {Status}");
Console.WriteLine("---------------------------");
Console.SetCursorPosition(0, Console.CursorTop -0);
Console.ForegroundColor = ConsoleColor.Green;
Console.WriteLine($"Yeni Sürüm Bulundu {Version}");
Thread.Sleep(TimeSpan.FromSeconds(2));
Console.ForegroundColor = ConsoleColor.Blue;
Console.WriteLine($"{Yenilikler}");
Thread.Sleep(TimeSpan.FromSeconds(6));
Console.Clear();
Console.ForegroundColor = ConsoleColor.Yellow;
Console.WriteLine("[+] İndirme İşleminiz 5 Saniye içinde başlatılacak!");
Thread.Sleep(TimeSpan.FromSeconds(5));
Console.ForegroundColor = ConsoleColor.Cyan;
if (true)
{
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
myClient.DownloadFile("http://mortalxesc.cf/y.png", @"C:\y.png");
myClient.DownloadFileAsync(new System.Uri(url), yol);
Console.WriteLine("[+] İndirme İşleminiz Başladı ...");
Console.ReadKey();
}
else.
{
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("[+] İndirme işleminiz Başlatılamadı!");
}
}
}
}
//Alıntıdır[/CODE]
Dahası eklenecek, takipte kalın