5 Mserver
5 Mserver
VisualBasic;
using System;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using static mtkclient.main;
namespace mtkclient.MTK.Client
{
class utils
{
public static string magichexFlow = "efeeeefe01000000";
public static string magichexMessage = "efeeeefe02000000";
public static string magichex = "efeeeefe";
if (status.Length >= 8)
{
if (applyshiftKiri2(status.Substring(status.Length - 8)) ==
"c0010003")
{
return true;
}
if (applyshiftKiri2(status.Substring(status.Length - 8)) ==
"40040005")
{
return true;
}
if (applyshiftKiri2(status.Substring(status.Length - 8)) ==
"40040004")
{
return true;
}
}
if (!(status.Substring(0, 8) == magichex))
{
logs("Wrong Magic : " + eksekusi + " === " + status, true);
return false;
}
if (status.Length == panjangresponse * 2)
{
if (!(status.Substring((panjangresponse * 2) - 2, 2) == "00"))
{
logs("", true);
logs(
"Error at : "
+ eksekusi
+ " === "
+ applyshiftKiri2(status.Substring(status.Length -
8)),
true
);
return false;
}
}
return true;
}
else
{
if (cancellationToken.IsCancellationRequested)
{
return false;
}
}
return false;
}
double DoubleBytes;
if (num >= 1099511627776L)
{
DoubleBytes = TheSize / 1099511627776.0;
str = string.Concat(
Strings.FormatNumber(
DoubleBytes,
2,
TriState.UseDefault,
TriState.UseDefault,
TriState.UseDefault
),
" TB"
);
}
else if (num >= 1073741824L && num <= 1099511627775L)
{
DoubleBytes = TheSize / 1073741824.0;
str = string.Concat(
Strings.FormatNumber(
DoubleBytes,
2,
TriState.UseDefault,
TriState.UseDefault,
TriState.UseDefault
),
" GB"
);
}
else if (num >= 1048576L && num <= 1073741823L)
{
DoubleBytes = TheSize / 1048576.0;
str = string.Concat(
Strings.FormatNumber(
DoubleBytes,
2,
TriState.UseDefault,
TriState.UseDefault,
TriState.UseDefault
),
" MB"
);
}
else if (num >= 1024L && num <= 1048575L)
{
DoubleBytes = TheSize / 1024.0;
str = string.Concat(
Strings.FormatNumber(
DoubleBytes,
2,
TriState.UseDefault,
TriState.UseDefault,
TriState.UseDefault
),
" KB"
);
}
else if (num < 0L || num > 1023L)
{
str = "";
}
else
{
DoubleBytes = TheSize;
str = string.Concat(
Strings.FormatNumber(
DoubleBytes,
2,
TriState.UseDefault,
TriState.UseDefault,
TriState.UseDefault
),
" bytes"
);
}
}
catch { }
return str;
}
return input;
}
long hex = 0;
string hexStr = string.Empty;
return hexStr;
}
if (!(output.Length % 2 == 0))
{
output = "0" + output;
}
return (output);
}