Advertisement
Guest User

Untitled

a guest
Sep 9th, 2016
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.66 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApplication3
  8. {
  9. class Program
  10. {
  11. static void IPAdress()
  12. {
  13. String strHostName = string.Empty;
  14. // Getting Ip address of local machine...
  15. // First get the host name of local machine.
  16. strHostName = Dns.GetHostName();
  17. Console.WriteLine("Local Machine's Host Name: " + strHostName);
  18. // Then using host name, get the IP address list..
  19. IPHostEntry ipEntry = Dns.GetHostEntry(strHostName);
  20. System.Net.IPAddress[] addr = ipEntry.AddressList;
  21.  
  22. for (int i = 0; i < addr.Length; i++)
  23. {
  24. Console.WriteLine("IP Address {0}: {1} ", i, addr[i].ToString());
  25. }
  26. Console.ReadLine();
  27. }
  28. static void Main(string[] args)
  29. {
  30. String valsploitstinrg = "Welcome to ValSploit v0.0.0.1";
  31. Console.WriteLine(valsploitstinrg);
  32. Console.WriteLine("Please enter your username and password.");
  33. var UserName = Console.ReadLine();
  34. if (UserName == "hi")
  35. {
  36. Console.WriteLine("Please Enter Password.");
  37. }
  38. else
  39. {
  40. Console.WriteLine("Invalid Username.");
  41. }
  42. String Password = Console.ReadLine();
  43. if (Password == "admin")
  44. {
  45. Console.WriteLine("Welcome to ValSploit", UserName);
  46. }
  47. }
  48. }
  49.  
  50. internal class IPHostEntry
  51. {
  52. }
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement