Skip to content

Commit

Permalink
minor adjustments
Browse files Browse the repository at this point in the history
- remove extra using statements
- update tool name
- fix spelling mistake in a comment
- clarify the range of expected inputs
  • Loading branch information
enclave-marc-barry committed Jan 5, 2024
1 parent 0ac2ace commit e27b44f
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions multicast-test/Program.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net;
using System.Net.NetworkInformation;
using System.Net.Sockets;
using System.Text;
using System.Threading;

namespace multicast_test
{
public class Program
{
public static void Main(string[] args)
{
Console.WriteLine("Westgate Cyber Security - Simple Multicast Testing Tool");
Console.WriteLine("=======================================================\n");
Console.WriteLine("enclave.io - Simple Multicast Testing Tool");
Console.WriteLine("==========================================\n");
Console.WriteLine("Interface list:\n");
Console.WriteLine($" 0: {"0.0.0.0",-40} Any");

Expand Down Expand Up @@ -57,9 +53,9 @@ public static void Main(string[] args)
Console.WriteLine();
while (true)
{
Console.Write($"Enter multicast address to use [{MulticastAddress}]: ");
Console.Write($"Enter multicast address (224.0.0.0 to 239.255.255.255) to use [default: {MulticastAddress}]: ");
string enteredMc = Console.ReadLine();
if(enteredMc == null || enteredMc == string.Empty) break; // Use defult multicast address
if(enteredMc == null || enteredMc == string.Empty) break; // Use default multicast address
if(IPAddress.TryParse(enteredMc, out IPAddress multicastAddress))
{
if(IsMulticast(multicastAddress))
Expand All @@ -77,7 +73,7 @@ public static void Main(string[] args)
Console.WriteLine();
while (true)
{
Console.Write($"Enter multicast port to use [{MulticastPort}]: ");
Console.Write($"Enter multicast port to use (between 1 and 65535) [default: {MulticastPort}]: ");
string enteredPortString = Console.ReadLine();
if(string.IsNullOrEmpty(enteredPortString)) break; // Use default port
if(!int.TryParse(enteredPortString, out int enteredPort))
Expand Down

0 comments on commit e27b44f

Please sign in to comment.