Update app,js lib/jsunit.js, lib/winlibs.js

This commit is contained in:
Namhyeon Go 2020-07-27 14:56:43 +09:00
parent 81e076e585
commit 0f45cd28ac
5 changed files with 1117 additions and 14 deletions

View File

@ -27,6 +27,7 @@ WelsonJS - Build a Windows desktop apps with JavaScript, HTML, and CSS based on
- lib/service (Windows Service interface) - lib/service (Windows Service interface)
- lib/oldbrowser (HTML/JS/CSS interface) - lib/oldbrowser (HTML/JS/CSS interface)
- lib/uri (URI scheme interface) - lib/uri (URI scheme interface)
- lib/winlibs (Windows DLL(Dynamic-link library) interface)
- lib/autohotkey ([AutoHotKey](https://catswords.re.kr/go/autohotkey) interface) - lib/autohotkey ([AutoHotKey](https://catswords.re.kr/go/autohotkey) interface)
- lib/autoit3 ([AutoIt3](https://catswords.re.kr/go/autoit3) interface) - lib/autoit3 ([AutoIt3](https://catswords.re.kr/go/autoit3) interface)
- lib/cloudflare ([Cloudflare Argo Tunnel](https://catswords.re.kr/go/argotunnel) interface) - lib/cloudflare ([Cloudflare Argo Tunnel](https://catswords.re.kr/go/argotunnel) interface)
@ -66,6 +67,8 @@ hello
- [JohnLaTwC's gist](https://catswords.re.kr/go/johnlatwcgist) - JavaScript RAT - [JohnLaTwC's gist](https://catswords.re.kr/go/johnlatwcgist) - JavaScript RAT
- [JSMan-/JS-Framework](https://catswords.re.kr/go/jsmanfw) - No description - [JSMan-/JS-Framework](https://catswords.re.kr/go/jsmanfw) - No description
- [iconjack/setTimeout-for-windows-script-host](https://catswords.re.kr/go/wshtimer) - Replacement for the missing setTimeout and clearTimeout function in Windows Script Host - [iconjack/setTimeout-for-windows-script-host](https://catswords.re.kr/go/wshtimer) - Replacement for the missing setTimeout and clearTimeout function in Windows Script Host
- [johnjohnsp1/RegistrationFreeCOM](https://catswords.re.kr/go/actctx) - Inject DLL Prototype using Microsoft.Windows.ACTCTX COM Object
- [kuntashov/jsunit](https://catswords.re.kr/go/wshjsunit) - JSUnit port for Windows Scripting Host
## Contact me ## Contact me
- gnh1201@gmail.com - gnh1201@gmail.com

View File

@ -27,6 +27,7 @@ WelsonJS - Build a Windows desktop apps with JavaScript, HTML, and CSS based on
- lib/service (Windows Service interface) - lib/service (Windows Service interface)
- lib/oldbrowser (HTML/JS/CSS interface) - lib/oldbrowser (HTML/JS/CSS interface)
- lib/uri (URI scheme interface) - lib/uri (URI scheme interface)
- lib/winlibs (Windows DLL(Dynamic-link library) interface)
- lib/autohotkey ([AutoHotKey](https://catswords.re.kr/go/autohotkey) interface) - lib/autohotkey ([AutoHotKey](https://catswords.re.kr/go/autohotkey) interface)
- lib/autoit3 ([AutoIt3](https://catswords.re.kr/go/autoit3) interface) - lib/autoit3 ([AutoIt3](https://catswords.re.kr/go/autoit3) interface)
- lib/cloudflare ([Cloudflare Argo Tunnel](https://catswords.re.kr/go/argotunnel) interface) - lib/cloudflare ([Cloudflare Argo Tunnel](https://catswords.re.kr/go/argotunnel) interface)
@ -66,6 +67,8 @@ hello
- [JohnLaTwC's gist](https://catswords.re.kr/go/johnlatwcgist) - JavaScript RAT - [JohnLaTwC's gist](https://catswords.re.kr/go/johnlatwcgist) - JavaScript RAT
- [JSMan-/JS-Framework](https://catswords.re.kr/go/jsmanfw) - No description - [JSMan-/JS-Framework](https://catswords.re.kr/go/jsmanfw) - No description
- [iconjack/setTimeout-for-windows-script-host](https://catswords.re.kr/go/wshtimer) - Replacement for the missing setTimeout and clearTimeout function in Windows Script Host - [iconjack/setTimeout-for-windows-script-host](https://catswords.re.kr/go/wshtimer) - Replacement for the missing setTimeout and clearTimeout function in Windows Script Host
- [johnjohnsp1/RegistrationFreeCOM](https://catswords.re.kr/go/actctx) - Inject DLL Prototype using Microsoft.Windows.ACTCTX COM Object
- [kuntashov/jsunit](https://catswords.re.kr/go/wshjsunit) - JSUnit port for Windows Scripting Host
## Contact me ## Contact me
- gnh1201@gmail.com - gnh1201@gmail.com

2
app.js
View File

@ -170,7 +170,7 @@ function init_console() {
var app = require(name); var app = require(name);
if (app) { if (app) {
if (app.main) { if (app.main) {
var exitstatus = app.main(args); var exitstatus = app.main.call(this, args);
if (typeof(exitstatus) !== "undefined") { if (typeof(exitstatus) !== "undefined") {
exit(exitstatus); exit(exitstatus);
} }

1079
lib/jsunit.js Normal file

File diff suppressed because it is too large Load Diff

View File

@ -7,23 +7,41 @@ exports.global = global;
exports.require = global.require; exports.require = global.require;
var SHELL = require("lib/shell"); var SHELL = require("lib/shell");
var FILE = require("lib/file");
exports.loadLibrary = function(LIB) { exports.loadLibrary = function(LIB) {
return { var dllManifest = LIB + ".manifest";
call: function(FN, args) {
var cmd = [ if (FILE.fileExists(dllManifest)) {
"rundll32.exe" var actCtx = CreateObject("Microsoft.Windows.ActCtx");
]; actCtx.Manifest = dllManifest;
if (typeof(FN) === "undefined") { try {
FN = "DllMain"; var DX = actCtx.CreateObject("MessageBox");
return {
call: function(FN, args) {
return DX[FN].call(this, args);
}
} }
cmd.push(LIB + ".dll," + FN); } catch(e) {
if (typeof(args) !== "undefined") { // return null;
cmd = cmd.concat(args);
}
return SHELL.exec(cmd);
} }
}; } else {
return {
call: function(FN, args) {
var cmd = [
"rundll32.exe"
];
if (typeof(FN) === "undefined") {
FN = "DllMain";
}
cmd.push(LIB + ".dll," + FN);
if (typeof(args) !== "undefined") {
cmd = cmd.concat(args);
}
return SHELL.exec(cmd);
}
};
}
}; };
exports.SHELL32 = (function() { exports.SHELL32 = (function() {