public static void UpdateControllers() { foreach (StatsController controller in controllersQueue) { if (CustomBase.IsInstance() && CustomBase.Instance.chaCtrl == controller.ChaControl) { controllers.Add(controller); } else { foreach (KeyValuePair <int, AgentActor> agent in Manager.Map.Instance.AgentTable) { if (agent.Value.ChaControl == controller.ChaControl) { controller.id = agent.Key; controller.agent = agent.Value; controllers.Add(controller); break; } } } } controllersQueue.Clear(); foreach (StatsController controller in controllersDump) { controllers.Remove(controller); } controllersDump.Clear(); }
private static void Reload(ChaControl __instance) { if (CustomBase.IsInstance()) { __instance.StartCoroutine(SliderUnlocker.ResetAllSliders()); } }
private void SetupSlider(float baseValue, Action <float> sliderSetter, Action <float> bodySetter, string fieldname, PushupController pushupController, object cvsBreast) { //Find the sliders for the chest area var slider = (Slider)Traverse.Create(cvsBreast).Field($"sld{fieldname}").GetValue(); var input = (TMP_InputField)Traverse.Create(cvsBreast).Field($"inp{fieldname}").GetValue(); bodySetter(baseValue); slider.value = baseValue; input.text = CustomBase.ConvertTextFromRate(0, 100, baseValue); if (!DoEvents) { return; } slider.onValueChanged.AsObservable().Subscribe(value => { if (!DoEvents) { return; } //When user is updating the chest sliders set the BaseData sliderSetter(value); input.text = Math.Round(value * 100).ToString(CultureInfo.InvariantCulture); pushupController.RecalculateBody(); }); }
public static bool Prefix_CvsO_CharaSave_UpdateCharasList(ref CustomCharaWindow ___charaLoadWin) { CustomBase customBase = CustomBase.Instance; ___charaLoadWin.UpdateWindow(customBase.modeNew, customBase.modeSex, false); return(false); }
[TestMethod] public void ConvertFromBaseAlpha_Simple() { Assert.AreEqual((ulong)5, CustomBase.ConvertFromBaseAlpha("5")); Assert.AreEqual((ulong)10, CustomBase.ConvertFromBaseAlpha("A")); Assert.AreEqual((ulong)146, CustomBase.ConvertFromBaseAlpha("42")); Assert.AreEqual((ulong)1310649907, CustomBase.ConvertFromBaseAlpha("LOBRXV")); Assert.AreEqual((ulong)2168781265994, CustomBase.ConvertFromBaseAlpha("ROBODAVE")); }
[TestMethod] public void ConvertToBaseAlpha_Simple() { Assert.AreEqual("5", CustomBase.ConvertToBaseAlpha(5)); Assert.AreEqual("A", CustomBase.ConvertToBaseAlpha(10)); Assert.AreEqual("42", CustomBase.ConvertToBaseAlpha(146)); Assert.AreEqual("LOBRXV", CustomBase.ConvertToBaseAlpha(1310649907)); Assert.AreEqual("ROBODAVE", CustomBase.ConvertToBaseAlpha(2168781265994)); }
internal void SetPlayerClothesToAutomatic() { Assert.IsNotNull(this); if (Game.IsInstance()) { Game.Instance.SafeProc(i => i.Player.SafeProc(p => p.changeClothesType = -1)); } if (CustomBase.IsInstance()) { CustomBase.Instance.SafeProc(i => i.autoClothesState = true); } }
protected override void OnReload(GameMode currentGameMode, bool maintainState) { if (CustomBase.IsInstance() && CustomBase.Instance.chaCtrl == ChaControl) { CustomCharaWindow[] customCharaWindows = FindObjectsOfType <CustomCharaWindow>(); if (customCharaWindows != null && customCharaWindows.Length >= 2) { var toggles = new HarmonyLib.Traverse(customCharaWindows[1]) .Field("tglLoadOption") .GetValue <Toggle[]>(); if (toggles != null && toggles.Length >= 5 && !toggles[4].isOn) { return; } } } PluginData data = GetExtendedData(); if (data != null) { Dictionary <int, float> newLockedStats; Dictionary <int, float> newLockedDesires; Dictionary <int, int> newLockedFlavors; try { newLockedStats = LZ4MessagePackSerializer .Deserialize <Dictionary <int, float> >((byte[])data.data["lockedStats"]); newLockedDesires = LZ4MessagePackSerializer .Deserialize <Dictionary <int, float> >((byte[])data.data["lockedDesires"]); newLockedFlavors = LZ4MessagePackSerializer .Deserialize <Dictionary <int, int> >((byte[])data.data["lockedFlavors"]); } catch (Exception err) { Debug.Log($"[Agent Trainer] Failed to load extended data.\n{err}"); return; } lockedStats = newLockedStats; lockedDesires = newLockedDesires; lockedFlavors = newLockedFlavors; } }
public void sendDataforRemoteRecorder(string Dal, string virtualhost, Rec rec) { try { CustomBase cb = new CustomBase(); CustomServiceBase s = base.GetInstanceService("Security Manager Remote Recorder"); s.SetData(Dal, virtualhost, rec); } catch(Exception e) { InitializeLogger.L.Log(LogType.FILE, LogLevel.DEBUG, e.Message); InitializeLogger.L.Log(LogType.FILE, LogLevel.DEBUG, e.StackTrace); } InitializeLogger.L.Log(LogType.FILE, LogLevel.DEBUG, "sendDataforRemoteRecorder is finished"); }
private void RegisterCustomSubCategories(object sender, RegisterSubCategoriesEvent e) { CustomBase cbase = Singleton <CustomBase> .Instance; Transform camLight = GameObject.Find("CharaCustom/CustomControl/CharaCamera/Main Camera/Lights Custom/Directional Light Key").transform; Transform backLight = GameObject.Find("CharaCustom/CustomControl/CharaCamera/Main Camera/Lights Custom/Directional Light Back").transform; lockCamlightToggle = e.AddSidebarControl(new SidebarToggle("Lock Cameralight", DefaultLockCameralight.Value, this)); lockCamlightToggle.ValueChanged.Subscribe(x => { if (camLight == null) { return; } if (x) { oldParent = camLight.parent.gameObject; newParent = new GameObject("CamLightLock"); newParent.transform.position = oldParent.transform.position; newParent.transform.eulerAngles = oldParent.transform.eulerAngles; camLight.parent = newParent.transform; } else if (oldParent != null) { camLight.parent = oldParent.transform; cbase.ResetLightSetting(); Destroy(newParent); newParent = null; } }); backlightToggle = e.AddSidebarControl(new SidebarToggle("Toggle Backlight", DefaultBacklight.Value, this)); backlightToggle.ValueChanged.Subscribe(b => { backLight.gameObject.SetActive(b); }); blinkingToggle = e.AddSidebarControl(new SidebarToggle("Toggle Blinking", DefaultBlinking.Value, this)); blinkingToggle.ValueChanged.Subscribe(b => { MakerAPI.GetCharacterControl().ChangeEyesBlinkFlag(b); }); }
public static bool FixIKSpam(CustomBase __instance) { // Disable IK updates in maker to prevent chicken chikas when using ABMX modifiers if (DisableIKCalc.Value) { return(false); } if (__instance.motionIK != null && (lastAnimeStateName != __instance.animeStateName | UpdateIKCalc_manualRun)) { UpdateIKCalc_manualRun = false; lastAnimeStateName = __instance.animeStateName; __instance.motionIK.Calc(__instance.animeStateName); } return(false); }
void Draw_Agents() { GUILayout.BeginVertical(GUILayout.ExpandHeight(true)); { GUILayout.Label("Agents", sectionLabelStyle); foreach (StatsController controller in controllers) { if (controller.ChaControl == null) { if (this.controller == controller) { this.controller = null; } controllersDump.Add(controller); continue; } string label; if (CustomBase.IsInstance() && CustomBase.Instance.chaCtrl == controller.ChaControl) { label = "[New Agent]"; } else if (controller.agent != null) { label = $"[{controller.id}]: {controller.agent.CharaName}"; } else { label = $"[?]: {controller.ChaControl.chaFile.charaFileName}"; } GUIStyle style = this.controller == controller ? selectedButtonStyle : GUI.skin.button; if (GUILayout.Button(label, style, GUILayout.Width(AGENTS_WIDTH))) { this.controller = controller; } } } GUILayout.EndVertical(); }
internal static void ToggleOnPointerClickPrefix(Toggle __instance, ref PointerEventData eventData, out Toggle __state) { __state = null; try { Logger.DebugLogDebug(nameof(ToggleOnPointerClickPrefix)); if (!Enabled.Value || eventData.button != PointerEventData.InputButton.Right || __instance == null || __instance.name.IsNullOrEmpty() || !__instance.name.StartsWith(TogglePrefix)) { return; } // everything after this point will fire the default left-click event eventData.button = PointerEventData.InputButton.Left; if (__instance.name == AutoToggleName) { return; } var autoEnabled = (CustomBase.IsInstance() && CustomBase.Instance.autoClothesState) || (Game.IsInstance() && Game.Instance.Player.changeClothesType < 0); if (!autoEnabled) { return; } Toggle autoToggle = null; __instance.group.SafeProc(g => autoToggle = g.ActiveToggles().FirstOrDefault(t => t.name == AutoToggleName)); __state = autoToggle; } catch (Exception err) { Logger.LogException(err, nameof(ToggleOnPointerClickPrefix)); } }
internal void SetPlayerClothesToAutomatic() { if (Game.IsInstance()) { var player = Singleton <Game> .Instance.Player; if (player != null) { player.changeClothesType = -1; } } if (CustomBase.IsInstance()) { var customBase = Singleton <CustomBase> .Instance; if (customBase != null) { customBase.autoClothesState = true; } } }
public static ChaFileAccessory.PartsInfo GetPartsInfo(int index) { if (!CustomBase.IsInstance()) { throw new InvalidOperationException("Can only call GetPartsInfo when inside Chara Maker"); } var control = CustomBase.instance.chaCtrl; if (control == null) { throw new InvalidOperationException("Chara Maker Not Ready"); } var parts = control.nowCoordinate.accessory.parts; if (parts.Length <= index) { return(new ChaFileAccessory.PartsInfo()); } return(parts[index]); }
public static void Postfix_CvsO_CharaLoad_Start(CvsO_CharaLoad __instance, ref CustomCharaWindow ___charaLoadWin) { Action <CustomCharaFileInfo, int> act = ___charaLoadWin.onClick03; ___charaLoadWin.onClick03 = (info, flags) => { act(info, flags); CustomBase customBase = CustomBase.Instance; ChaControl chaCtrl = customBase.chaCtrl; if (0 != (flags & 16) && customBase.modeNew) { ChaFileControl dummy = new ChaFileControl(); if (dummy.LoadCharaFile(info.FullPath, chaCtrl.sex, true, true)) { chaCtrl.fileGameInfo.Copy(dummy.gameinfo); } } }; }
public void Test(string dllPath) { try { Assembly testAssembly = Assembly.LoadFile(dllPath); Type type = testAssembly.GetType("Parser.IISV_7_1_0Recorder"); object instance = Activator.CreateInstance(type); CustomBase customBase = new CustomBase(); Type myType = typeof(CustomBase); string iisLogFileLocation = @"C:\tmp\"; PropertyInfo propertyInfo = type.GetProperty("Text"); PropertyInfo propertyInfoDir = type.GetProperty("Dir"); FieldInfo[] myFields = myType.GetFields(BindingFlags.Public | BindingFlags.Instance); Console.WriteLine("\nDisplaying the values of the fields of {0}.\n",myType); for (int i = 0; i < myFields.Length; i++) { Console.WriteLine("The value of {0} is: {1}", myFields[i].Name, myFields[i].GetValue(instance)); } propertyInfoDir.SetValue(instance, iisLogFileLocation, null); var Init = (string) type.InvokeMember("Init", BindingFlags.InvokeMethod | BindingFlags.Instance | BindingFlags.Public, null, instance, null); Console.WriteLine("Dir: "); Console.ReadLine(); } catch (Exception exception) { Console.WriteLine(exception.Message); } }
internal static void ToggleOnPointerClickPrefix(Toggle __instance, ref PointerEventData eventData, out Toggle __state) { Logger.DebugLogDebug("ToggleOnPointerClickPrefix"); __state = null; if (!Enabled.Value || eventData.button != PointerEventData.InputButton.Right || __instance == null || __instance.name == null || !__instance.name.StartsWith(TogglePrefix)) { return; } // everything after this point will fire the default left-click event eventData.button = PointerEventData.InputButton.Left; if (__instance.name == AutoToggleName) { return; } var autoEnabled = (CustomBase.IsInstance() && Singleton <CustomBase> .Instance.autoClothesState) || (Game.IsInstance() && Singleton <Game> .Instance.Player.changeClothesType < 0); if (!autoEnabled) { return; } var togglesField = Traverse.Create(__instance.group).Field("m_Toggles"); __state = togglesField.FieldExists() ? togglesField.GetValue <List <Toggle> >().FirstOrDefault(t => t.name == AutoToggleName) : null; }
private Rec LogKod_PIX_5_335004(string args, CustomBase.Rec rec) { try { //172.16.200.253:514 : local7.info %PIX-6-335004: NAC is disabled for host - 172.16.200.25. string[] dLogParse = args.Split('%')[0].Trim().Split(' '); rec.EventCategory = dLogParse[dLogParse.Length - 1]; rec.ComputerName = dLogParse[0]; args = args.Split('%')[1].Replace("PIX-5-335004:", "").Trim(); rec.Description = args; return rec; } catch (Exception exp) { L.LogTimed(LogType.FILE, LogLevel.ERROR, "LogKod_PIX_5_335004() | " + exp.ToString()); L.LogTimed(LogType.FILE, LogLevel.ERROR, "LogKod_PIX_5_335004() | Line : " + args); return rec; } }
static void virusFound(ref CustomBase.Rec r, String line) { int file = 0; String[] arr = new String[100]; arr = line.Split(','); for (int i = 1; i < arr.Length; i++) { // string[] temp = new String[100]; string[] temp2 = new String[100]; Boolean b; b = arr[i].Contains("Event time"); if (b == false) { //tüm par için temp = arr[i].Split(':'); // temp kontrolü : olmayan satýrlar için if (temp.Length > 1) { Allocate2(ref r, temp[0], temp[1].TrimEnd()); if (temp[0] == "Occurrences") { file = i; } } } else if (b == true) { //dateandtime için sadece //2009-03-09 09:00:00 temp2 = SpaceSplit(arr[i], false); String date = temp2[2].Trim().Replace('-', '/') + " " + temp2[3].Trim(); DateTime dt = Convert.ToDateTime(date); r.Datetime = dt.AddMinutes(zone).ToString("yyyy/MM/dd HH:mm:ss"); CLogger L2 = new CLogger(); L2.Log(LogType.FILE, LogLevel.DEBUG, "date" + date); } } //virus file r.CustomStr10 = arr[file + 1]; }
private Rec LogKod_PIX_7_715047(string args, CustomBase.Rec rec) { try { //172.16.200.253:514 : local7.debug //%PIX-7-713236: IP = 81.213.182.130, //IKE_DECODE SENDING Message (msgid=d40e0a9b) with payloads : HDR + HASH (8) + NOTIFY (11) + NONE (0) //total length : 88 string[] dLogParse = args.Split('%')[0].Trim().Split(' '); rec.EventCategory = dLogParse[dLogParse.Length - 1]; rec.ComputerName = dLogParse[0]; args = args.Split('%')[1].Replace("PIX-7-715047:", "").Trim(); string[] dKey = args.Split(','); for (int i = 0; i < dKey.Length; i++) { if (dKey[i].Contains("Group") == true) rec.CustomStr8 = dKey[i].Split('=')[1]; else if (dKey[i].Contains("Username") == true) rec.UserName = dKey[i].Split('=')[1]; else if (dKey[i].Contains("IP =") == true) rec.CustomStr3 = dKey[i].Split('=')[1]; else rec.Description += dKey[i] + " "; } return rec; } catch (Exception exp) { L.LogTimed(LogType.FILE, LogLevel.ERROR, "LogKod_PIX_7_715047 () | " + exp.ToString()); L.LogTimed(LogType.FILE, LogLevel.ERROR, "LogKod_PIX_7_715047 () | Line : " + args); return rec; } }
static void contentPackage(ref CustomBase.Rec r, String line) { String[] arr = new String[100]; arr = line.Split(','); string[] arr2 = new String[100]; arr2 = SpaceSplit(arr[0], false); //arr2 = null; r.CustomStr4 = arr[4]; r.UserName = arr[5]; r.Datetime = dateandtime(arr2[3], arr2[4], arr2[5]); }
static void LiveUpdate(ref CustomBase.Rec r, String line) { String[] arr = new String[100]; arr = line.Split(','); string[] arr2 = new String[100]; arr2 = SpaceSplit(arr[0], false); r.Description = arr[2]; r.Datetime = dateandtime(arr2[3], arr2[4], arr2[5]); }
void parsIPS(ref CustomBase.Rec r, string line, string line2) { L.Log(LogType.FILE, LogLevel.INFORM, "parsIPS"); L.Log(LogType.FILE, LogLevel.INFORM, "line : " + line); L.Log(LogType.FILE, LogLevel.INFORM, "line2 : " + line2); #region AttackIPS string tarih = ""; line2 = line2.Trim('"'); switch (line.ToLower()) { case "date": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting date--"); tarih += line2 + " "; } break; case "time": { tarih += line2; r.Datetime = Convert.ToDateTime(tarih).AddMinutes(zone).ToString("yyyy/MM/dd HH:mm:ss"); } break; case "devname": { // L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting devname--"); r.ComputerName = line2; } break; case "msg": { // L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting device id--"); r.CustomStr1 = line2; } break; case "log_id": { // L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting log id--"); r.EventId = Convert.ToInt32(line2); } break; case "type": { // L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting type--"); r.EventType = line2; } break; case "subtype": { // L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting subtype--"); //tcp_reassembler: TCP.Data.On.SYN seq 125068724 ack 2030626367 flags AS string[] parts = line2.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); r.CustomStr2 = parts[0].Trim() + " " + parts[1].Trim(); } break; case "sensor": { // L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting pri--"); r.CustomStr9 = line2; } break; case "ref": { // L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting vd--"); r.CustomStr10 = line2; } break; case "user": { // L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting user--"); r.UserName = line2; } break; case "group": r.CustomStr6 = line2; break; case "policyid": { // L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting policy id--"); r.Recordnum = Convert.ToInt32(line2); } break; case "service": { // L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting service--"); r.CustomStr7 = line2; } break; case "src": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting src--"); r.CustomStr3 = line2; } break; case "dst": { r.CustomStr4 = line2; } break; case "dstname": { r.CustomStr4 = line2; } break; case "src_int": { // L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting src int--"); r.CustomStr5 = line2; } break; case "src_port": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting sport--"); try { r.CustomInt1 = Convert.ToInt32(line2); } catch { r.CustomInt1 = -1; } } break; case "dst_port": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting dst_port--"); try { r.CustomInt2 = Convert.ToInt32(line2); } catch { r.CustomInt2 = -1; } } break; case "attack_id": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting attack_id--"); try { r.CustomInt3 = Convert.ToInt32(line2); } catch { r.CustomInt3 = -1; } } break; case "count": { // L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting count--"); try { r.CustomInt4 = Convert.ToInt32(line2); } catch { r.CustomInt4 = -1; } } break; case "status": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting status--"); r.EventCategory = line2; } break; case "severity": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting severity--"); r.CustomStr8 = line2; } break; default: { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting description--"); r.Description += " | " + line + " = " + line2; //L.Log(LogType.FILE, LogLevel.DEBUG, r.Description.ToString()); } break; }; #endregion }
public virtual void OnCustom(CustomBase c) { }
private Rec LogKod_PIX_6_302013(string args, CustomBase.Rec rec) { try { //172.16.200.253:514 : local7.info //%PIX-6-302013: //Built inbound TCP connection 49211668 for //outside:172.28.87.1/1086 (172.28.87.1/1086) to //inside:10.1.33.110/7777 (10.1.33.110/7777) string[] dLogParse = args.Split('%')[0].Trim().Split(' '); rec.EventCategory = dLogParse[dLogParse.Length - 1]; rec.ComputerName = dLogParse[0]; args = args.Split('%')[1].Replace("PIX-6-302013:", "").Trim(); args = args.Replace(" for ", "*").Replace(" to ", "*"); string[] dMessage = args.Split('*'); rec.EventType = dMessage[0]; if (dMessage[1].Contains("outside") == true) { rec.CustomStr4 = dMessage[1].Split(':')[1].Split('(')[0].Split('/')[0];//172.28.87.1/1086 rec.CustomInt2 = Convert.ToInt32(dMessage[1].Split(':')[1].Split('(')[0].Split('/')[1]);//10.1.33.110/7777 rec.CustomStr6 = dMessage[1].Substring(dMessage[1].IndexOf('(') + 1, dMessage[1].IndexOf(')') - dMessage[1].IndexOf('(') - 1);//(172.28.87.1/1086) parantezi ici sadece } if (dMessage[2].Contains("inside") == true) { rec.CustomStr3 = dMessage[1].Split(':')[1].Split('(')[0].Split('/')[0];//172.28.87.1/1086 rec.CustomInt1 = Convert.ToInt32(dMessage[1].Split(':')[1].Split('(')[0].Split('/')[1]);//10.1.33.110/7777 rec.CustomStr5 = dMessage[1].Substring(dMessage[1].IndexOf('(') + 1, dMessage[1].IndexOf(')') - dMessage[1].IndexOf('(') - 1);//(172.28.87.1/1086) parantezi ici sadece } return rec; } catch (Exception exp) { L.LogTimed(LogType.FILE, LogLevel.ERROR, "LogKod_PIX_6_302013 () | " + exp.ToString()); L.LogTimed(LogType.FILE, LogLevel.ERROR, "LogKod_PIX_6_302013 () | Line : " + args); return rec; } }
private Rec LogKod_PIX_6_302014(string args, CustomBase.Rec rec) { try { //gelen log formatý //172.16.200.253:514 : local7.info //%PIX-6-302014: //Teardown TCP connection 49211250 for //outside:172.28.60.1/1128 to //inside:10.1.33.110/7777 duration 0:00:28 bytes 23897 TCP FINs string[] dLogParse = args.Split('%')[0].Trim().Split(' '); rec.EventCategory = dLogParse[dLogParse.Length - 1]; rec.ComputerName = dLogParse[0]; args = args.Split('%')[1].Replace("PIX-6-302014:", "").Trim(); args = args.Replace(" for ", "*").Replace(" to ", "*"); string[] dMessage = args.Split('*'); rec.EventType = dMessage[0]; if (dMessage[1].Contains("outside") == true) { rec.CustomStr4 = dMessage[1].Split(':')[1].Split('/')[0];//172.28.60.1 rec.CustomInt2 = Convert.ToInt32(dMessage[1].Split(':')[1].Split('/')[1]);//1128 } if (dMessage.Length > 2) { string[] Tlist = dMessage[2].Split(' '); for (int i = 0; i < Tlist.Length; i++) { if (Tlist[i].Contains("inside") == true) { rec.CustomStr3 = Tlist[i].Split(':')[1].Split('/')[0]; rec.CustomInt1 = Convert.ToInt32(Tlist[i].Split(':')[1].Split('/')[1]); } if (Tlist[i].Contains("duration") == true) rec.CustomStr10 = Tlist[i + 1]; if (Tlist[i].Contains("bytes") == true) rec.CustomStr9 = Tlist[i + 1]; } } return rec; } catch (Exception exp) { L.LogTimed(LogType.FILE, LogLevel.ERROR, "LogKod_PIX_6_302014 () | " + exp.ToString()); L.LogTimed(LogType.FILE, LogLevel.ERROR, "LogKod_PIX_6_302014 () | Line : " + args); return rec; } }
private Rec LogKod_PIX_6_106015(string args, CustomBase.Rec rec) { try { //172.16.200.253:514 : local7.info %PIX-6-106015: //Deny TCP (no connection) //from 10.1.33.110/7777 to 172.16.200.25/1314 flags RST ACK on interface inside string[] dLogParse = args.Split('%')[0].Trim().Split(' '); rec.EventCategory = dLogParse[dLogParse.Length - 1]; rec.ComputerName = dLogParse[0]; args = args.Split('%')[1].Replace("PIX-6-106015:", "").Trim(); if (args.Contains("from ") == true) rec.EventType = args.Substring(0, args.IndexOf("from ")).Trim(); if (args.Contains(" from ") == true) if (args.Contains(" to ") == true) rec.CustomStr3 = args.Substring(args.IndexOf(" from ") + 6, args.IndexOf(" to ") - args.IndexOf(" from ") - 6).Trim(); if (args.Contains(" to ") == true) if (args.Contains(" flags ") == true) rec.CustomStr4 = args.Substring(args.IndexOf(" to ") + 4, args.IndexOf(" flags ") - args.IndexOf(" to ") - 4).Trim(); if (args.Contains(" on ") == true) rec.CustomStr4 = args.Substring(args.IndexOf(" on ") + 4, args.Length - args.IndexOf(" on ") - 4).Trim(); return rec; } catch (Exception exp) { L.LogTimed(LogType.FILE, LogLevel.ERROR, "LogKod_PIX_6_106015 () | " + exp.ToString()); L.LogTimed(LogType.FILE, LogLevel.ERROR, "LogKod_PIX_6_106015 () | Line= " + args); return rec; } }
private Rec LogKod_PIX_5_713120(string args, CustomBase.Rec rec) { try { // 172.16.200.253:514 : local7.debug %PIX-7-713204: Group = hassan, Username = hassan, IP = 81.213.182.130, Adding static route for client address: 172.16.200.25 string[] dLogParse = args.Split('%')[0].Trim().Split(' '); rec.EventCategory = dLogParse[dLogParse.Length - 1]; rec.ComputerName = dLogParse[0]; args = args.Split('%')[1].Replace("PIX-5-713120:", "").Trim(); string[] dKey = args.Split(','); for (int i = 0; i < dKey.Length; i++) { if (dKey[i].Contains("Group") == true) rec.CustomStr8 = dKey[i].Split('=')[1]; else if (dKey[i].Contains("Username") == true) rec.UserName = dKey[i].Split('=')[1]; else if (dKey[i].Contains("IP =") == true) rec.CustomStr3 = dKey[i].Split('=')[1]; else rec.Description += dKey[i] + " "; } return rec; } catch (Exception exp) { L.LogTimed(LogType.FILE, LogLevel.ERROR, "LogKod_PIX_5_713120 () | " + exp.ToString()); L.LogTimed(LogType.FILE, LogLevel.ERROR, "LogKod_PIX_5_713120 () Line : | " + args); return rec; } }
private Rec LogKod_PIX_5_713049(string args, CustomBase.Rec rec) { try { //172.16.200.253:514 : local7.notice %PIX-5-713049: Group = hassan, Username = hassan, IP = 81.213.182.130, //Security negotiation complete for //User (hassan) Responder, Inbound SPI = 0x24d9b204, Outbound SPI = 0xf4491cfd string[] dLogParse = args.Split('%')[0].Trim().Split(' '); rec.EventCategory = dLogParse[dLogParse.Length - 1]; rec.ComputerName = dLogParse[0]; args = args.Split('%')[1].Replace("PIX-5-713049:", "").Trim(); string[] dKey = args.Split(','); for (int i = 0; i < dKey.Length; i++) { if (dKey[i].Contains("Group =") == true) rec.CustomStr8 = dKey[i].Split('=')[1]; else if (dKey[i].Contains("Username") == true) rec.UserName = dKey[i].Split('=')[1]; else if (dKey[i].Contains("IP =") == true) rec.CustomStr3 = dKey[i].Split('=')[1]; else if (dKey[i].Contains("Group (") == true) rec.CustomStr8 = dKey[i].Substring(dKey[i].IndexOf('(') + 1, dKey[i].IndexOf(')') - dKey[i].IndexOf('(') - 1); else rec.Description += dKey[i] + " "; } return rec; } catch (Exception exp) { L.LogTimed(LogType.FILE, LogLevel.ERROR, "LogKod_PIX_5_713049 () | " + exp.ToString()); L.LogTimed(LogType.FILE, LogLevel.ERROR, "LogKod_PIX_5_713049 () | Line : " + args); return rec; } }
private Rec LogKod_PIX_7_715022(string args, CustomBase.Rec rec) { try { //172.16.200.253:514 : local7.debug //%PIX-7-715022: //Group = hassan, Username = hassan, IP = 81.213.182.130, Resume Quick Mode processing, Cert/Trans Exch/RM DSID completed string[] dLogParse = args.Split('%')[0].Trim().Split(' '); rec.EventCategory = dLogParse[dLogParse.Length - 1]; rec.ComputerName = dLogParse[0]; args = args.Split('%')[1].Replace("PIX-7-715022:", "").Trim(); string[] dKey = args.Split(','); for (int i = 0; i < dKey.Length; i++) { if (dKey[i].Contains("Group") == true) rec.CustomStr8 = dKey[i].Split('=')[1]; else if (dKey[i].Contains("Username") == true) rec.UserName = dKey[i].Split('=')[1]; else if (dKey[i].Contains("IP =") == true) rec.CustomStr3 = dKey[i].Split('=')[1]; else rec.Description += dKey[i] + " "; } return rec; } catch (Exception exp) { L.LogTimed(LogType.FILE, LogLevel.ERROR, "LogKod_PIX_7_715022 () | " + exp.ToString()); L.LogTimed(LogType.FILE, LogLevel.ERROR, "LogKod_PIX_7_715022 () | Line : " + args); return rec; } }
void parsTRAFFIC(ref CustomBase.Rec r, string line, string line2) { L.Log(LogType.FILE, LogLevel.INFORM, "parsTRAFFIC"); L.Log(LogType.FILE, LogLevel.INFORM, "Line: " + line); L.Log(LogType.FILE, LogLevel.INFORM, "Line2: " + line2); #region Traffic string tarih = ""; line2 = line2.Trim('"'); switch (line.ToLower()) { case "date": { // L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting date--"); tarih += line2 + " "; } break; case "time": { tarih += line2; r.Datetime = Convert.ToDateTime(tarih).AddMinutes(zone).ToString("yyyy/MM/dd HH:mm:ss"); } break; case "devname": { // L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting devname--"); r.ComputerName = line2; } break; case "device_id": { // L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting device id--"); r.CustomStr1 = line2; } break; case "log_id": { // L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting log id--"); r.EventId = Convert.ToInt32(line2); } break; case "type": { // L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting type--"); r.EventType = line2; } break; case "subtype": { // L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting subtype--"); r.CustomStr2 = line2; } break; case "pri": { // L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting pri--"); r.CustomStr9 = line2; } break; case "vd": { // L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting vd--"); r.CustomStr10 = line2; } break; case "sn": { // L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting sn--"); r.CustomInt6 = Convert.ToInt64(line2); } break; case "duration": { // L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting duration--"); r.CustomInt4 = Convert.ToInt32(line2); } break; case "user": { // L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting user--"); r.UserName = line2; } break; case "group": r.CustomStr6 = line2; break; case "ou": r.CustomStr6 = r.CustomStr6.ToString() + ", " + line + "=" + line2; break; case "policyid": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting policy id--"); r.Recordnum = Convert.ToInt32(line2); } break; // case "proto": // r.CustomInt4 = Convert.ToInt32(line2); // break; case "service": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting service--"); r.CustomStr7 = line2; } break; case "app_tpye": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting app type--"); r.CustomStr8 = line2; } break; case "src": { // L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting src--"); r.CustomStr3 = line2; } break; case "dst": { r.CustomStr4 = line2; } break; case "dstname": { r.CustomStr4 = line2; } break; case "sent": r.CustomInt9 = Convert.ToInt32(line2); break; case "rcvd": r.CustomInt10 = Convert.ToInt32(line2); break; case "src_int": { //20.07.2009 //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting src int--"); r.CustomStr5 = line2; } break; case "dst_port": r.CustomInt2 = Convert.ToInt32(line2); break; // case "srcname": // r.CustomInt6 = Convert.ToInt32(line2); // break; case "src_port": { // L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting sport--"); try { r.CustomInt1 = Convert.ToInt32(line2); } catch { r.CustomInt1 = -1; } } break; case "status": { r.EventCategory = line2; } break; default: { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting description--"); r.Description += " | " + line + "=" + line2; //L.Log(LogType.FILE, LogLevel.DEBUG, r.CustomStr8.ToString()); } break; }; #endregion }
public override void OnCustom(CustomBase c) { acsmenu = Object.FindObjectOfType <CustomAcsChangeSlot>(); custom = c; }
public void Initialize(int _parts, int _idx, int titleNo) { this.parts = _parts; this.idx = _idx; if (this.parts == -1 || this.idx == -1) { return; } ChaFileHair.PartsInfo.BundleInfo bi; if (this.hair.parts[this.parts].dictBundle.TryGetValue(this.idx, out bi)) { this.ssMove[0].SetInputTextValue(CustomBase.ConvertTextFromRate(0, 100, (float)bi.moveRate.x)); this.ssMove[1].SetInputTextValue(CustomBase.ConvertTextFromRate(0, 100, (float)bi.moveRate.y)); this.ssMove[2].SetInputTextValue(CustomBase.ConvertTextFromRate(0, 100, (float)bi.moveRate.z)); this.ssRot[0].SetInputTextValue(CustomBase.ConvertTextFromRate(0, 100, (float)bi.rotRate.x)); this.ssRot[1].SetInputTextValue(CustomBase.ConvertTextFromRate(0, 100, (float)bi.rotRate.y)); this.ssRot[2].SetInputTextValue(CustomBase.ConvertTextFromRate(0, 100, (float)bi.rotRate.z)); Vector3 vDefPosRate; this.chaCtrl.GetDefaultHairCorrectPosRate(this.parts, this.idx, out vDefPosRate); Vector3 vDefRotRate; this.chaCtrl.GetDefaultHairCorrectRotRate(this.parts, this.idx, out vDefRotRate); this.ssMove[0].onChange = (Action <float>)(value => { Vector3 vector3; ((Vector3) ref vector3).\u002Ector(value, (float)bi.moveRate.y, (float)bi.moveRate.z); if (this.ctrlTogether && !this.reset && !this.cvsH_Hair.allReset) { foreach (KeyValuePair <int, ChaFileHair.PartsInfo.BundleInfo> keyValuePair in this.hair.parts[this.parts].dictBundle) { keyValuePair.Value.moveRate = vector3; } this.chaCtrl.ChangeSettingHairCorrectPosAll(this.parts); this.cvsH_Hair.UpdateAllBundleUI(this.idx); } else { bi.moveRate = vector3; this.chaCtrl.ChangeSettingHairCorrectPos(this.parts, this.idx); } }); this.ssMove[0].onSetDefaultValue = (Func <float>)(() => { this.reset = true; return((float)vDefPosRate.x); }); this.ssMove[0].onEndSetDefaultValue = (Action)(() => this.reset = false); this.ssMove[1].onChange = (Action <float>)(value => { Vector3 vector3; ((Vector3) ref vector3).\u002Ector((float)bi.moveRate.x, value, (float)bi.moveRate.z); if (this.ctrlTogether && !this.reset && !this.cvsH_Hair.allReset) { foreach (KeyValuePair <int, ChaFileHair.PartsInfo.BundleInfo> keyValuePair in this.hair.parts[this.parts].dictBundle) { keyValuePair.Value.moveRate = vector3; } this.chaCtrl.ChangeSettingHairCorrectPosAll(this.parts); this.cvsH_Hair.UpdateAllBundleUI(this.idx); } else { bi.moveRate = vector3; this.chaCtrl.ChangeSettingHairCorrectPos(this.parts, this.idx); } }); this.ssMove[1].onSetDefaultValue = (Func <float>)(() => { this.reset = true; return((float)vDefPosRate.y); }); this.ssMove[1].onEndSetDefaultValue = (Action)(() => this.reset = false); this.ssMove[2].onChange = (Action <float>)(value => { Vector3 vector3; ((Vector3) ref vector3).\u002Ector((float)bi.moveRate.x, (float)bi.moveRate.y, value); if (this.ctrlTogether && !this.reset && !this.cvsH_Hair.allReset) { foreach (KeyValuePair <int, ChaFileHair.PartsInfo.BundleInfo> keyValuePair in this.hair.parts[this.parts].dictBundle) { keyValuePair.Value.moveRate = vector3; } this.chaCtrl.ChangeSettingHairCorrectPosAll(this.parts); this.cvsH_Hair.UpdateAllBundleUI(this.idx); } else { bi.moveRate = vector3; this.chaCtrl.ChangeSettingHairCorrectPos(this.parts, this.idx); } }); this.ssMove[2].onSetDefaultValue = (Func <float>)(() => { this.reset = true; return((float)vDefPosRate.z); }); this.ssMove[2].onEndSetDefaultValue = (Action)(() => this.reset = false); this.ssRot[0].onChange = (Action <float>)(value => { Vector3 vector3; ((Vector3) ref vector3).\u002Ector(value, (float)bi.rotRate.y, (float)bi.rotRate.z); if (this.ctrlTogether && !this.reset && !this.cvsH_Hair.allReset) { foreach (KeyValuePair <int, ChaFileHair.PartsInfo.BundleInfo> keyValuePair in this.hair.parts[this.parts].dictBundle) { keyValuePair.Value.rotRate = vector3; } this.chaCtrl.ChangeSettingHairCorrectRotAll(this.parts); this.cvsH_Hair.UpdateAllBundleUI(this.idx); } else { bi.rotRate = vector3; this.chaCtrl.ChangeSettingHairCorrectRot(this.parts, this.idx); } }); this.ssRot[0].onSetDefaultValue = (Func <float>)(() => { this.reset = true; return((float)vDefRotRate.x); }); this.ssRot[0].onEndSetDefaultValue = (Action)(() => this.reset = false); this.ssRot[1].onChange = (Action <float>)(value => { Vector3 vector3; ((Vector3) ref vector3).\u002Ector((float)bi.rotRate.x, value, (float)bi.rotRate.z); if (this.ctrlTogether && !this.reset && !this.cvsH_Hair.allReset) { foreach (KeyValuePair <int, ChaFileHair.PartsInfo.BundleInfo> keyValuePair in this.hair.parts[this.parts].dictBundle) { keyValuePair.Value.rotRate = vector3; } this.chaCtrl.ChangeSettingHairCorrectRotAll(this.parts); this.cvsH_Hair.UpdateAllBundleUI(this.idx); } else { bi.rotRate = vector3; this.chaCtrl.ChangeSettingHairCorrectRot(this.parts, this.idx); } }); this.ssRot[1].onSetDefaultValue = (Func <float>)(() => { this.reset = true; return((float)vDefRotRate.y); }); this.ssRot[1].onEndSetDefaultValue = (Action)(() => this.reset = false); this.ssRot[2].onChange = (Action <float>)(value => { Vector3 vector3; ((Vector3) ref vector3).\u002Ector((float)bi.rotRate.x, (float)bi.rotRate.y, value); if (this.ctrlTogether && !this.reset && !this.cvsH_Hair.allReset) { foreach (KeyValuePair <int, ChaFileHair.PartsInfo.BundleInfo> keyValuePair in this.hair.parts[this.parts].dictBundle) { keyValuePair.Value.rotRate = vector3; } this.chaCtrl.ChangeSettingHairCorrectRotAll(this.parts); this.cvsH_Hair.UpdateAllBundleUI(this.idx); } else { bi.rotRate = vector3; this.chaCtrl.ChangeSettingHairCorrectRot(this.parts, this.idx); } }); this.ssRot[2].onSetDefaultValue = (Func <float>)(() => { this.reset = true; return((float)vDefRotRate.z); }); this.ssRot[2].onEndSetDefaultValue = (Action)(() => this.reset = false); if (Object.op_Implicit((Object)this.tglNoShake)) { this.tglNoShake.SetIsOnWithoutCallback(bi.noShake); ObservableExtensions.Subscribe <bool>((IObservable <M0>)UnityUIComponentExtensions.OnValueChangedAsObservable(this.tglNoShake), (Action <M0>)(isOn => { if (bi.noShake == isOn) { return; } bi.noShake = isOn; })); } if (Object.op_Implicit((Object)this.tglGuidDraw)) { this.tglGuidDraw.SetIsOnWithoutCallback(true); ObservableExtensions.Subscribe <bool>((IObservable <M0>)UnityUIComponentExtensions.OnValueChangedAsObservable(this.tglGuidDraw), (Action <M0>)(isOn => { if (!Object.op_Inequality((Object)null, (Object)this.cmpGuid)) { return; } ((Component)this.cmpGuid).get_gameObject().SetActiveIfDifferent(isOn); })); } } if (Object.op_Implicit((Object)this.title)) { this.title.set_text("調整" + titleNo.ToString("00")); } this.UpdateCustomUI(); }
static void Allocate2(ref CustomBase.Rec r, String key, String value) { switch (key) { case "Computer name": r.CustomStr4 = value; break; case "Computer": r.CustomStr4 = value; break; case "Source IP": r.CustomStr3 = value; break; case "IP Address": r.CustomStr3 = value; break; case "Source": r.CustomStr8 = value; break; case "Risk name": r.CustomStr2 = value; break; case "Application type": r.CustomStr2 = value; break; case "Actual action": r.CustomStr5 = value; break; case "Requested action": r.CustomStr6 = value; break; case "Secondary action": r.CustomStr7 = value; break; case "Server": r.ComputerName = value; break; case "User": r.UserName = value; break; case "User1": r.UserName = value; break; case "Duration (seconds)": r.CustomInt10 = Convert.ToInt32(value); break; case "Risks": r.CustomInt9 = Convert.ToInt32(value); break; case "Scanned": r.CustomInt8 = Convert.ToInt32(value); break; case "Threats": r.CustomInt7 = Convert.ToInt32(value); break; case "Infected": r.CustomInt6 = Convert.ToInt32(value); break; case "Total files": r.CustomInt5 = Convert.ToInt32(value); break; case "Omitted": r.CustomInt5 = Convert.ToInt32(value); break; default: r.Description += key + "= "; r.Description += value + " ,"; break; }; }
void parseDLP(ref CustomBase.Rec r, string line, string line2) { L.Log(LogType.FILE, LogLevel.INFORM, "parseDLP"); L.Log(LogType.FILE, LogLevel.INFORM, "line : " + line); L.Log(LogType.FILE, LogLevel.INFORM, "line2 : " + line2); #region DLP string tarih = ""; line2 = line2.Trim('"'); switch (line.ToLower()) { case "date": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting date--"); tarih += line2 + " "; } break; case "time": { tarih += line2; r.Datetime = Convert.ToDateTime(tarih).AddMinutes(zone).ToString("yyyy/MM/dd HH:mm:ss"); } break; case "devname": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting devname--"); r.ComputerName = line2; } break; case "log_id": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting log id--"); r.EventId = Convert.ToInt32(line2); } break; case "msg": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting device id--"); r.CustomStr1 = line2; } break; case "type": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting type--"); r.EventType = line2; } break; case "subtype": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting subtype--"); r.CustomStr2 = line2; } break; case "url": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting url--"); r.CustomStr8 = line2; } break; case "from": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting from--"); r.CustomStr9 = line2; } break; case "to": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting vd--"); r.CustomStr10 = line2; } break; case "user": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting user--"); r.UserName = line2; } break; case "group": r.CustomStr6 = line2; break; case "policyid": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting policy id--"); r.Recordnum = Convert.ToInt32(line2); } break; case "service": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting service--"); r.CustomStr7 = line2; } break; case "src": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting src--"); r.CustomStr3 = line2; } break; case "src_name": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting src--"); r.CustomStr3 = line2; } break; case "dst": { r.CustomStr4 = line2; } break; case "dst_name": { r.CustomStr4 = line2; } break; case "hostname": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting src int--"); r.CustomStr5 = line2; } break; case "src_port": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting sport--"); try { r.CustomInt1 = Convert.ToInt32(line2); } catch { r.CustomInt1 = -1; } } break; case "sport": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting sport--"); try { r.CustomInt1 = Convert.ToInt32(line2); } catch { r.CustomInt1 = -1; } } break; case "dst_port": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting dst_port--"); try { r.CustomInt2 = Convert.ToInt32(line2); } catch { r.CustomInt2 = -1; } } break; case "dport": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting dst_port--"); try { r.CustomInt2 = Convert.ToInt32(line2); } catch { r.CustomInt2 = -1; } } break; case "count": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting count--"); try { r.CustomInt3 = Convert.ToInt32(line2); } catch { r.CustomInt3 = -1; } } break; case "rulename": { if (line2.Contains("\"")) { int ind = line2.IndexOf('"'); line2 = line2.Substring(0, ind); } r.EventCategory = line2; } break; default: { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting description--"); r.Description += " | " + line + " = " + line2; //L.Log(LogType.FILE, LogLevel.DEBUG, r.Description.ToString()); } break; }; #endregion }
static void couldnotScan(ref CustomBase.Rec r, String line) { int file = 0; String[] arr = new String[100]; arr = line.Split(','); String[] arr2 = new String[100]; arr2 = SpaceSplit(arr[0], false); r.CustomStr4 = arr2[8]; //arr2 = null; arr2 = SpaceSplit(line, false); for (int i = 0; i < arr2.Length; i++) { if (arr2[i].Contains("inside")) { file = i; } } r.Datetime = dateandtime(arr2[3], arr2[4], arr2[5]); for (int j = (file + 1); j < arr2.Length; j++) { r.CustomStr10 += arr2[j]; } }
void parseEVENT(ref CustomBase.Rec r, string line, string line2) { L.Log(LogType.FILE, LogLevel.INFORM, "parseEVENT"); L.Log(LogType.FILE, LogLevel.INFORM, "line : " + line); L.Log(LogType.FILE, LogLevel.INFORM, "line2 : " + line2); #region DLP string tarih = ""; line2 = line2.Trim('"'); switch (line.ToLower()) { case "date": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting date--"); tarih += line2 + " "; } break; # region Onur Sarıkaya ekledi. case "dir": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting src--"); r.CustomStr8 = line2; L.Log(LogType.FILE, LogLevel.INFORM, "CustomStr8 : " + line2); } break; #endregion case "time": { tarih += line2; r.Datetime = Convert.ToDateTime(tarih).AddMinutes(zone).ToString("yyyy/MM/dd HH:mm:ss"); } break; case "device_id": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting devname--"); r.CustomStr1 = line2; } break; case "devname": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting devname--"); r.ComputerName = line2; } break; case "log_id": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting log id--"); r.EventId = Convert.ToInt32(line2); } break; case "msg": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting device id--"); r.CustomStr7 = line2; } break; case "type": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting type--"); r.EventType = line2; } break; case "subtype": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting subtype--"); r.CustomStr2 = line2; } break; case "pri": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting from--"); r.CustomStr9 = line2; } break; case "vd": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting vd--"); r.CustomStr10 = line2; } break; case "user": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting user--"); r.UserName = line2; } break; # region Onur Sarıkaya ekledi. case "dhcp_msg": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting src--"); r.CustomStr6 = line2; L.Log(LogType.FILE, LogLevel.INFORM, "CustomStr6 : " + line2); } break; #endregion case "group": r.CustomStr6 = line2; break; case "policyid": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting policy id--"); r.Recordnum = Convert.ToInt32(line2); } break; # region Onur Sarıkaya ekledi. case "hostname": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting src--"); r.CustomStr3 = line2; L.Log(LogType.FILE, LogLevel.INFORM, "CustomStr3 : " + line2); } break; #endregion case "src": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting src--"); r.CustomStr3 = line2; } break; # region Onur Sarıkaya ekledi. case "mac": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting src--"); r.CustomStr4 = line2; L.Log(LogType.FILE, LogLevel.INFORM, "CustomStr4 : " + line2); } break; #endregion case "server": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting src--"); r.CustomStr4 = line2; } break; # region Onur Sarıkaya ekledi. case "ip": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting src--"); r.CustomStr5 = line2; L.Log(LogType.FILE, LogLevel.INFORM, "CustomStr5 : " + line2); } break; #endregion case "action": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting src--"); r.CustomStr5 = line2; } break; case "status": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting src--"); r.EventCategory = line2; } break; # region Onur Sarıkaya ekledi. case "lease": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting src--"); r.CustomInt10 = Convert.ToInt32(line2); L.Log(LogType.FILE, LogLevel.INFORM, "CustomInt10 : " + line2); } break; #endregion default: { L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting description--"); r.Description += " | " + line + " = " + line2; L.Log(LogType.FILE, LogLevel.DEBUG, r.Description.ToString()); } break; }; #endregion }
static void upToDate(ref CustomBase.Rec r, String line) { String[] arr = new String[100]; arr = line.Split(','); String[] arr2 = new String[100]; arr2 = SpaceSplit(arr[0], false); r.CustomStr4 = arr2[8]; //arr2 = null; arr2 = SpaceSplit(line, false); r.Description = arr[3]; //arr2 = null; r.Datetime = dateandtime(arr2[3], arr2[4], arr2[5]); }
public bool ParseXML(string Doc, CustomBase.Rec rec) { int ii = 0; XmlTextReader reader = new XmlTextReader(Doc); string lastRead = ""; while (reader.Read()) { string mainNode = ""; mainNode = reader.Name; if (reader.Name == "Scan") { for (int i = 0; reader.MoveToNextAttribute(); i++) { //Profile == Scan Profile //Created ON == DateTime of the scan if (reader.Name == "Session") { rec.CustomInt10 = Convert.ToInt64(reader.Value); } else if (reader.Name == "Profile") { rec.EventCategory = reader.Value; } else if (reader.Name == "CreatedOn") { rec.Datetime = Convert.ToDateTime(reader.Value).AddMinutes(zone).ToString("yyyy/MM/dd HH:mm:ss.fff"); } } } else if (reader.Name == "hostname") { //hostname reader.Read(); rec.ComputerName = reader.Value; reader.Read(); } else if (reader.Name == "ip") { //host ip reader.Read(); rec.SourceName = reader.Value; reader.Read(); } else if (reader.Name == "missing_hotfixes") { rec.EventType = reader.Name; while (reader.Read()) { mainNode = reader.Name; if (reader.Name == "product") { if (ii % 2 == 0) { for (int i = 0; reader.MoveToNextAttribute(); i++) { //Patch product name if (reader.Name == "name") { rec.CustomStr1 = reader.Value; } } } ii++; } else if (reader.Name == "hotfix") { lastRead = ""; while (reader.Read()) { lastRead = reader.Name; if (reader.Name == "hotfix") { Send_Record(rec); break; } else if (reader.Name == "title") { reader.Read(); rec.CustomStr2 = reader.Value; if (reader.Name != lastRead) reader.Read(); } else if (reader.Name == "severity") { reader.Read(); if (reader.Value == "Low") rec.CustomInt1 = 2; else if (reader.Value == "Moderate") rec.CustomInt1 = 3; else if (reader.Value == "Important") rec.CustomInt1 = 4; else if (reader.Value == "Critical") rec.CustomInt1 = 5; else rec.CustomInt1 = 1; Console.WriteLine(reader.Value); if (reader.Name != lastRead) reader.Read(); } else if (reader.Name == "date") { reader.Read(); rec.CustomStr3 = reader.Value; if (reader.Name != lastRead) reader.Read(); } else if (reader.Name == "filename") { reader.Read(); rec.CustomStr4 = reader.Value; if (reader.Name != lastRead) reader.Read(); } else if (reader.Name == "filesize") { reader.Read(); rec.CustomStr5 = reader.Value; if (reader.Name != lastRead) reader.Read(); } else if (reader.Name == "fileurl") { reader.Read(); rec.CustomStr6 = reader.Value; if (reader.Name != lastRead) reader.Read(); } else if (reader.Name == "fileurl") { reader.Read(); rec.CustomStr6 = reader.Value; if (reader.Name != lastRead) reader.Read(); } } } else if (reader.Name == "missing_hotfixes") { rec.CustomStr1 = ""; rec.CustomStr2 = ""; rec.CustomStr3 = ""; rec.CustomStr4 = ""; rec.CustomStr5 = ""; rec.CustomStr6 = ""; break; } } } else if (reader.Name == "severity") { mainNode = reader.Name; reader.MoveToNextAttribute(); if (reader.Name == "level") { rec.EventType = (mainNode + " " + reader.Name + reader.Value); while (reader.Read()) { if (reader.Name == "backdoor") { { reader.Read(); rec.CustomStr1 = "Backdoor"; rec.CustomStr2 = reader.Value; reader.Read(); L.Log(LogType.FILE, LogLevel.INFORM, rec.LogName + " " + rec.CustomStr1 + " " + rec.CustomStr2); Send_Record(rec); } } else if (reader.Name == "Miscellaneous_Alerts" || reader.Name == "Web_Alerts" || reader.Name == "FTP_Alerts" || reader.Name == "Registry_Alerts" || reader.Name == "Services_Alerts") { rec.CustomStr1 = reader.Name; while (reader.Read()) { if (reader.Name == "alert") { while (reader.Read()) { if (reader.Name == "name") { { reader.Read(); rec.CustomStr2 = reader.Value; reader.Read(); } } else if (reader.Name == "descr") { { reader.Read(); if (reader.Value.Length < 4000) rec.Description = reader.Value; else rec.Description = reader.Value.Substring(0, 3995); reader.Read(); } } else if (reader.Name == "alert") { L.Log(LogType.FILE, LogLevel.INFORM, rec.LogName + " " + rec.CustomStr1 + " " + rec.CustomStr2); Send_Record(rec); break; } } } else if (reader.Name == "Miscellaneous_Alerts" || reader.Name == "Web_Alerts" || reader.Name == "FTP_Alerts" || reader.Name == "Registry_Alerts" || reader.Name == "Services_Alerts") { break; } } } else if (reader.Name == "severity") break; } } } } return true; }
public void Initialize(int _slotNo, int _correctNo) { this.slotNo = _slotNo; this.correctNo = _correctNo; if (this.slotNo == -1 || this.correctNo == -1) { return; } if (Object.op_Implicit((Object)this.title)) { this.title.set_text(string.Format("{0}{1:00}", (object)"調整", (object)(this.correctNo + 1))); } this.UpdateCustomUI(); if (this.lstDisposable != null && this.lstDisposable.Count != 0) { int count = this.lstDisposable.Count; for (int index = 0; index < count; ++index) { this.lstDisposable[index].Dispose(); } } IDisposable disposable = (IDisposable)null; // ISSUE: object of a compiler-generated type is created ((IEnumerable <Toggle>) this.tglPosRate).Select <Toggle, \u003C\u003E__AnonType12 <Toggle, byte> >((Func <Toggle, int, \u003C\u003E__AnonType12 <Toggle, byte> >)((p, i) => new \u003C\u003E__AnonType12 <Toggle, byte>(p, (byte)i))).ToList <\u003C\u003E__AnonType12 <Toggle, byte> >().ForEach((Action <\u003C\u003E__AnonType12 <Toggle, byte> >)(p => { disposable = ObservableExtensions.Subscribe <bool>(Observable.Where <bool>((IObservable <M0>)UnityUIComponentExtensions.OnValueChangedAsObservable(p.toggle), (Func <M0, bool>)(isOn => isOn)), (Action <M0>)(_ => this.acsCtrlSetting.correctSetting[this.correctNo].posRate = (int)p.index)); this.lstDisposable.Add(disposable); })); // ISSUE: object of a compiler-generated type is created ((IEnumerable <Toggle>) this.tglRotRate).Select <Toggle, \u003C\u003E__AnonType12 <Toggle, byte> >((Func <Toggle, int, \u003C\u003E__AnonType12 <Toggle, byte> >)((p, i) => new \u003C\u003E__AnonType12 <Toggle, byte>(p, (byte)i))).ToList <\u003C\u003E__AnonType12 <Toggle, byte> >().ForEach((Action <\u003C\u003E__AnonType12 <Toggle, byte> >)(p => { disposable = ObservableExtensions.Subscribe <bool>(Observable.Where <bool>((IObservable <M0>)UnityUIComponentExtensions.OnValueChangedAsObservable(p.toggle), (Func <M0, bool>)(isOn => isOn)), (Action <M0>)(_ => this.acsCtrlSetting.correctSetting[this.correctNo].rotRate = (int)p.index)); this.lstDisposable.Add(disposable); })); // ISSUE: object of a compiler-generated type is created ((IEnumerable <Toggle>) this.tglSclRate).Select <Toggle, \u003C\u003E__AnonType12 <Toggle, byte> >((Func <Toggle, int, \u003C\u003E__AnonType12 <Toggle, byte> >)((p, i) => new \u003C\u003E__AnonType12 <Toggle, byte>(p, (byte)i))).ToList <\u003C\u003E__AnonType12 <Toggle, byte> >().ForEach((Action <\u003C\u003E__AnonType12 <Toggle, byte> >)(p => { disposable = ObservableExtensions.Subscribe <bool>(Observable.Where <bool>((IObservable <M0>)UnityUIComponentExtensions.OnValueChangedAsObservable(p.toggle), (Func <M0, bool>)(isOn => isOn)), (Action <M0>)(_ => this.acsCtrlSetting.correctSetting[this.correctNo].sclRate = (int)p.index)); this.lstDisposable.Add(disposable); })); float downTimeCnt = 0.0f; float loopTimeCnt = 0.0f; bool change = false; int[] flag = new int[3] { 1, 2, 4 }; // ISSUE: object of a compiler-generated type is created ((IEnumerable <Button>) this.btnPos).Select <Button, \u003C\u003E__AnonType13 <Button, int> >((Func <Button, int, \u003C\u003E__AnonType13 <Button, int> >)((p, i) => new \u003C\u003E__AnonType13 <Button, int>(p, i))).ToList <\u003C\u003E__AnonType13 <Button, int> >().ForEach((Action <\u003C\u003E__AnonType13 <Button, int> >)(p => { disposable = ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(p.btn), (Action <M0>)(_ => { if (change) { return; } int index = p.index / 2; int num = p.index % 2 != 0 ? 1 : -1; if (index == 0) { num *= -1; } this.chaCtrl.SetAccessoryPos(this.slotNo, this.correctNo, (float)num * this.movePosValue[this.acsCtrlSetting.correctSetting[this.correctNo].posRate], true, flag[index]); this.orgAcs.parts[this.slotNo].addMove[this.correctNo, 0] = this.nowAcs.parts[this.slotNo].addMove[this.correctNo, 0]; this.inpPos[index].set_text(((Vector3) ref this.nowAcs.parts[this.slotNo].addMove.Address(this.correctNo, 0)).get_Item(index).ToString()); this.SetControllerTransform(); })); this.lstDisposable.Add(disposable); disposable = (IDisposable)DisposableExtensions.AddTo <IDisposable>((M0)ObservableExtensions.Subscribe <Unit>(Observable.RepeatUntilDestroy <Unit>(Observable.TakeUntil <Unit, PointerEventData>(Observable.SkipUntil <Unit, PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.UpdateAsObservable((Component)p.btn), (IObservable <M1>)Observable.Do <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerDownAsObservable((UIBehaviour)p.btn), (Action <M0>)(_ => { downTimeCnt = 0.0f; loopTimeCnt = 0.0f; change = false; }))), (IObservable <M1>)ObservableTriggerExtensions.OnPointerUpAsObservable((UIBehaviour)p.btn)), (Component)this), (Action <M0>)(_ => { int index = p.index / 2; int num1 = p.index % 2 != 0 ? 1 : -1; if (index == 0) { num1 *= -1; } float num2 = (float)num1 * this.movePosValue[this.acsCtrlSetting.correctSetting[this.correctNo].posRate]; float num3 = 0.0f; downTimeCnt += Time.get_deltaTime(); if ((double)downTimeCnt <= 0.300000011920929) { return; } for (loopTimeCnt += Time.get_deltaTime(); (double)loopTimeCnt > 0.0500000007450581; loopTimeCnt -= 0.05f) { num3 += num2; } if ((double)num3 == 0.0) { return; } this.chaCtrl.SetAccessoryPos(this.slotNo, this.correctNo, num3, true, flag[index]); this.orgAcs.parts[this.slotNo].addMove[this.correctNo, 0] = this.nowAcs.parts[this.slotNo].addMove[this.correctNo, 0]; this.inpPos[index].set_text(((Vector3) ref this.nowAcs.parts[this.slotNo].addMove.Address(this.correctNo, 0)).get_Item(index).ToString()); change = true; this.SetControllerTransform(); })), (Component)this); this.lstDisposable.Add(disposable); })); // ISSUE: object of a compiler-generated type is created ((IEnumerable <InputField>) this.inpPos).Select <InputField, \u003C\u003E__AnonType14 <InputField, int> >((Func <InputField, int, \u003C\u003E__AnonType14 <InputField, int> >)((p, i) => new \u003C\u003E__AnonType14 <InputField, int>(p, i))).ToList <\u003C\u003E__AnonType14 <InputField, int> >().ForEach((Action <\u003C\u003E__AnonType14 <InputField, int> >)(p => { disposable = ObservableExtensions.Subscribe <string>(UnityEventExtensions.AsObservable <string>((UnityEvent <M0>)p.inp.get_onEndEdit()), (Action <M0>)(value => { int index = p.index % 3; float num = CustomBase.ConvertValueFromTextLimit(-100f, 100f, 1, value); p.inp.set_text(num.ToString()); this.chaCtrl.SetAccessoryPos(this.slotNo, this.correctNo, num, false, flag[index]); this.orgAcs.parts[this.slotNo].addMove[this.correctNo, 0] = this.nowAcs.parts[this.slotNo].addMove[this.correctNo, 0]; this.SetControllerTransform(); })); this.lstDisposable.Add(disposable); })); // ISSUE: object of a compiler-generated type is created ((IEnumerable <Button>) this.btnPosReset).Select <Button, \u003C\u003E__AnonType13 <Button, int> >((Func <Button, int, \u003C\u003E__AnonType13 <Button, int> >)((p, i) => new \u003C\u003E__AnonType13 <Button, int>(p, i))).ToList <\u003C\u003E__AnonType13 <Button, int> >().ForEach((Action <\u003C\u003E__AnonType13 <Button, int> >)(p => { disposable = ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(p.btn), (Action <M0>)(_ => { this.inpPos[p.index].set_text("0"); this.chaCtrl.SetAccessoryPos(this.slotNo, this.correctNo, 0.0f, false, flag[p.index]); this.orgAcs.parts[this.slotNo].addMove[this.correctNo, 0] = this.nowAcs.parts[this.slotNo].addMove[this.correctNo, 0]; this.SetControllerTransform(); })); this.lstDisposable.Add(disposable); })); // ISSUE: object of a compiler-generated type is created ((IEnumerable <Button>) this.btnRot).Select <Button, \u003C\u003E__AnonType13 <Button, int> >((Func <Button, int, \u003C\u003E__AnonType13 <Button, int> >)((p, i) => new \u003C\u003E__AnonType13 <Button, int>(p, i))).ToList <\u003C\u003E__AnonType13 <Button, int> >().ForEach((Action <\u003C\u003E__AnonType13 <Button, int> >)(p => { disposable = ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(p.btn), (Action <M0>)(_ => { if (change) { return; } int index = p.index / 2; this.chaCtrl.SetAccessoryRot(this.slotNo, this.correctNo, (p.index % 2 != 0 ? 1f : -1f) * this.moveRotValue[this.acsCtrlSetting.correctSetting[this.correctNo].rotRate], true, flag[index]); this.orgAcs.parts[this.slotNo].addMove[this.correctNo, 1] = this.nowAcs.parts[this.slotNo].addMove[this.correctNo, 1]; this.inpRot[index].set_text(((Vector3) ref this.nowAcs.parts[this.slotNo].addMove.Address(this.correctNo, 1)).get_Item(index).ToString()); this.SetControllerTransform(); })); this.lstDisposable.Add(disposable); disposable = (IDisposable)DisposableExtensions.AddTo <IDisposable>((M0)ObservableExtensions.Subscribe <Unit>(Observable.RepeatUntilDestroy <Unit>(Observable.TakeUntil <Unit, PointerEventData>(Observable.SkipUntil <Unit, PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.UpdateAsObservable((Component)p.btn), (IObservable <M1>)Observable.Do <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerDownAsObservable((UIBehaviour)p.btn), (Action <M0>)(_ => { downTimeCnt = 0.0f; loopTimeCnt = 0.0f; change = false; }))), (IObservable <M1>)ObservableTriggerExtensions.OnPointerUpAsObservable((UIBehaviour)p.btn)), (Component)this), (Action <M0>)(_ => { int index = p.index / 2; float num1 = (p.index % 2 != 0 ? 1f : -1f) * this.moveRotValue[this.acsCtrlSetting.correctSetting[this.correctNo].rotRate]; float num2 = 0.0f; downTimeCnt += Time.get_deltaTime(); if ((double)downTimeCnt <= 0.300000011920929) { return; } for (loopTimeCnt += Time.get_deltaTime(); (double)loopTimeCnt > 0.0500000007450581; loopTimeCnt -= 0.05f) { num2 += num1; } if ((double)num2 == 0.0) { return; } this.chaCtrl.SetAccessoryRot(this.slotNo, this.correctNo, num2, true, flag[index]); this.orgAcs.parts[this.slotNo].addMove[this.correctNo, 1] = this.nowAcs.parts[this.slotNo].addMove[this.correctNo, 1]; this.inpRot[index].set_text(((Vector3) ref this.nowAcs.parts[this.slotNo].addMove.Address(this.correctNo, 1)).get_Item(index).ToString()); change = true; this.SetControllerTransform(); })), (Component)this); this.lstDisposable.Add(disposable); })); // ISSUE: object of a compiler-generated type is created ((IEnumerable <InputField>) this.inpRot).Select <InputField, \u003C\u003E__AnonType14 <InputField, int> >((Func <InputField, int, \u003C\u003E__AnonType14 <InputField, int> >)((p, i) => new \u003C\u003E__AnonType14 <InputField, int>(p, i))).ToList <\u003C\u003E__AnonType14 <InputField, int> >().ForEach((Action <\u003C\u003E__AnonType14 <InputField, int> >)(p => { disposable = ObservableExtensions.Subscribe <string>(UnityEventExtensions.AsObservable <string>((UnityEvent <M0>)p.inp.get_onEndEdit()), (Action <M0>)(value => { int index = p.index % 3; float num = CustomBase.ConvertValueFromTextLimit(0.0f, 360f, 0, value); p.inp.set_text(num.ToString()); this.chaCtrl.SetAccessoryRot(this.slotNo, this.correctNo, num, false, flag[index]); this.orgAcs.parts[this.slotNo].addMove[this.correctNo, 1] = this.nowAcs.parts[this.slotNo].addMove[this.correctNo, 1]; this.SetControllerTransform(); })); this.lstDisposable.Add(disposable); })); // ISSUE: object of a compiler-generated type is created ((IEnumerable <Button>) this.btnRotReset).Select <Button, \u003C\u003E__AnonType13 <Button, int> >((Func <Button, int, \u003C\u003E__AnonType13 <Button, int> >)((p, i) => new \u003C\u003E__AnonType13 <Button, int>(p, i))).ToList <\u003C\u003E__AnonType13 <Button, int> >().ForEach((Action <\u003C\u003E__AnonType13 <Button, int> >)(p => { disposable = ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(p.btn), (Action <M0>)(_ => { this.inpRot[p.index].set_text("0"); this.chaCtrl.SetAccessoryRot(this.slotNo, this.correctNo, 0.0f, false, flag[p.index]); this.orgAcs.parts[this.slotNo].addMove[this.correctNo, 1] = this.nowAcs.parts[this.slotNo].addMove[this.correctNo, 1]; this.SetControllerTransform(); })); this.lstDisposable.Add(disposable); })); // ISSUE: object of a compiler-generated type is created ((IEnumerable <Button>) this.btnScl).Select <Button, \u003C\u003E__AnonType13 <Button, int> >((Func <Button, int, \u003C\u003E__AnonType13 <Button, int> >)((p, i) => new \u003C\u003E__AnonType13 <Button, int>(p, i))).ToList <\u003C\u003E__AnonType13 <Button, int> >().ForEach((Action <\u003C\u003E__AnonType13 <Button, int> >)(p => { disposable = ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(p.btn), (Action <M0>)(_ => { if (change) { return; } int index = p.index / 2; this.chaCtrl.SetAccessoryScl(this.slotNo, this.correctNo, (p.index % 2 != 0 ? 1f : -1f) * this.moveSclValue[this.acsCtrlSetting.correctSetting[this.correctNo].sclRate], true, flag[index]); this.orgAcs.parts[this.slotNo].addMove[this.correctNo, 2] = this.nowAcs.parts[this.slotNo].addMove[this.correctNo, 2]; this.inpScl[index].set_text(((Vector3) ref this.nowAcs.parts[this.slotNo].addMove.Address(this.correctNo, 2)).get_Item(index).ToString()); })); this.lstDisposable.Add(disposable); disposable = (IDisposable)DisposableExtensions.AddTo <IDisposable>((M0)ObservableExtensions.Subscribe <Unit>(Observable.RepeatUntilDestroy <Unit>(Observable.TakeUntil <Unit, PointerEventData>(Observable.SkipUntil <Unit, PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.UpdateAsObservable((Component)p.btn), (IObservable <M1>)Observable.Do <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerDownAsObservable((UIBehaviour)p.btn), (Action <M0>)(_ => { downTimeCnt = 0.0f; loopTimeCnt = 0.0f; change = false; }))), (IObservable <M1>)ObservableTriggerExtensions.OnPointerUpAsObservable((UIBehaviour)p.btn)), (Component)this), (Action <M0>)(_ => { int index = p.index / 2; float num1 = (p.index % 2 != 0 ? 1f : -1f) * this.moveSclValue[this.acsCtrlSetting.correctSetting[this.correctNo].sclRate]; float num2 = 0.0f; downTimeCnt += Time.get_deltaTime(); if ((double)downTimeCnt <= 0.300000011920929) { return; } for (loopTimeCnt += Time.get_deltaTime(); (double)loopTimeCnt > 0.0500000007450581; loopTimeCnt -= 0.05f) { num2 += num1; } if ((double)num2 == 0.0) { return; } this.chaCtrl.SetAccessoryScl(this.slotNo, this.correctNo, num2, true, flag[index]); this.orgAcs.parts[this.slotNo].addMove[this.correctNo, 2] = this.nowAcs.parts[this.slotNo].addMove[this.correctNo, 2]; this.inpScl[index].set_text(((Vector3) ref this.nowAcs.parts[this.slotNo].addMove.Address(this.correctNo, 2)).get_Item(index).ToString()); change = true; })), (Component)this); this.lstDisposable.Add(disposable); })); // ISSUE: object of a compiler-generated type is created ((IEnumerable <InputField>) this.inpScl).Select <InputField, \u003C\u003E__AnonType14 <InputField, int> >((Func <InputField, int, \u003C\u003E__AnonType14 <InputField, int> >)((p, i) => new \u003C\u003E__AnonType14 <InputField, int>(p, i))).ToList <\u003C\u003E__AnonType14 <InputField, int> >().ForEach((Action <\u003C\u003E__AnonType14 <InputField, int> >)(p => { disposable = ObservableExtensions.Subscribe <string>(UnityEventExtensions.AsObservable <string>((UnityEvent <M0>)p.inp.get_onEndEdit()), (Action <M0>)(value => { int index = p.index % 3; float num = CustomBase.ConvertValueFromTextLimit(0.01f, 100f, 2, value); p.inp.set_text(num.ToString()); this.chaCtrl.SetAccessoryScl(this.slotNo, this.correctNo, num, false, flag[index]); this.orgAcs.parts[this.slotNo].addMove[this.correctNo, 2] = this.nowAcs.parts[this.slotNo].addMove[this.correctNo, 2]; })); this.lstDisposable.Add(disposable); })); // ISSUE: object of a compiler-generated type is created ((IEnumerable <Button>) this.btnSclReset).Select <Button, \u003C\u003E__AnonType13 <Button, int> >((Func <Button, int, \u003C\u003E__AnonType13 <Button, int> >)((p, i) => new \u003C\u003E__AnonType13 <Button, int>(p, i))).ToList <\u003C\u003E__AnonType13 <Button, int> >().ForEach((Action <\u003C\u003E__AnonType13 <Button, int> >)(p => { disposable = ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(p.btn), (Action <M0>)(_ => { this.inpScl[p.index].set_text("1"); this.chaCtrl.SetAccessoryScl(this.slotNo, this.correctNo, 1f, false, flag[p.index]); this.orgAcs.parts[this.slotNo].addMove[this.correctNo, 2] = this.nowAcs.parts[this.slotNo].addMove[this.correctNo, 2]; })); this.lstDisposable.Add(disposable); })); disposable = ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.btnAllReset), (Action <M0>)(_ => { for (int index = 0; index < 3; ++index) { this.inpPos[index].set_text("0"); this.chaCtrl.SetAccessoryPos(this.slotNo, this.correctNo, 0.0f, false, flag[index]); this.orgAcs.parts[this.slotNo].addMove[this.correctNo, 0] = this.nowAcs.parts[this.slotNo].addMove[this.correctNo, 0]; this.SetControllerTransform(); this.inpRot[index].set_text("0"); this.chaCtrl.SetAccessoryRot(this.slotNo, this.correctNo, 0.0f, false, flag[index]); this.orgAcs.parts[this.slotNo].addMove[this.correctNo, 1] = this.nowAcs.parts[this.slotNo].addMove[this.correctNo, 1]; this.SetControllerTransform(); this.inpScl[index].set_text("1"); this.chaCtrl.SetAccessoryScl(this.slotNo, this.correctNo, 1f, false, flag[index]); this.orgAcs.parts[this.slotNo].addMove[this.correctNo, 2] = this.nowAcs.parts[this.slotNo].addMove[this.correctNo, 2]; } })); this.lstDisposable.Add(disposable); disposable = ObservableExtensions.Subscribe <bool>((IObservable <M0>)UnityUIComponentExtensions.OnValueChangedAsObservable(this.tglDrawCtrl), (Action <M0>)(isOn => this.customBase.customSettingSave.acsCtrlSetting.correctSetting[this.correctNo].draw = isOn)); this.lstDisposable.Add(disposable); if (((IEnumerable <Toggle>) this.tglCtrlType).Any <Toggle>()) { // ISSUE: object of a compiler-generated type is created ((IEnumerable <Toggle>) this.tglCtrlType).Select <Toggle, \u003C\u003E__AnonType15 <Toggle, int> >((Func <Toggle, int, \u003C\u003E__AnonType15 <Toggle, int> >)((val, idx) => new \u003C\u003E__AnonType15 <Toggle, int>(val, idx))).Where <\u003C\u003E__AnonType15 <Toggle, int> >((Func <\u003C\u003E__AnonType15 <Toggle, int>, bool>)(item => Object.op_Inequality((Object)item.val, (Object)null))).ToList <\u003C\u003E__AnonType15 <Toggle, int> >().ForEach((Action <\u003C\u003E__AnonType15 <Toggle, int> >)(item => { disposable = ObservableExtensions.Subscribe <bool>(Observable.Where <bool>((IObservable <M0>)UnityUIComponentExtensions.OnValueChangedAsObservable(item.val), (Func <M0, bool>)(isOn => isOn)), (Action <M0>)(isOn => { this.customBase.customSettingSave.acsCtrlSetting.correctSetting[this.correctNo].type = item.idx; if (!Object.op_Implicit((Object)this.cmpGuid)) { return; } this.cmpGuid.SetMode(item.idx); })); this.lstDisposable.Add(disposable); })); } disposable = ObservableExtensions.Subscribe <float>((IObservable <M0>)UnityUIComponentExtensions.OnValueChangedAsObservable(this.sldCtrlSpeed), (Action <M0>)(val => { this.customBase.customSettingSave.acsCtrlSetting.correctSetting[this.correctNo].speed = val; if (!Object.op_Implicit((Object)this.cmpGuid)) { return; } this.cmpGuid.speedMove = val; })); this.lstDisposable.Add(disposable); disposable = ObservableExtensions.Subscribe <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnScrollAsObservable((UIBehaviour)this.sldCtrlSpeed), (Action <M0>)(scl => { if (!this.customBase.sliderControlWheel) { return; } this.sldCtrlSpeed.set_value(Mathf.Clamp(this.sldCtrlSpeed.get_value() + (float)(scl.get_scrollDelta().y * -0.00999999977648258), 0.1f, 1f)); })); this.lstDisposable.Add(disposable); disposable = ObservableExtensions.Subscribe <float>((IObservable <M0>)UnityUIComponentExtensions.OnValueChangedAsObservable(this.sldCtrlSize), (Action <M0>)(val => { this.customBase.customSettingSave.acsCtrlSetting.correctSetting[this.correctNo].scale = val; if (!Object.op_Implicit((Object)this.cmpGuid)) { return; } this.cmpGuid.scaleAxis = val; this.cmpGuid.UpdateScale(); })); this.lstDisposable.Add(disposable); disposable = ObservableExtensions.Subscribe <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnScrollAsObservable((UIBehaviour)this.sldCtrlSize), (Action <M0>)(scl => { if (!this.customBase.sliderControlWheel) { return; } this.sldCtrlSize.set_value(Mathf.Clamp(this.sldCtrlSize.get_value() + (float)(scl.get_scrollDelta().y * -0.00999999977648258), 0.3f, 3f)); })); this.lstDisposable.Add(disposable); this.UpdateDrawControllerState(); }
private Rec LogKod_PIX_7_715053(string args, CustomBase.Rec rec) { try { //172.16.200.253:514 : local7.debug //%PIX-7-715053: //Group = hassan, Username = hassan, IP = 81.213.182.130, MODE_CFG: Received request for backup ip-sec peer list! string[] dLogParse = args.Split('%')[0].Trim().Split(' '); rec.EventCategory = dLogParse[dLogParse.Length - 1]; rec.ComputerName = dLogParse[0]; args = args.Split('%')[1].Replace("PIX-7-715053:", "").Trim(); string[] dKey = args.Split(','); for (int i = 0; i < dKey.Length; i++) { if (dKey[i].Contains("Group") == true) rec.CustomStr8 = dKey[i].Split('=')[1]; else if (dKey[i].Contains("Username") == true) rec.UserName = dKey[i].Split('=')[1]; else if (dKey[i].Contains("IP =") == true) rec.CustomStr3 = dKey[i].Split('=')[1]; else rec.Description += dKey[dKey.Length - 1] + " "; } return rec; } catch (Exception exp) { L.LogTimed(LogType.FILE, LogLevel.ERROR, "LogKod_PIX_7_715053 () | " + exp.ToString()); L.LogTimed(LogType.FILE, LogLevel.ERROR, "LogKod_PIX_7_715053 () | Line : " + args); return rec; } }
private void SendAccessRightChange(ref CustomBase.Rec rec, AuditInfo audit) { foreach (var o in audit.OriginalRights.Keys) { if (audit.NewRights.Remove(o)) { audit.OriginalRights[o].Valid = false; } } rec.CustomStr1 = "RIGHT DELETED"; foreach (var r in audit.OriginalRights.Values) { if (r.Valid) { rec.CustomStr8 = r.Trustee; rec.CustomStr9 = r.AceType; rec.CustomStr10 = r.Right; SendData(ref rec); } } rec.CustomStr1 = "RIGHT ADDED"; foreach (var r in audit.NewRights.Values) { rec.CustomStr8 = r.Trustee; rec.CustomStr9 = r.AceType; rec.CustomStr10 = r.Right; SendData(ref rec); } }
public void Start() { this.customBase.lstInputField.Add(this.input); if (Object.op_Implicit((Object)this.slider)) { ObservableExtensions.Subscribe <float>(UnityEventExtensions.AsObservable <float>((UnityEvent <M0>) this.slider.get_onValueChanged()), (Action <M0>)(value => { if (this.onChange != null) { this.onChange(value); } if (!Object.op_Implicit((Object)this.input)) { return; } this.input.set_text(CustomBase.ConvertTextFromRate(0, 100, value)); })); ObservableExtensions.Subscribe <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnScrollAsObservable((UIBehaviour)this.slider), (Action <M0>)(scl => { if (!this.customBase.sliderControlWheel) { return; } this.slider.set_value(Mathf.Clamp(this.slider.get_value() + (float)(scl.get_scrollDelta().y * -0.00999999977648258), 0.0f, 100f)); })); ObservableExtensions.Subscribe <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerUpAsObservable((UIBehaviour)this.slider), (Action <M0>)(_ => { if (this.onPointerUp == null) { return; } this.onPointerUp(); })); } if (Object.op_Implicit((Object)this.input)) { ObservableExtensions.Subscribe <string>(UnityEventExtensions.AsObservable <string>((UnityEvent <M0>) this.input.get_onEndEdit()), (Action <M0>)(value => { if (!Object.op_Implicit((Object)this.slider)) { return; } this.slider.set_value(CustomBase.ConvertRateFromText(0, 100, value)); })); } if (!Object.op_Implicit((Object)this.button)) { return; } ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityEventExtensions.AsObservable((UnityEvent)this.button.get_onClick()), (Action <M0>)(_ => { if (this.onSetDefaultValue == null) { return; } float num = this.onSetDefaultValue(); if (Object.op_Implicit((Object)this.slider)) { if (Object.op_Implicit((Object)this.input) && (double)this.slider.get_value() != (double)num) { this.input.set_text(CustomBase.ConvertTextFromRate(0, 100, num)); } this.slider.set_value(num); } if (this.onChange != null) { this.onChange(num); } if (this.onEndSetDefaultValue == null) { return; } this.onEndSetDefaultValue(); })); }
static void Allocate2(ref CustomBase.Rec r, String key, String value) { try { //Console.WriteLine("."+key); switch (key) { case "caddr": r.CustomStr1 = value; Console.WriteLine("caddr OK" + value); break; case "sport": r.CustomInt1 = Convert.ToInt32(value); Console.WriteLine("sport OK" + value); break; case "url": r.CustomStr10 = value; Console.WriteLine("URL OK" + value); break; case "URL": r.CustomStr10 = value; Console.WriteLine("URL OK" + value); break; case "method": r.CustomStr2 = value; Console.WriteLine("method OK" + value); break; case "status": r.CustomStr3 = value; Console.WriteLine("status OK" + value); break; case "type": r.CustomStr4 = value; Console.WriteLine("type OK" + value); break; case "duration": r.CustomStr5 = value; Console.WriteLine("duration OK" + value); break; case "rnum": r.CustomStr6 = value; Console.WriteLine("rnum OK" + value); break; case "relay": r.CustomStr9 = value; Console.WriteLine("relay OK" + value); break; case "bytes": r.CustomStr8 = value; Console.WriteLine("bytes OK" + value); break; case "cin": r.CustomInt2 = Convert.ToInt32(value); Console.WriteLine("cin OK" + value); break; case "cout": r.CustomInt3 = Convert.ToInt32(value); Console.WriteLine("cout OK" + value); break; case "sin": r.CustomInt4 = Convert.ToInt32(value); Console.WriteLine("sin OK" + value); break; case "sout": r.CustomInt5 = Convert.ToInt32(value); Console.WriteLine("sout OK" + value); break; default: r.Description += key + "= "; r.Description += value + " ,"; //Console.WriteLine("Description" + r.Description); break; }; }//try catch { } }
private Rec LogKod_PIX_3_305005(string args, CustomBase.Rec rec) { try { //172.16.200.253:514 : local7.error %PIX-3-305005: //No translation group found for udp src outside:172.16.200.1/138 dst inside:172.16.200.255/138 string[] dLogParse = args.Split('%')[0].Trim().Split(' '); rec.EventCategory = dLogParse[dLogParse.Length - 1]; rec.ComputerName = dLogParse[0]; args = args.Split('%')[1].Replace("PIX-3-305005:", "").Trim(); args = args.Replace(" src ", "*").Replace(" dst ", "*"); string[] dMessage = args.Split('*'); rec.EventType = dMessage[0]; if (dMessage[1].Contains("outside") == true) { rec.CustomStr4 = dMessage[1].Split(':')[1].Split('(')[0].Split('/')[0];//172.28.87.1/1086 rec.CustomInt2 = Convert.ToInt32(dMessage[1].Split(':')[1].Split('(')[0].Split('/')[1]);//10.1.33.110/7777 rec.CustomStr6 = dMessage[1].Substring(dMessage[1].IndexOf('(') + 1, dMessage[1].IndexOf(')') - dMessage[1].IndexOf('(') - 1);//(172.28.87.1/1086) parantezi ici sadece } if (dMessage[2].Contains("inside") == true) { rec.CustomStr3 = dMessage[1].Split(':')[1].Split('(')[0].Split('/')[0];//172.28.87.1/1086 rec.CustomInt1 = Convert.ToInt32(dMessage[1].Split(':')[1].Split('(')[0].Split('/')[1]);//10.1.33.110/7777 rec.CustomStr5 = dMessage[1].Substring(dMessage[1].IndexOf('(') + 1, dMessage[1].IndexOf(')') - dMessage[1].IndexOf('(') - 1);//(172.28.87.1/1086) parantezi ici sadece } return rec; } catch (Exception exp) { L.LogTimed(LogType.FILE, LogLevel.ERROR, "LogKod_PIX_3_305005() | " + exp.ToString()); L.LogTimed(LogType.FILE, LogLevel.ERROR, "LogKod_PIX_3_305005() | " + args); return rec; } }
public void Initialize(int _parts, int _idx) { this.parts = _parts; this.idx = _idx; if (this.parts == -1 || this.idx == -1) { return; } if (Object.op_Implicit((Object)this.title)) { this.title.set_text("カラー" + (this.idx + 1).ToString("00")); } if (this.lstDisposable != null && this.lstDisposable.Count != 0) { int count = this.lstDisposable.Count; for (int index = 0; index < count; ++index) { this.lstDisposable[index].Dispose(); } } this.csMainColor.actUpdateColor = (Action <Color>)(color => { this.nowColorInfo.baseColor = color; this.orgColorInfo.baseColor = color; this.chaCtrl.ChangeCustomClothes(this.parts, true, false, false, false); }); this.ssGloss.onChange = (Action <float>)(value => { this.nowColorInfo.glossPower = value; this.orgColorInfo.glossPower = value; this.chaCtrl.ChangeCustomClothes(this.parts, true, false, false, false); }); this.ssGloss.onSetDefaultValue = (Func <float>)(() => this.GetDefaultClothesInfo().gloss); this.ssMetallic.onChange = (Action <float>)(value => { this.nowColorInfo.metallicPower = value; this.orgColorInfo.metallicPower = value; this.chaCtrl.ChangeCustomClothes(this.parts, true, false, false, false); }); this.ssMetallic.onSetDefaultValue = (Func <float>)(() => this.GetDefaultClothesInfo().metallic); this.lstDisposable.Add(ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.btnPatternWin), (Action <M0>)(_ => { this.customBase.customCtrl.showPattern = true; this.clothesPtnSel.ChangeLink(this.parts, this.idx); this.clothesPtnSel.onSelect = (Action <int, int>)((p, i) => { this.ChangePatternImage(); if (!Object.op_Implicit((Object)this.objPatternSet)) { return; } this.objPatternSet.SetActiveIfDifferent(0 != this.nowColorInfo.pattern); }); }))); this.csPatternColor.actUpdateColor = (Action <Color>)(color => { this.nowColorInfo.patternColor = color; this.orgColorInfo.patternColor = color; this.chaCtrl.ChangeCustomClothes(this.parts, true, false, false, false); }); this.ssPatternW.onChange = (Action <float>)(value => { this.nowColorInfo.layout = new Vector4(value, (float)this.nowColorInfo.layout.y, (float)this.nowColorInfo.layout.z, (float)this.nowColorInfo.layout.w); this.orgColorInfo.layout = this.nowColorInfo.layout; this.chaCtrl.ChangeCustomClothes(this.parts, true, false, false, false); }); this.ssPatternW.onSetDefaultValue = (Func <float>)(() => (float)this.GetDefaultClothesInfo().layout.x); this.ssPatternH.onChange = (Action <float>)(value => { this.nowColorInfo.layout = new Vector4((float)this.nowColorInfo.layout.x, value, (float)this.nowColorInfo.layout.z, (float)this.nowColorInfo.layout.w); this.orgColorInfo.layout = this.nowColorInfo.layout; this.chaCtrl.ChangeCustomClothes(this.parts, true, false, false, false); }); this.ssPatternH.onSetDefaultValue = (Func <float>)(() => (float)this.GetDefaultClothesInfo().layout.y); this.ssPatternX.onChange = (Action <float>)(value => { this.nowColorInfo.layout = new Vector4((float)this.nowColorInfo.layout.x, (float)this.nowColorInfo.layout.y, value, (float)this.nowColorInfo.layout.w); this.orgColorInfo.layout = this.nowColorInfo.layout; this.chaCtrl.ChangeCustomClothes(this.parts, true, false, false, false); }); this.ssPatternX.onSetDefaultValue = (Func <float>)(() => (float)this.GetDefaultClothesInfo().layout.z); this.ssPatternY.onChange = (Action <float>)(value => { this.nowColorInfo.layout = new Vector4((float)this.nowColorInfo.layout.x, (float)this.nowColorInfo.layout.y, (float)this.nowColorInfo.layout.z, value); this.orgColorInfo.layout = this.nowColorInfo.layout; this.chaCtrl.ChangeCustomClothes(this.parts, true, false, false, false); }); this.ssPatternY.onSetDefaultValue = (Func <float>)(() => (float)this.GetDefaultClothesInfo().layout.w); this.ssPatternRot.onChange = (Action <float>)(value => { this.nowColorInfo.rotation = value; this.orgColorInfo.rotation = value; this.chaCtrl.ChangeCustomClothes(this.parts, true, false, false, false); }); this.ssPatternRot.onSetDefaultValue = (Func <float>)(() => this.GetDefaultClothesInfo().rot); this.UpdateCustomUI(); this.ssGloss.SetInputTextValue(CustomBase.ConvertTextFromRate(0, 100, this.nowColorInfo.glossPower)); this.ssMetallic.SetInputTextValue(CustomBase.ConvertTextFromRate(0, 100, this.nowColorInfo.metallicPower)); this.ssPatternW.SetInputTextValue(CustomBase.ConvertTextFromRate(0, 100, (float)this.nowColorInfo.layout.x)); this.ssPatternH.SetInputTextValue(CustomBase.ConvertTextFromRate(0, 100, (float)this.nowColorInfo.layout.y)); this.ssPatternX.SetInputTextValue(CustomBase.ConvertTextFromRate(0, 100, (float)this.nowColorInfo.layout.z)); this.ssPatternY.SetInputTextValue(CustomBase.ConvertTextFromRate(0, 100, (float)this.nowColorInfo.layout.w)); this.ssPatternRot.SetInputTextValue(CustomBase.ConvertTextFromRate(0, 100, this.nowColorInfo.rotation)); }
static void deamonParser(ref CustomBase.Rec r, String[] arr, String line) { r.CustomStr9 = arr[7]; String dType = dateandtime(arr[3], arr[4], arr[5]); Console.Write("dateTime---)"); Console.WriteLine(dType); r.Datetime = Convert.ToDateTime(dType).AddMinutes(zone).ToString("yyyy/MM/dd HH:mm:ss"); if (arr[10] == "New" && arr[11] == "Request") { Console.WriteLine(arr[10] + " " + arr[11]); r.EventType = arr[10] + " " + arr[11]; } else if (arr[10] == "status=OK") { Console.WriteLine(arr[10]); r.EventType = arr[10]; } else if (arr[10] == "cleanup") { Console.WriteLine(arr[10]); r.EventType = arr[10]; } else if (arr[10] == "child" && arr[11] == "exit") { Console.WriteLine(arr[10] + " " + arr[11]); r.EventType = arr[10] + " " + arr[11]; } else { //Console.WriteLine("******************************************** emrah *********************************"); //Console.WriteLine(arr[11]); r.EventType = "info"; } for (int i = 11; i < arr.Length; i++) { String[] column = arr[i].TrimStart().Split('='); if (column.Length > 1) { Allocate2(ref r, column[0], column[1]); } else if (column.Length <= 1 && arr[i - 1] != "url=") { r.Description += " " + arr[i]; Console.WriteLine(column[0] + "a " + arr[i]); } else if (column.Length <= 1 && arr[i - 1] == "url=") { r.CustomStr10 = arr[i]; Console.WriteLine("urllll " + arr[i]); } } }
static void kernelParser(ref CustomBase.Rec r, String[] arr, String line) { r.CustomStr9 = arr[7]; String dType = dateandtime(arr[3], arr[4], arr[5]); Console.Write("dateTime---)"); Console.WriteLine(dType); r.Datetime = dType; //Console.WriteLine("******************************************** emrah *********************************"); //Console.WriteLine(arr[11]); r.EventType = "info"; for (int i = 11; i < arr.Length; i++) { String[] column = arr[i].TrimStart().Split('='); if (column.Length > 1) { Allocate2(ref r, column[0], column[1]); } else if (column.Length <= 1 && arr[i - 1] != "url=") { r.Description += " " + arr[i]; Console.WriteLine(column[0] + "a " + arr[i]); } else if (column.Length <= 1 && arr[i - 1] == "url=") { r.CustomStr10 = arr[i]; Console.WriteLine("urllll " + arr[i]); } } }
static void snoticeParser(ref CustomBase.Rec r, String[] arr, String line) { r.CustomStr9 = arr[6]; String dType = dateandtime(arr[3], arr[4], arr[5]); Console.Write("dateTime---)"); Console.WriteLine(dType); r.Datetime = dType; if (arr[10] == "request") { Console.WriteLine(arr[10]); r.EventType = arr[10]; } else if (arr[10] == "disconnect") { Console.WriteLine(arr[10]); r.EventType = arr[10]; } else if (arr[10] == "Greylisting:") { Console.WriteLine(arr[9]); r.EventType = arr[9]; } else if (arr[10] == "INFO" && arr[11] == "connecting" && arr[13] == "vscand") { Console.WriteLine(arr[10] + " " + arr[11] + " " + arr[12] + " " + arr[13]); r.EventType = arr[10] + " " + arr[11] + " " + arr[12] + " " + arr[13]; } else if (arr[10] == "Global" && arr[11] == "Timeout.") { Console.WriteLine(arr[10] + " " + arr[11]); r.EventType = arr[10] + " " + arr[11]; } else if (arr[10] == "double" && arr[11] == "close") { Console.WriteLine(arr[10] + " " + arr[11]); r.EventType = arr[10] + " " + arr[11]; } else if (arr[10] == "ACCESS" && arr[11] == "DENIED:") { Console.WriteLine(arr[10] + " " + arr[11]); r.EventType = arr[10] + " " + arr[11]; } else if (arr[10] == "INFO" && arr[11] != "connecting") { Console.WriteLine(arr[10]); r.EventType = arr[10] + " " + arr[11]; } else if (arr[10] == "closefd" && arr[11] == "on") { Console.WriteLine(arr[10] + " " + arr[11] + " " + arr[12] + " " + arr[13] + " " + arr[14]); r.EventType = arr[10] + " " + arr[11] + " " + arr[12] + " " + arr[13] + " " + arr[14]; } else if (arr[10] == "forwarding") { Console.WriteLine(arr[10]); r.EventType = arr[10]; } else if (arr[10] == "Warning:") { Console.WriteLine(arr[10]); r.EventType = arr[10]; } else if (arr[10] == "rrd_acct") { Console.WriteLine(arr[10]); r.EventType = arr[10]; } else if (arr[10] == "exit") { Console.WriteLine(arr[10]); r.EventType = arr[10]; } else if (arr[9] == "child" && arr[10] == "exit") { Console.WriteLine(arr[9] + " " + arr[10]); r.EventType = arr[9] + " " + arr[10]; } else if (arr[10] == "SOCKET" && arr[11] == "ERROR:") { Console.WriteLine(arr[11] + " " + arr[12]); r.EventType = arr[11] + " " + arr[12]; } else if (arr[10] == "RBL:" && arr[11] == "denied:") { Console.WriteLine(arr[10] + " " + arr[11]); r.EventType = arr[10] + " " + arr[11]; } else { //Console.WriteLine("******************************************** emrah *********************************"); //Console.WriteLine(arr[11]); r.EventType = "info"; } for (int i = 11; i < arr.Length; i++) { String[] column = arr[i].TrimStart().Split('='); if (column.Length > 1) { Allocate2(ref r, column[0], column[1]); } else if (column.Length <= 1 && arr[i - 1] != "url=") { r.Description += " " + arr[i]; Console.WriteLine(column[0] + "a " + arr[i]); } else if (column.Length <= 1 && arr[i - 1] == "url=") { r.CustomStr10 = arr[i]; Console.WriteLine("urllll " + arr[i]); } } }
void parsAPPCTRL(ref CustomBase.Rec r, string line, string line2) { L.Log(LogType.FILE, LogLevel.INFORM, "parsAPPCTRL"); L.Log(LogType.FILE, LogLevel.INFORM, "line : " + line); L.Log(LogType.FILE, LogLevel.INFORM, "line2 : " + line2); #region AttackIPS string tarih = ""; line2 = line2.Trim('"'); switch (line.ToLower()) { case "date": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting date--"); tarih += line2 + " "; } break; case "time": { tarih += line2; r.Datetime = Convert.ToDateTime(tarih).AddMinutes(zone).ToString("yyyy/MM/dd HH:mm:ss"); } break; case "devname": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting devname--"); r.ComputerName = line2; } break; case "log_id": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting log id--"); r.EventId = Convert.ToInt32(line2); } break; case "group": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting device id--"); r.CustomStr1 = line2; } break; case "type": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting type--"); r.EventType = line2; } break; case "app": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting subtype--"); r.CustomStr2 = line2; } break; case "app_list": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting app_list--"); r.CustomStr8 = line2; } break; case "subtype": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting vd--"); r.CustomStr10 = line2; } break; case "user": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting user--"); r.UserName = line2; } break; case "msg": r.CustomStr6 = line2; break; case "policyid": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting policy id--"); r.Recordnum = Convert.ToInt32(line2); } break; case "service": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting service--"); r.CustomStr7 = line2; } break; case "src": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting src--"); r.CustomStr3 = line2; } break; case "src_name": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting src--"); r.CustomStr3 = line2; } break; case "dst": { r.CustomStr4 = line2; } break; case "dst_name": { r.CustomStr4 = line2; } break; case "action": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting src int--"); r.CustomStr5 = line2; } break; case "count": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting sport--"); try { r.CustomInt1 = Convert.ToInt32(line2); } catch { r.CustomInt1 = -1; } } break; case "dst_port": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting dst_port--"); try { r.CustomInt2 = Convert.ToInt32(line2); } catch { r.CustomInt2 = -1; } } break; case "dport": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting dst_port--"); try { r.CustomInt2 = Convert.ToInt32(line2); } catch { r.CustomInt2 = -1; } } break; case "src_port": case "sport": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting count--"); try { r.CustomInt3 = Convert.ToInt32(line2); } catch { r.CustomInt3 = -1; } } break; case "app_type": { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting status--"); r.EventCategory = line2; } break; default: { //L.Log(LogType.FILE, LogLevel.DEBUG, "-- setting description--"); r.Description += " | " + line + " = " + line2; //L.Log(LogType.FILE, LogLevel.DEBUG, r.Description.ToString()); } break; }; #endregion }
private Rec LogKod_PIX_7_714003(string args, CustomBase.Rec rec) { try { //172.16.200.253:514 : local7.debug //%PIX-7-714003: //IP = 81.213.182.130, IKE Responder starting QM: msg id = 9e623096 string[] dLogParse = args.Split('%')[0].Trim().Split(' '); rec.EventCategory = dLogParse[dLogParse.Length - 1]; rec.ComputerName = dLogParse[0]; args = args.Split('%')[1].Replace("PIX-7-714003:", "").Trim(); string[] dKey = args.Split(','); if (dKey[0].Contains("IP =") == true) rec.CustomStr3 = dKey[0].Split('=')[1]; rec.Description = dKey[1]; return rec; } catch (Exception exp) { L.LogTimed(LogType.FILE, LogLevel.ERROR, "LogKod_PIX_7_714003 () | " + exp.ToString()); L.LogTimed(LogType.FILE, LogLevel.ERROR, "LogKod_PIX_7_714003 () | Line : " + args); return rec; } }