public static bool UpdateRecord(ModelK8shell model, int ID) { StringBuilder builder = new StringBuilder(); builder.Append("UPDATE"); builder.Append(" k8_shell SET"); builder.Append("[TargetID]=@TargetID,[TargetLevel]=@TargetLevel,[IsOnline]=@IsOnline,[Permission]=@Permission,"); builder.Append("[PR]=@PR,[ShellPath]=@ShellPath,[ShellPass]=@ShellPass,[ShellCoding]=@ShellCoding,[XssCookie]=@XssCookie,[IP]=@IP,"); builder.Append("[Area]=@Area,[OS]=@OS,[ScritpType]=@ScritpType,[SQLType]=@SQLType,[RemoteRat]=@RemoteRat,[BackDoor]=@BackDoor,[AddTime]=@AddTime"); builder.Append(" WHERE "); builder.Append("ID=" + ID); using (OleDbCommand command = new OleDbCommand(builder.ToString())) { command.Parameters.Add("@TargetID", OleDbType.VarChar, 500).Value = model.TargetID; command.Parameters.Add("@TargetLevel", OleDbType.VarChar, 500).Value = model.TargetLevel; command.Parameters.Add("@IsOnline", OleDbType.VarChar, 500).Value = model.IsOnline; command.Parameters.Add("@Permission", OleDbType.VarChar, 500).Value = model.Permission; command.Parameters.Add("@PR", OleDbType.VarChar, 500).Value = model.PR; command.Parameters.Add("@ShellPath", OleDbType.VarChar, 0x3e8).Value = model.ShellPath; command.Parameters.Add("@ShellPass", OleDbType.VarChar, 500).Value = model.ShellPass; command.Parameters.Add("@ShellCoding", OleDbType.VarChar, 500).Value = model.ShellCoding; command.Parameters.Add("@XssCookie", OleDbType.VarChar).Value = model.XssCookie; command.Parameters.Add("@IP", OleDbType.VarChar, 500).Value = model.IP; command.Parameters.Add("@Area", OleDbType.VarChar, 500).Value = model.Area; command.Parameters.Add("@OS", OleDbType.VarChar, 500).Value = model.OS; command.Parameters.Add("@ScritpType", OleDbType.VarChar, 500).Value = model.ScritpType; command.Parameters.Add("@SQLType", OleDbType.VarChar, 500).Value = model.SQLType; command.Parameters.Add("@RemoteRat", OleDbType.VarChar, 500).Value = model.RemoteRat; command.Parameters.Add("@BackDoor", OleDbType.VarChar, 500).Value = model.BackDoor; command.Parameters.Add("@AddTime", OleDbType.VarChar, 500).Value = model.AddTime; return(K8accessHelper.ExecSQLparameter(command)); } }
public static bool InsertRecord(ModelK8shell model) { StringBuilder builder = new StringBuilder(); builder.Append("Insert into"); builder.Append(" k8_shell "); builder.Append("([TargetID],[TargetLevel],[IsOnline],[Permission],[PR],[ShellPath],[ShellPass],[ShellCoding],[XssCookie],[IP],[Area],[OS],[ScritpType],[SQLType],[RemoteRat],[BackDoor],[AddTime])"); builder.Append(" VALUES "); builder.Append("(@TargetID,@TargetLevel,@IsOnline,@Permission,@PR,@ShellPath,@ShellPass,@ShellCoding,@XssCookie,@IP,@Area,@OS,@ScritpType,@SQLType,@RemoteRat,@BackDoor,@AddTime)"); using (OleDbCommand command = new OleDbCommand(builder.ToString())) { command.Parameters.Add("@TargetID", OleDbType.VarChar, 500).Value = model.TargetID; command.Parameters.Add("@TargetLevel", OleDbType.VarChar, 500).Value = model.TargetLevel; command.Parameters.Add("@IsOnline", OleDbType.VarChar, 500).Value = model.IsOnline; command.Parameters.Add("@Permission", OleDbType.VarChar, 500).Value = model.Permission; command.Parameters.Add("@PR", OleDbType.VarChar, 500).Value = model.PR; command.Parameters.Add("@ShellPath", OleDbType.VarChar, 0x3e8).Value = model.ShellPath; command.Parameters.Add("@ShellPass", OleDbType.VarChar, 500).Value = model.ShellPass; command.Parameters.Add("@ShellCoding", OleDbType.VarChar, 500).Value = model.ShellCoding; command.Parameters.Add("@XssCookie", OleDbType.VarChar).Value = model.XssCookie; command.Parameters.Add("@IP", OleDbType.VarChar, 500).Value = model.IP; command.Parameters.Add("@Area", OleDbType.VarChar, 500).Value = model.Area; command.Parameters.Add("@OS", OleDbType.VarChar, 500).Value = model.OS; command.Parameters.Add("@ScritpType", OleDbType.VarChar, 500).Value = model.ScritpType; command.Parameters.Add("@SQLType", OleDbType.VarChar, 500).Value = model.SQLType; command.Parameters.Add("@RemoteRat", OleDbType.VarChar, 500).Value = model.RemoteRat; command.Parameters.Add("@BackDoor", OleDbType.VarChar, 500).Value = model.BackDoor; command.Parameters.Add("@AddTime", OleDbType.VarChar, 500).Value = model.AddTime; return(K8accessHelper.ExecSQLparameter(command)); } }
public static string ExistsRecordGetTargetID(string[] ModelArray) { ModelK8shell model = new ModelK8shell { ShellPath = ModelArray[0] }; return(DALk8shell.ExistsRecordGetTargetID(model).Tables[0].Rows[0][0].ToString()); }
public static bool ExistsRecord(string[] ModelArray) { ModelK8shell model = new ModelK8shell { ShellPath = ModelArray[0] }; return(DALk8shell.ExistsRecord(model)); }
public static DataSet ExistsRecordGetTargetID(ModelK8shell model) { StringBuilder builder = new StringBuilder(); builder.Append("Select [TargetID] from"); builder.Append(" k8_shell "); builder.Append(" where "); builder.Append("[ShellPath]=@ShellPath"); using (OleDbCommand command = new OleDbCommand(builder.ToString())) { command.Parameters.Add("@ShellPath", OleDbType.VarChar, 0x3e8).Value = model.ShellPath; return(K8accessHelper.GetDataSet(command)); } }
public static bool ExistsRecord(ModelK8shell model) { StringBuilder builder = new StringBuilder(); builder.Append("Select * from"); builder.Append(" k8_shell "); builder.Append(" where "); builder.Append("[ShellPath]=@ShellPath"); using (OleDbCommand command = new OleDbCommand(builder.ToString())) { command.Parameters.Add("@ShellPath", OleDbType.VarChar, 0x3e8).Value = model.ShellPath; if (K8accessHelper.GetRecordCount(command) > 0) { return(true); } } return(false); }
public static bool InsertRecord(string[] ModelArray) { ModelK8shell model = new ModelK8shell { TargetID = ModelArray[0], TargetLevel = ModelArray[1], IsOnline = ModelArray[2], Permission = ModelArray[3], PR = ModelArray[4], ShellPath = ModelArray[5], ShellPass = ModelArray[6], ShellCoding = ModelArray[7], XssCookie = ModelArray[8], IP = ModelArray[9], Area = ModelArray[10], OS = ModelArray[11], ScritpType = ModelArray[12], SQLType = ModelArray[13], RemoteRat = ModelArray[14], BackDoor = ModelArray[15], AddTime = ModelArray[0x10] }; return(DALk8shell.InsertRecord(model)); }
public static DataSet GetDataSet() { ModelK8shell lkshell = new ModelK8shell(); return(DALk8shell.GetDataSet()); }