- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
using System;
using System.Collections.Generic;
using System.Net;
using System.Web.Script.Serialization;
namespace Govnokod
{
public class Program
{
private static string input;
private static string[] inputargs;
private static int inputargsh = 0;
private static int eax;
private static string hax,hbx;
public static void CommandActions()
{
if (inputargs[0] == "download")
{
if (inputargsh > 1)
{
hax = inputargs[1];
hbx = (inputargsh > 2) ? inputargs[2]:null;
if (String.IsNullOrEmpty(hbx))
hbx = Environment.CurrentDirectory+"\\"+hax;
Console.WriteLine("Downloading...");
}
else Console.WriteLine("invalid argument: 1\n");
}
else if (inputargs[0] == "apkinfo")
{
if (inputargsh > 1)
{
Console.WriteLine("Apkinfo...");
}
else Console.WriteLine("invalid argument: 1\n");
}
else if (input != "")
Console.WriteLine("invalid command: "+input+"\n");
CommandStart();
}
public static void CommandStart()
{
if (inputargsh != 0)
{
Array.Clear(inputargs,0,inputargsh);
inputargsh = 0;
}
input = Console.ReadLine();
input = input.Trim();
hax = input.ToLower();
while (true)
{
eax = hax.IndexOf(' ');
Array.Resize(ref inputargs,inputargsh+1);
if (eax != -1)
{
inputargs[inputargsh] = hax.Substring(0,eax);
hax = hax.Substring(eax);
hax = hax.TrimStart();
inputargsh++;
}
else
{
inputargs[inputargsh] = hax;
inputargsh++;
hax = null;
break;
}
}
if (inputargs[0] == "quit")
{
Console.Clear();
Console.Write("Press any key to quit...");
Console.ReadKey();
}
else CommandActions();
}
public static void Main(string[] args)
{
Console.WriteLine("; Commands:");
Console.WriteLine(";\tdownload <apk> <path>");
Console.WriteLine(";\tapkinfo <apk> or <index>");
Console.WriteLine(";\tquit <>\n");
CommandStart();
}
}
}