Terror Factor
Legacy Member
Ik heb online een stuk code gevonden, maar ik krijg hem niet gecompiled. Als ik probeer te compilen met csc, krijg ik deze error:
Dit is de code
Wa moet daar aan veranderd worden ofzo? 'k ben ni echt into programmeren, en google levert me ni echt iets verstaanbaars op
Bij voorbaat dank
Code:
Microsoft (R) Visual C# 2008 Compiler versie 3.5.30729.4926
voor Microsoft (R) .NET Framework versie 3.5
Copyright (C) Microsoft Corporation. Alle rechten voorbehouden.
JXG4VYQ2.cs(18,13): error CS0103: De naam InitializeComponent bestaat niet in d
huidige context
JXG4VYQ2.cs(86,30): error CS0103: De naam AESMethods bestaat niet in de huidige
context
JXG4VYQ2.cs(91,30): error CS0103: De naam AESMethods bestaat niet in de huidige
context
JXG4VYQ2.cs(124,27): error CS0103: De naam textBox4 bestaat niet in de huidige
context
JXG4VYQ2.cs(125,27): error CS0103: De naam textBox5 bestaat niet in de huidige
context
JXG4VYQ2.cs(175,28): error CS0103: De naam textBox1 bestaat niet in de huidige
context
JXG4VYQ2.cs(176,13): error CS0103: De naam textBox2 bestaat niet in de huidige
context
JXG4VYQ2.cs(181,27): error CS0103: De naam textBox3 bestaat niet in de huidige
context
JXG4VYQ2.cs(181,42): error CS0103: De naam checkBox1 bestaat niet in de huidige
context
Dit is de code
Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Windows.Forms;
namespace ArbisBots
{
public partial class MainForm : Form
{
public MainForm()
{
InitializeComponent();
}
public static byte[] ReadFully(Stream stream, int initialLength)
{
// If we've been passed an unhelpful initial length, just
// use 32K.
if (initialLength < 1)
{
initialLength = 32768;
}
byte[] buffer = new byte[initialLength];
int read = 0;
int chunk;
while ((chunk = stream.Read(buffer, read, buffer.Length - read)) > 0)
{
read += chunk;
// If we've reached the end of our buffer, check to see if there's
// any more information
if (read == buffer.Length)
{
int nextByte = stream.ReadByte();
// End of stream? If so, we're done
if (nextByte == -1)
{
return buffer;
}
// Nope. Resize the buffer, put in the byte we've just
// read, and continue
byte[] newBuffer = new byte[buffer.Length * 2];
Array.Copy(buffer, newBuffer, buffer.Length);
newBuffer[read] = (byte)nextByte;
buffer = newBuffer;
read++;
}
}
// Buffer is now too big. Shrink it.
byte[] ret = new byte[read];
Array.Copy(buffer, ret, read);
return ret;
}
public byte[] StrToByteArray(string str)
{
UTF8Encoding encoding = new UTF8Encoding();
return encoding.GetBytes(str);
}
public byte[] StreamToByteArray(Stream stream)
{
Int32 streamLength = (Int32)stream.Length;
byte[] byteArray = new byte[streamLength];
stream.Read(byteArray, 0, streamLength);
stream.Close();
return byteArray;
}
private void SaveStreamToFile(byte[] stream, String fileName)
{
FileStream file = new FileStream(fileName, FileMode.Create);
file.Write(stream, 0, stream.Length);
file.Flush();
file.Close();
}
public void DecryptFile()
{
const string loc = "c:/ContraPIDGen/Auth.jar";
SaveStreamToFile(AESMethods.Decrypt(GetFile(), StrToByteArray("w7aWEV58an6faSpe"), StrToByteArray("Zes8esPePhekEsUP")), loc);
}
public void DecryptScript(string name, bool trial)
{
string loc = "c:/ContraPIDGen/" + name + ".jar";
SaveStreamToFile(AESMethods.Decrypt(GetScript(name, trial), StrToByteArray("swatHa2uru8uC5Af"), StrToByteArray("yAjUjaM4JeqUwRUT")), loc);
}
//34
public String EncryptDecrypt(String plaintext)
{
int xorKey = 85;
int pos = plaintext.Length - 1;
char[] chars = plaintext.ToCharArray();
while (pos >= 0)
{
chars[pos] ^= (char) xorKey;
xorKey = pos ^ xorKey & 0x3F;
--pos;
}
return new String(chars);
}
public String EncryptDecrypt2(String plaintext)
{
int xorKey = 0x4;
int pos = plaintext.Length - 1;
char[] chars = plaintext.ToCharArray();
while (pos >= 0)
{
chars[pos] ^= (char) xorKey;
//xorKey = pos ^ xorKey & 0x3F;
--pos;
}
return new String(chars);
}
//De9wUPEBRu4efra4
//Sp5SteBAX9cr9wra
public byte[] GetScript(string name, bool trial)
{
string user = textBox4.Text;
string pass = textBox5.Text;
string url = "";
if (!trial)
{
url = string.Format(string.Format("http://arbibots.com/auth/script.php?username={0}&password={1}&script={{0}}&istrial=false", user, pass), name);
}
else
{
url = string.Format(string.Format("http://arbibots.com/auth/script.php?username={0}&password={1}&script={{0}}&istrial=true&mac=00123456", user, pass), name);
}
WebRequest myReq = WebRequest.Create(url);
const string username = "auth";
const string password = "ZUheKu52U8";
const string usernamePassword = username + ":" + password;
CredentialCache mycache = new CredentialCache { { new Uri(url), "Basic", new NetworkCredential(username, password) } };
myReq.Credentials = mycache;
myReq.Headers.Add("Authorization",
"Basic " + Convert.ToBase64String(new ASCIIEncoding().GetBytes(usernamePassword)));
WebResponse wr = myReq.GetResponse();
Stream receiveStream = wr.GetResponseStream();
return ReadFully(receiveStream, 1024);
}
public byte[] GetFile()
{
const string url = "http://www.arbibots.com/auth/loader.php";
WebRequest myReq = WebRequest.Create(url);
const string username = "auth";
const string password = "ZUheKu52U8";
const string usernamePassword = username + ":" + password;
CredentialCache mycache = new CredentialCache
{{new Uri(url), "Basic", new NetworkCredential(username, password)}};
myReq.Credentials = mycache;
myReq.Headers.Add("Authorization",
"Basic " + Convert.ToBase64String(new ASCIIEncoding().GetBytes(usernamePassword)));
WebResponse wr = myReq.GetResponse();
Stream receiveStream = wr.GetResponseStream();
return ReadFully(receiveStream, 1024);
}
private void Button1Click(object sender, EventArgs e)
{
DecryptFile();
}
private void button2_Click(object sender, EventArgs e)
{
string input = textBox1.Text;
textBox2.Text = EncryptDecrypt(input);
}
private void button3_Click(object sender, EventArgs e)
{
DecryptScript(textBox3.Text, checkBox1.Checked);
//string input = textBox1.Text;
//textBox2.Text = EncryptDecrypt2(input);
}
}
}

Bij voorbaat dank
