Advertisement
CroClex

Untitled

Nov 26th, 2018
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1. public static bool Injection(string Injection)
  2. {
  3. bool result;
  4. try
  5. {
  6. bool flag = !Main.WaitNamedPipe(Path.GetFullPath(string.Format("\\\\.\\pipe\\{0}", Injection)), 0) && (Marshal.GetLastWin32Error() == 0 || Marshal.GetLastWin32Error() == 2);
  7. if (flag)
  8. {
  9. result = false;
  10. }
  11. else
  12. {
  13. result = true;
  14. }
  15. }
  16. catch (Exception)
  17. {
  18. result = false;
  19. }
  20. return result;
  21. }
  22.  
  23. // Token: 0x06000016 RID: 22 RVA: 0x00002434 File Offset: 0x00000634
  24. public bool isConnected()
  25. {
  26. return Main.Injection("fuckoff");
  27. }
  28.  
  29. public void SendLua(string str)
  30. {
  31. bool flag = !this.isConnected();
  32. if (flag)
  33. {
  34.  
  35. }
  36. else
  37. {
  38. using (NamedPipeClientStream namedPipeClientStream = new NamedPipeClientStream(".", "fuckoff", PipeDirection.Out))
  39. {
  40. namedPipeClientStream.Connect();
  41. using (StreamWriter streamWriter = new StreamWriter(namedPipeClientStream))
  42. {
  43. streamWriter.Write(str);
  44. streamWriter.Dispose();
  45. streamWriter.Close();
  46. }
  47. namedPipeClientStream.Dispose();
  48. namedPipeClientStream.Close();
  49. }
  50. }
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement