nicht mehr verfügbar
1. Geilsten Rechtschreibfehler die ich je gesehen hab!Quote:
Ich verschenke meine Paysafecard Checker mit der Completen Source
Die Source ist in C# geschrieben würden.
Sie ist in dem Archiv enthalten.
Die Source ist auch eine gutes Beispeil für Httpwebrequest und Thread und anderem was dort alles verwendet wird und kann man geren als Toturial für sich nutzen
using System;
using System.Text.RegularExpressions;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Diagnostics;
using System.Web;
using System.Threading;
using System.Net;
namespace PSC_Checker
{
public partial class Form1 : Form
{
int PSCnummer;
int PSCmax;
Thread[] checkerThread;
public Form1()
{
InitializeComponent();
PSCnummer = 0;
PSCmax = 0;
label1.Text = "Status: Willkommen beim Paysafecard Checker von -superfarmer1995-";
}
string ViewState = "";
CookieContainer cookieContainer = new CookieContainer();
private delegate void updateApplicationDel(string Status);
private delegate void PSCwerthinzufügenHandler(int Index, string statsu);
private void button1_Click(object sender, EventArgs e)
{
checkerThread = new Thread[Convert.ToInt32(1)];
for (int i = 0; i <= Convert.ToInt32(1) - 1; i++)
{
int input = i;
checkerThread[i] = new Thread(new ParameterizedThreadStart(Captschadladen));
checkerThread[i].Start(input);
}
}
public void Captschadladen(object jjj)
{
try
{
HttpWebRequest myRequest = (HttpWebRequest)HttpWebRequest.Create("https://customer.cc.at.paysafecard.com/psccustomer/GetWelcomePanelServlet?&language=de");
myRequest.CookieContainer = cookieContainer;
myRequest.Method = "GET";
myRequest.UserAgent = "UMozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/19.0 Firefox/19.0";
myRequest.ContentType = "application/x-www-form-urlencoded";
HttpWebResponse myRes = (HttpWebResponse)myRequest.GetResponse();
StreamReader srs = new StreamReader(myRes.GetResponseStream());
string html = srs.ReadToEnd();
html = System.Text.RegularExpressions.Regex.Replace(html, @"""", string.Empty);
Regex Url = new Regex("(?<=id=javax.faces.ViewState value=).*(?=[a-z]{0,10}[0-9]{0,10}[A-Z]{0,10}[0-9]{0,10} />)");
ViewState = Url.Match(html).ToString();
myRequest = (HttpWebRequest)HttpWebRequest.Create("https://customer.cc.at.paysafecard.com/seam/resource/captcha");
myRequest.CookieContainer = cookieContainer;
myRequest.AllowAutoRedirect = true;
myRequest.Host = "customer.cc.at.paysafecard.com";
myRequest.Referer = "https://customer.cc.at.paysafecard.com/psccustomer/GetWelcomePanelServlet?&language=de";
myRequest.UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:20.0) Gecko/20.0 Firefox/20.0";
myRequest.KeepAlive = true;
Stream stream = myRequest.GetResponse().GetResponseStream();
Image img = Image.FromStream(stream);
pictureBox1.Image = img;
}
catch
{
}
if (textBox1.InvokeRequired)
textBox1.Invoke(new updateApplicationDel(Captshafedlnull), "");
else
textBox1.Text = "";
if (label1.InvokeRequired)
label1.Invoke(new updateApplicationDel(label1ändern), "Status: Captscha geladen");
else
label1.Text = "Status: Captscha geladen";
}
public void Captshafedlnull(string status)
{
textBox1.Text = status;
}
public void PSCpürfen(object PSCro)
{
try
{
string PSC1 = PSCro.ToString();
string PSCData = "mainPagePart=mainPagePart&mainPagePart%3Arn1=" + PSC1.Split(' ')[0].ToString() + "&mainPagePart%3Arn2=" + PSC1.Split(' ')[1].ToString() + "&mainPagePart%3Arn3=" + PSC1.Split(' ')[2].ToString() + "&mainPagePart%3Arn4=" + PSC1.Split(' ')[3].ToString() + "&mainPagePart%3ApassField=" + PSC1.Split(' ')[4].ToString() + "&mainPagePart%3AverifyCaptcha=" + textBox1.Text + "&mainPagePart%3Anext=OK&javax.faces.ViewState=" + ViewState;
ASCIIEncoding encoding = new ASCIIEncoding();
byte[] data = Encoding.UTF8.GetBytes(PSCData);
HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create("https://customer.cc.at.paysafecard.com/psccustomer/GetWelcomePanelServlet?&language=de");
myRequest.Method = "POST";
myRequest.CookieContainer = cookieContainer;
myRequest.AllowAutoRedirect = true;
myRequest.Host = "customer.cc.at.paysafecard.com";
myRequest.Referer = "https://customer.cc.at.paysafecard.com/psccustomer/GetWelcomePanelServlet?&language=de";
myRequest.UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:20.0) Gecko/20.0 Firefox/20.0";
myRequest.ContentType = "application/x-www-form-urlencoded";
myRequest.KeepAlive = true;
myRequest.ContentLength = data.Length;
Stream newStream = myRequest.GetRequestStream();
newStream.Write(data, 0, data.Length);
newStream.Close();
HttpWebResponse myRes = (HttpWebResponse)myRequest.GetResponse();
StreamReader srs = new StreamReader(myRes.GetResponseStream());
string html = srs.ReadToEnd();
if (html.Contains("Das ist dein verfügbares Guthaben. Dieser Betrag steht dir für weitere Zahlungen zur Verfügung."))
{
Match match = Regex.Match(html, @"<tr class=""price"">");
if (match.Success)
html = html.Remove(0, match.Index);
html = System.Text.RegularExpressions.Regex.Replace(html, @"""", string.Empty);
html = System.Text.RegularExpressions.Regex.Replace(html, @"\r\n", string.Empty);
html = System.Text.RegularExpressions.Regex.Replace(html, @" ", string.Empty);
Regex Url = new Regex("(?<=<td>).*(?=[0-9]{0,5}</td>)");
if (listView1.InvokeRequired)
listView1.Invoke(new PSCwerthinzufügenHandler(PSCwerthinzufügen), PSCnummer, Url.Match(html).ToString());
else
PSCwerthinzufügen(PSCnummer, Url.Match(html).ToString());
PSCnummer++;
checkerThread = new Thread[Convert.ToInt32(1)];
for (int i = 0; i <= Convert.ToInt32(1) - 1; i++)
{
int input = i;
checkerThread[i] = new Thread(new ParameterizedThreadStart(Captschadladen));
checkerThread[i].Start(input);
}
}
else if (html.Contains("Das gesamte Guthaben steht dir noch zur Verfügung."))
{
if (listView1.InvokeRequired)
listView1.Invoke(new PSCwerthinzufügenHandler(PSCwerthinzufügen), PSCnummer, "Voll");
else
PSCwerthinzufügen(PSCnummer, "Voll");
PSCnummer++;
checkerThread = new Thread[Convert.ToInt32(1)];
for (int i = 0; i <= Convert.ToInt32(1) - 1; i++)
{
int input = i;
checkerThread[i] = new Thread(new ParameterizedThreadStart(Captschadladen));
checkerThread[i].Start(input);
}
}
else
{
if (html.Contains("Der eingegebene Text stimmt nicht mit dem Angezeigten überein."))
{
MessageBox.Show("Der eingegebene Text stimmt nicht mit dem Angezeigten überein.");
checkerThread = new Thread[Convert.ToInt32(1)];
for (int i = 0; i <= Convert.ToInt32(1) - 1; i++)
{
int input = i;
checkerThread[i] = new Thread(new ParameterizedThreadStart(Captschadladen));
checkerThread[i].Start(input);
}
if (PSCnummer >= 2)
{
PSCnummer--;
}
else
{
PSCnummer = 0;
}
}
else
{
if (listView1.InvokeRequired)
listView1.Invoke(new PSCwerthinzufügenHandler(PSCwerthinzufügen), PSCnummer, "Ungültig");
else
PSCwerthinzufügen(PSCnummer, "Ungültig");
PSCnummer++;
checkerThread = new Thread[Convert.ToInt32(1)];
for (int i = 0; i <= Convert.ToInt32(1) - 1; i++)
{
int input = i;
checkerThread[i] = new Thread(new ParameterizedThreadStart(Captschadladen));
checkerThread[i].Start(input);
}
}
if (label1.InvokeRequired)
label1.Invoke(new updateApplicationDel(label1ändern), "Status: PSC gecheckt");
else
label1.Text = "Status: PSC gecheckt";
}
}
catch
{
}
}
private void button2_Click(object sender, EventArgs e)
{
try
{
if (PSCnummer < PSCmax)
{
checkerThread = new Thread[Convert.ToInt32(1)];
for (int i = 0; i <= Convert.ToInt32(1) - 1; i++)
{
string PSC = listView1.Items[PSCnummer].SubItems[0].Text.ToString();
checkerThread[i] = new Thread(new ParameterizedThreadStart(PSCpürfen));
checkerThread[i].Start(PSC);
}
}
else
{
MessageBox.Show("Alle PSC Codes gecheckt");
if (label1.InvokeRequired)
label1.Invoke(new updateApplicationDel(label1ändern), "Status: Alle PSC Codes gecheckt");
else
label1.Text = "Status: Alle PSC Codes gecheckt";
}
}
catch
{
}
}
void PSCwerthinzufügen(int index, string statsu)
{
try
{
listView1.Items[index].SubItems[1].Text = statsu;
}
catch
{
}
}
private void button3_Click(object sender, EventArgs e)
{
int proxyCount;
int line = 0;
using (OpenFileDialog o = new OpenFileDialog())
{
o.Filter = "Text Files|*.txt|All Files|*.*";
if (o.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
proxyCount = File.ReadAllLines(o.FileName).Length;
foreach (String s in File.ReadAllLines(o.FileName))
{
try
{
Regex Url = new Regex("[0-9]{0,4}");
StringBuilder sb = new StringBuilder();
foreach (Match match in Url.Matches(s))
{
string hinzufügen = match.ToString();
sb.Append(hinzufügen);
}
string l = sb.ToString();
Regex Urls = new Regex("[0-9]{0,4}");
StringBuilder ssb = new StringBuilder();
foreach (Match match in Urls.Matches(l))
{
string hinzufügen = match.ToString();
ssb.Append(hinzufügen + " ");
}
ListViewItem item1 = new ListViewItem();
item1.Text = ssb.ToString();
item1.SubItems.Add("");
listView1.Items.Add(item1);
}
catch
{
line++;
}
line++;
PSCmax++;
Application.DoEvents();
}
}
}
if (label1.InvokeRequired)
label1.Invoke(new updateApplicationDel(label1ändern), "Status: PSC von Textdatei hinzugefügt");
else
label1.Text = "Status: PSC von Textdatei hinzugefügt";
}
private void button5_Click(object sender, EventArgs e)
{
using (SaveFileDialog sF = new SaveFileDialog())
{
sF.DefaultExt = "txt";
sF.Filter = "Text Files|*.txt|All Files|*.*";
if (sF.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
int TwitterSave = listView1.Items.Count;
if (checkBox1.Checked == true)
{
for (int i = 0; i <= TwitterSave; i++)
{
try
{
StreamWriter myFile = new StreamWriter(sF.FileName, true);
myFile.Write(listView1.Items[i].SubItems[0].Text.ToString() + " Wert = " + listView1.Items[i].SubItems[1].Text.ToString() + " €" + "\r\n");
myFile.Close();
}
catch (Exception exc)
{
string fehler = exc.ToString();
}
}
}
else
{
for (int i = 0; i <= TwitterSave; i++)
{
try
{
StreamWriter myFile = new StreamWriter(sF.FileName, true);
myFile.Write(listView1.Items[i].SubItems[0].Text.ToString() + "\r\n");
myFile.Close();
}
catch (Exception exc)
{
string fehler = exc.ToString();
}
}
}
}
}
if (label1.InvokeRequired)
label1.Invoke(new updateApplicationDel(label1ändern), "Status: PSC gespeichert");
else
label1.Text = "Status: PSC gespeichert";
Application.DoEvents();
}
private bool pruefeEingabe(string tmp)
{
string pat = "0123456789 ";
foreach (char ch in tmp)
{
if (pat.IndexOf(ch) < 0)
return false;
}
return true;
}
private void button4_Click(object sender, EventArgs e)
{
if (textBox2.Text != " ")
{
if (textBox2.Text != "")
{
if (pruefeEingabe(textBox2.Text) == false)
{
MessageBox.Show("Bitte geben sie nur Zahlen ein!");
}
else
{
Regex Url = new Regex("[0-9]{0,4}");
StringBuilder sb = new StringBuilder();
foreach (Match match in Url.Matches(textBox2.Text))
{
string hinzufügen = match.ToString();
sb.Append(hinzufügen);
}
string l = sb.ToString();
Regex Urls = new Regex("[0-9]{0,4}");
StringBuilder ssb = new StringBuilder();
foreach (Match match in Urls.Matches(l))
{
string hinzufügen = match.ToString();
ssb.Append(hinzufügen + " ");
}
ListViewItem item1 = new ListViewItem();
item1.Text = ssb.ToString();
item1.SubItems.Add("");
listView1.Items.Add(item1);
textBox2.Text = "";
PSCmax++;
if (label1.InvokeRequired)
label1.Invoke(new updateApplicationDel(label1ändern), "Status:PSC von Textbox hinzugefügt");
else
label1.Text = "Status:PSC von Textbox hinzugefügt";
}
}
else
{
MessageBox.Show("Bitte gebe sie eine PSC code ein");
}
}
else
{
MessageBox.Show("Bitte gebe sie eine PSC code ein");
}
}
public void label1ändern(string status)
{
label1.Text = status;
}
private void Form1_Load(object sender, EventArgs e)
{
}
}
}