Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApplication3
- {
- class Program
- {
- static void IPAdress()
- {
- String strHostName = string.Empty;
- // Getting Ip address of local machine...
- // First get the host name of local machine.
- strHostName = Dns.GetHostName();
- Console.WriteLine("Local Machine's Host Name: " + strHostName);
- // Then using host name, get the IP address list..
- IPHostEntry ipEntry = Dns.GetHostEntry(strHostName);
- System.Net.IPAddress[] addr = ipEntry.AddressList;
- for (int i = 0; i < addr.Length; i++)
- {
- Console.WriteLine("IP Address {0}: {1} ", i, addr[i].ToString());
- }
- Console.ReadLine();
- }
- static void Main(string[] args)
- {
- String valsploitstinrg = "Welcome to ValSploit v0.0.0.1";
- Console.WriteLine(valsploitstinrg);
- Console.WriteLine("Please enter your username and password.");
- var UserName = Console.ReadLine();
- if (UserName == "hi")
- {
- Console.WriteLine("Please Enter Password.");
- }
- else
- {
- Console.WriteLine("Invalid Username.");
- }
- String Password = Console.ReadLine();
- if (Password == "admin")
- {
- Console.WriteLine("Welcome to ValSploit", UserName);
- }
- }
- }
- internal class IPHostEntry
- {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement