Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Text;
- using System.Diagnostics;
- using System.Globalization;
- using System.Web;
- namespace AUCI
- {
- class Program
- {
- public static bool debug = false;
- static string ConvertToPunycode(string domain)
- {
- try
- {
- domain = System.Web.HttpUtility.UrlDecode(domain);
- Uri uri = new Uri(domain);
- IdnMapping p = new IdnMapping();
- string newHost = p.GetAscii(uri.DnsSafeHost);
- domain=domain.Replace(uri.Host,newHost);
- return domain;
- }
- catch (Exception ex) { }
- return domain;
- }
- static void Main(string[] args)
- {
- if (args.Length == 0)
- {
- ShowHelp();
- }
- else
- {
- string exe = System.Reflection.Assembly.GetEntryAssembly().Location;
- exe = exe.Substring(0, exe.LastIndexOf("\\"));
- exe += "\\avant.exe";
- try
- {
- string argstring = "";
- for (int i = 0; i < args.Length; i++)
- {
- if (args[i] != "-url")
- {
- argstring += ConvertToPunycode(args[i]);
- if (i < args.Length - 1)
- argstring += " ";
- }
- }
- if (debug)
- {
- Console.WriteLine(exe + " " + argstring);
- Console.ReadLine();
- }
- Process proc = new Process();
- proc.StartInfo.FileName = exe;
- proc.StartInfo.Arguments = argstring;
- proc.Start();
- }
- catch (Exception ex)
- {
- }
- }
- }
- public static void ShowHelp()
- {
- Console.WriteLine("AUCI Version 1.1\nhttp://forum.avantbrowser.com/viewtopic.php?f=58&t=32790");
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement