Change "utf-8" to FILE.CdoCharset.CdoUTF_8

This commit is contained in:
Namhyeon Go 2023-10-30 13:56:43 +09:00
parent feef8e9f73
commit bfd826a0ea
14 changed files with 35 additions and 35 deletions

View File

@ -7,17 +7,17 @@ var OldBrowser = require("lib/oldbrowser");
var token;
if (FILE.fileExists("token.txt")) {
token = FILE.readFile("token.txt", "utf-8");
token = FILE.readFile("token.txt", FILE.CdoCharset.CdoUTF_8);
}
OldBrowser.setContent(FILE.readFile("app\\signin.html", "utf-8"));
OldBrowser.setContent(FILE.readFile("app\\signin.html", FILE.CdoCharset.CdoUTF_8));
document.getElementById("loginform").onsubmit = function(ev) {
ev.preventDefault();
};
if (FILE.fileExists("credential.json")) {
var credential = JSON.parse(FILE.readFile("credential.json", "utf-8"));
var credential = JSON.parse(FILE.readFile("credential.json", FILE.CdoCharset.CdoUTF_8));
document.getElementById("txt_email").value = credential.email;
document.getElementById("txt_password").value = credential.password;
}
@ -28,5 +28,5 @@ document.getElementById("btn_submit").onclick = function() {
"password": document.getElementById("txt_password").value
};
FILE.writeFile("credential.json", JSON.stringify(credential), "utf-8");
FILE.writeFile("credential.json", JSON.stringify(credential), FILE.CdoCharset.CdoUTF_8);
};

View File

@ -7,10 +7,10 @@ var Punycode = require("lib/punycode");
function main() {
var lines = [];
var district = JSON.parse(FILE.readFile("data\\korea-administrative-district.json", "utf-8"));
var district = JSON.parse(FILE.readFile("data\\korea-administrative-district.json", FILE.CdoCharset.CdoUTF_8));
var districtData = district.data;
var domains = splitLn(FILE.readFile("data\\domains.txt", "utf-8"));
var domains = splitLn(FILE.readFile("data\\domains.txt", FILE.CdoCharset.CdoUTF_8));
var digFrame = function(handler, domain, response) {
var frameURLs = handler.getFrameURLs();
@ -76,7 +76,7 @@ function main() {
lines.push(row.join(":"));
});
FILE.appendFile("data\\matches.txt", lines.join("\r\n"), "utf-8");
FILE.appendFile("data\\matches.txt", lines.join("\r\n"), FILE.CdoCharset.CdoUTF_8);
}
exports.main = main;

View File

