//UnityWe void Start() { Debug.Log("Start called"); watsonScript = GameObject.Find("Cube").GetComponent <Watson> (); t = (TextMesh)gameObject.GetComponent(typeof(TextMesh)); }
public HttpResponseMessage ReportError(Watson data) { if (data == null) { throw new HttpResponseException(new HttpResponseMessage { StatusCode = HttpStatusCode.BadRequest, Content = new StringContent("No Watson data provided") }); } try { data.MachineName = RequestHelpers.GetClientIpAddress(Request); data.DateSubmitted = DateTime.Now; _context.AddError(data); } catch (Exception e) { throw new HttpResponseException(new HttpResponseMessage { StatusCode = HttpStatusCode.InternalServerError, Content = new StringContent(e.Message) }); } return(new HttpResponseMessage(HttpStatusCode.OK)); }
private bool EhFebreWatson(string sintomas) { string URL = "http://localhost:8080/api/" + sintomas; string urlParameters = ""; //"?api_key=123"; HttpClient client = new HttpClient(); client.BaseAddress = new Uri(URL); // Add an Accept header for JSON format. client.DefaultRequestHeaders.Accept.Add( new MediaTypeWithQualityHeaderValue("application/json")); // List data response. HttpResponseMessage response = client.GetAsync(urlParameters).Result; // Blocking call! if (response.IsSuccessStatusCode) { Debug.WriteLine("aaa"); Debug.WriteLine(response.Content.ReadAsStringAsync().Result); Watson watson = JsonConvert.DeserializeObject <Watson>(response.Content.ReadAsStringAsync().Result); if (watson.message[0].ToString().Equals("BIRL")) { return(true); } else { return(false); } } else { Debug.WriteLine("{0} ({1})", (int)response.StatusCode, response.ReasonPhrase); } return(false); }
private static void PrintBasicSystemInfo() { try { Beaprint.MainPrint("Basic System Information"); Beaprint.LinkPrint("https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#kernel-exploits", "Check if the Windows versions is vulnerable to some known exploit"); Dictionary <string, string> basicDictSystem = Info.SystemInfo.SystemInfo.GetBasicOSInfo(); basicDictSystem["Hotfixes"] = Beaprint.ansi_color_good + basicDictSystem["Hotfixes"] + Beaprint.NOCOLOR; Dictionary <string, string> colorsSI = new Dictionary <string, string> { { Globals.StrTrue, Beaprint.ansi_color_bad }, }; Beaprint.DictPrint(basicDictSystem, colorsSI, false); System.Console.WriteLine(); Watson.FindVulns(); //To update Watson, update the CVEs and add the new ones and update the main function so it uses new CVEs (becausfull with the Beaprints inside the FindVulns function) //Usually you won't need to do anything with the classes Wmi, Vulnerability and VulnerabilityCollection } catch (Exception ex) { Beaprint.PrintException(ex.Message); } }
public void AddError(Watson data) { Errors.Add(data); SaveChanges(); }
// // GET: /Watson/ public ActionResult Conversa(string texto) { return(Json(Watson.Conversa(texto), JsonRequestBehavior.AllowGet)); }
TextMesh t; //Will hold speech user gave void Start() { watsonScript = GameObject.Find("Cube").GetComponent <Watson> (); t = (TextMesh)gameObject.GetComponent(typeof(TextMesh)); }