Skip to content

Commit

Permalink
Merge pull request #68 from AngeloD2022/development
Browse files Browse the repository at this point in the history
version 1.3.0
  • Loading branch information
AngeloD2022 authored Feb 23, 2023
2 parents 5b8c863 + 345d949 commit 4bb5d7a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 41 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.0
1.3.0
41 changes: 1 addition & 40 deletions src/jsxer/jsxer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,49 +3,10 @@
#include "nodes/Program.h"

#include <string>
#include <cstring>

#define JSXBIN_SIGNATURE_V10 "@JSXBIN@[email protected]@"
#define JSXBIN_SIGNATURE_V20 "@JSXBIN@[email protected]@"
#define JSXBIN_SIGNATURE_V21 "@JSXBIN@[email protected]@"

#define JSXBIN_SIGNATURE_LEN 15

bool verifySignature(const char* code, JsxbinVersion* version = nullptr, int* start = nullptr) {
JsxbinVersion ver = JsxbinVersion::Invalid;

if ( !strncmp(code, JSXBIN_SIGNATURE_V10, JSXBIN_SIGNATURE_LEN) ) {
ver = JsxbinVersion::v10;
} else if ( !strncmp(code, JSXBIN_SIGNATURE_V20, JSXBIN_SIGNATURE_LEN) ) {
ver = JsxbinVersion::v20;
} else if ( !strncmp(code, JSXBIN_SIGNATURE_V21, JSXBIN_SIGNATURE_LEN) ) {
ver = JsxbinVersion::v21;
} else {
if (version) {
*version = ver;
}

if (start) {
*start = -1;
}

return false;
}

if (version) {
*version = ver;
}

if (start) {
*start = JSXBIN_SIGNATURE_LEN;
}

return true;
}

void prepend_header(string& code, bool unblind) {
string header = "/*\n"
"* Decompiled with Jsxbin Decompiler\n"
"* Decompiled with Jsxer\n"
"* Version: " CONFIG_VERSION "\n";

if (unblind) {
Expand Down

0 comments on commit 4bb5d7a

Please sign in to comment.