@ -6,7 +6,7 @@ var HTTP = require("lib/http");
var RAND = require("lib/rand");
function main() {
var domains = splitLn(FILE.readFile("data\\target_domains.txt", "utf-8"));
var domains = splitLn(FILE.readFile("data\\target_domains.txt", FILE.CdoCharset.CdoUTF_8));
var urls = [];
domains.forEach(function(x) {
@ -29,7 +29,7 @@ function main() {
sleep(RAND.getInt(1000, 2000));
});
FILE.writeFile("data\\target_urls.txt", urls.join("\r\n"), "utf-8");
FILE.writeFile("data\\target_urls.txt", urls.join("\r\n"), FILE.CdoCharset.CdoUTF_8);
console.log("Done");
}

View File

@ -4,7 +4,7 @@ var FILE = require("lib/file");
var filename = "data\\dead_targets.txt";
function recordDead(name) {
FILE.rotateFile(filename, name + "\r\n", 1000, "utf-8");
FILE.rotateFile(filename, name + "\r\n", 1000, FILE.CdoCharset.CdoUTF_8);
}
function checkIsDead(name) {

View File

@ -9,7 +9,7 @@ var RAND = require("lib/rand");
function getHashes() {
var rows = [];
var lines = splitLn(FILE.readFile("data\\hashes.txt", "utf-8"));
var lines = splitLn(FILE.readFile("data\\hashes.txt", FILE.CdoCharset.CdoUTF_8));
for (var i = 0; i < lines.length; i++) {
var row = lines[i].split(',');
if (row.length == 2) rows.push(row);
@ -112,7 +112,7 @@ function main(args) {
hashes.forEach(callback1);
FILE.appendFile("data\\vt_matches_2.txt", lines.join("\r\n"), "utf-8");
FILE.appendFile("data\\vt_matches_2.txt", lines.join("\r\n"), FILE.CdoCharset.CdoUTF_8);
}
exports.main = main;

View File

@ -220,7 +220,7 @@ var ChromeObject = function(interfaces) {
};
this.addUserAgentsFromFile = function(filename) {
var text = FILE.readFile(filename, "utf-8");
var text = FILE.readFile(filename, FILE.CdoCharset.CdoUTF_8);
var lines = text.split(/\r?\n/);
for (var i = 0; i < lines.length; i++) {
var line = lines[i].trim();
@ -1354,7 +1354,7 @@ exports.startDebugInPrivate = function(url, proxy, profileName, debuggingPort, i
;
};
exports.VERSIONINFO = "Chrome Web Browser Debugging Interface (chrome.js) version 0.4.3";
exports.VERSIONINFO = "Chrome Web Browser Debugging Interface (chrome.js) version 0.4.4";
exports.AUTHOR = "abuse@catswords.net";
exports.global = global;
exports.require = global.require;

View File

@ -194,8 +194,8 @@ exports.includeFile = includeFile;
exports.appendFile = appendFile;
exports.rotateFile = rotateFile;
exports.PipeIPC = PipeIPC;
exports.CdoCharset = PipeIPC.CdoCharset;
exports.VERSIONINFO = "File Library (file.js) version 0.2.9";
exports.VERSIONINFO = "File Library (file.js) version 0.2.10";
exports.global = global;
exports.require = global.require;

View File

@ -9,7 +9,7 @@ exports.getHosts = function() {
var hosts = [];
var filePath = SYS.getEnvString("windir") + "\\System32\\\drivers\\etc\\hosts";
var fileContent = FILE.readFile(filePath, "utf-8");
var fileContent = FILE.readFile(filePath, FILE.CdoCharset.CdoUTF_8);
var rows = fileContent.split(/[\r\n]+/g).filter(function(s) {
return !(s.indexOf('#') == 0);

View File

@ -67,7 +67,7 @@ var HTTPObject = function(engine) {
this.curlOptions = [];
this.charset = "utf-8";
this.charset = FILE.CdoCharset.CdoUTF_8;
this.isUseCharsetDetector = false;
this.create = function() {
@ -965,7 +965,7 @@ exports.patch = patch;
exports.put = put;
exports._delete = _delete;
exports.VERSIONINFO = "HTTP Library (http.js) version 0.7.8";
exports.VERSIONINFO = "HTTP Library (http.js) version 0.7.9";
exports.AUTHOR = "abuse@catswords.net";
exports.global = global;
exports.require = global.require;

View File

@ -84,7 +84,7 @@ function sample(arr, length) {
function discardCallback(callback, args, filename) {
if (typeof callback !== "function") return;
var discarded = splitLn(FILE.readFile(filename, "utf-8"));
var discarded = splitLn(FILE.readFile(filename, FILE.CdoCharset.CdoUTF_8));
var chosen = callback.apply(null, args);
while (chosen == null || discarded.indexOf(chosen) > -1) {
@ -92,13 +92,13 @@ function discardCallback(callback, args, filename) {
chosen = callback.apply(null, args);
}
FILE.appendFile(filename, "\r\n" + chosen, "utf-8");
FILE.appendFile(filename, "\r\n" + chosen, FILE.CdoCharset.CdoUTF_8);
return chosen;
}
function discardOne(arr, filename) {
var discarded = splitLn(FILE.readFile(filename, "utf-8"));
var discarded = splitLn(FILE.readFile(filename, FILE.CdoCharset.CdoUTF_8));
var _arr = arr.reduce(function(a, x) {
if (discarded.indexOf(x) < 0) a.push(x);
return a;
@ -119,6 +119,6 @@ exports.sample = sample;
exports.discardOne = discardOne;
exports.discardCallback = discardCallback;
exports.VERSIONINFO = "Random Module (rand.js) version 0.6";
exports.VERSIONINFO = "Random Module (rand.js) version 0.6.1";
exports.global = global;
exports.require = global.require;

View File

@ -36,7 +36,7 @@ var WebsocketObject = function() {
var FN = "tmp\\stdin_" + seed + ".txt";
try {
FILE.writeFile(FN, msg + "\n", "utf-8");
FILE.writeFile(FN, msg + "\n", FILE.CdoCharset.CdoUTF_8);
console.log(msg);
sleep(1);
@ -64,7 +64,7 @@ var WebsocketObject = function() {
this.create();
};
exports.VERSIONINFO = "Websocket Lib (websocket.js) version 0.2";
exports.VERSIONINFO = "Websocket Lib (websocket.js) version 0.2.1";
exports.global = global;
exports.require = global.require;

View File

@ -2,10 +2,6 @@
// Windows Library API
////////////////////////////////////////////////////////////////////////
exports.VERSIONINFO = "Windows Lib (winlibs.js) version 0.1";
exports.global = global;
exports.require = global.require;
var SHELL = require("lib/shell");
var FILE = require("lib/file");
@ -30,7 +26,7 @@ exports.createManifest = function(FN, clsid) {
];
// write a manifest file
FILE.writeFile(manifestPath, lines.join("\r\n"), "utf-8");
FILE.writeFile(manifestPath, lines.join("\r\n"), FILE.CdoCharset.CdoUTF_8);
return FILE.fileExists(manifestPath);
};
@ -114,3 +110,7 @@ exports.showNetworkAdapters = function() {
exports.showEULA = function() {
return exports.SHELL32.call("ShellAboutW");
};
exports.VERSIONINFO = "Windows Lib (winlibs.js) version 0.1.1";
exports.global = global;
exports.require = global.require;

View File

@ -12,7 +12,7 @@ var StreamConvert = function(data) {
this.toBinary = function() {
var BinaryStream = CreateObject("ADODB.Stream");
BinaryStream.Type = adTypeText;
BinaryStream.CharSet = "utf-8";
BinaryStream.CharSet = FILE.CdoCharset.CdoUTF_8;
BinaryStream.Open();
BinaryStream.WriteText(this.data);
BinaryStream.Position = 0;
@ -28,7 +28,7 @@ var StreamConvert = function(data) {
BinaryStream.Write(this.data);
BinaryStream.Position = 0;
BinaryStream.Type = adTypeText;
BinaryStream.CharSet = "utf-8";
BinaryStream.CharSet = FILE.CdoCharset.CdoUTF_8;
return BinaryStream.ReadText();
};
};
@ -61,7 +61,7 @@ var XMLObject = function(dom) {
try {
if (FILE.fileExists(filename)) {
this.getDOM().loadXML(FILE.readFile(this.filename, "utf-8"));
this.getDOM().loadXML(FILE.readFile(this.filename, FILE.CdoCharset.CdoUTF_8));
} else {
console.error("XMLObject.load() -> The file does not exists or access denied");
}
@ -164,6 +164,6 @@ exports.load = load;
exports.encode = encode;
exports.decode = decode;
exports.VERSIONINFO = "XML interface (xml.js) version 0.2.2";
exports.VERSIONINFO = "XML interface (xml.js) version 0.2.3";
exports.global = global;
exports.require = global.require;

View File

@ -115,7 +115,7 @@ exports.IEVersion = OldBrowser.getIEVersion();
////////////////////////////////////////////////////////////////////////
exports.main = function(args) {
// make will display contents
OldBrowser.setContent(FILE.readFile("app\\index.html", "utf-8"));
OldBrowser.setContent(FILE.readFile("app\\index.html", FILE.CdoCharset.CdoUTF_8));
// add stylesheets
OldBrowser.addStylesheet("app/assets/css/jquery-ui-1.21.1.min.css");