-
Notifications
You must be signed in to change notification settings - Fork 0
/
Build.aspx.cs
50 lines (44 loc) · 1.67 KB
/
Build.aspx.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text.RegularExpressions;
namespace Abuse
{
public partial class Build : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Request.QueryString["TransID"] != null) TransID.Text = Request.QueryString["TransID"];
}
protected void Button1_Click(object sender, EventArgs e)
{
Page.Validate();
if (Page.IsValid) //Will be true if captcha text is correct otherwise it will be false
{
Match match = Regex.Match(TransID.Text, @"([a-fA-F0-9]{64})");
if (match.Success)
{
System.IO.StreamWriter file = new System.IO.StreamWriter(Server.MapPath("~/batch.txt"));
file.WriteLine(match.Value + "@" + lstBlockChains.Text);
file.Close();
TransID.Visible = false;
recaptcha.Visible = false;
Button1.Visible = false;
lstBlockChains.Visible = false;
lblStatus.Text = "<h1>Thanks, We are working on your request.</h1> Please search the index for your transaction in about 5 minutes.";
}
else
{
lblStatus.Text = "<h1>Sorry, You did not enter a valid Transaction ID.</h1> Please Try again.";
}
}
else
{
lblStatus.Text = "sorry that wasn't correct. try again.";
}
}
}
}