If you have read my previous articles ( read this one if not : http://d4rk-c0de.org/2008/09/21/visual-basic-and-php-combination/ ) or you have seen on http://vbcode.com/ or on some forums my vb codes , you should know that i wrote a php code and i use it to know how many people use my chat program. This code helpes me to know how much popular is my program. It’s easy to understand. Who? because there are 1 socket and 1 php file. So, i decided to create this spy tool for C# too.
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.IO;
using System.Net;
using System.Net.Sockets;namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}private void Form1_Load(object sender, EventArgs e)
{
/* this code was Created
* by d4rk-c0de.org !
* you can get IP address or localhost or volumen data from
* user’s pc and send all data to your server
* Copyright 2008 d4rksoft
*/
}
private void button1_Click(object sender, EventArgs e)
{
TcpClient oClient = new TcpClient(”usuarios.lycos.es”, 80);
NetworkStream ns = oClient.GetStream();
StreamWriter sw = new StreamWriter(ns);
string rst = “&name=” + textBox1.Text + “&insMessage=” + textBox2.Text +”&submit=Enviar”;
string request = “POST /d4rksoft/pato/insMessage.php?action=insMessage HTTP/1.1\r\nAccept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*\r\nAccept-Language: es-us\r\nContent-Type: application/x-www-form-urlencoded\r\nAccept-Encoding: gzip, deflate\r\nUser-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 1.1.4322)\r\nHost: ” + “usuarios.lycos.es” + “\r\nContent-Length: ” + rst.Length + “\r\nConnection: Keep-Alive\r\n\r\n” + rst + “\r\n”;
sw.Write(request);
sw.Flush();
}
}
}
Hope you like it. There is also complete source code where you have to modify host and comlete request. PHP file you can get from Here
Download: Here
This file has been downloaded: times
| 2.9 (2 people) |

H_acktivis_T




No Comment Received
Leave A Reply