opensteer 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-PQYA6IX2.js → chunk-7QTHGTGN.js} +21 -3
- package/dist/chunk-7QTHGTGN.js.map +1 -0
- package/dist/cli/bin.cjs +20 -2
- package/dist/cli/bin.cjs.map +1 -1
- package/dist/cli/bin.js +1 -1
- package/dist/index.cjs +20 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/package.json +5 -3
- package/dist/chunk-PQYA6IX2.js.map +0 -1
|
@@ -13,7 +13,6 @@ import { connectPlaywrightChromiumBrowser } from '@opensteer/engine-playwright';
|
|
|
13
13
|
import { createRequire } from 'module';
|
|
14
14
|
import * as cheerio from 'cheerio';
|
|
15
15
|
import * as prettier from 'prettier';
|
|
16
|
-
import { webcrack } from 'webcrack';
|
|
17
16
|
import vm from 'vm';
|
|
18
17
|
import { createServer } from 'http';
|
|
19
18
|
import { once } from 'events';
|
|
@@ -22322,7 +22321,10 @@ async function beautifyScriptContent(content) {
|
|
|
22322
22321
|
cause: lastError
|
|
22323
22322
|
});
|
|
22324
22323
|
}
|
|
22324
|
+
|
|
22325
|
+
// src/scripts/deobfuscate.ts
|
|
22325
22326
|
async function deobfuscateScriptContent(input) {
|
|
22327
|
+
const webcrack = await loadWebcrack();
|
|
22326
22328
|
const result = await webcrack(input.content, {
|
|
22327
22329
|
unpack: false,
|
|
22328
22330
|
deobfuscate: true,
|
|
@@ -22336,6 +22338,22 @@ async function deobfuscateScriptContent(input) {
|
|
|
22336
22338
|
transforms: inferTransforms(input.content, content)
|
|
22337
22339
|
};
|
|
22338
22340
|
}
|
|
22341
|
+
async function loadWebcrack() {
|
|
22342
|
+
try {
|
|
22343
|
+
const { webcrack } = await import('webcrack');
|
|
22344
|
+
return webcrack;
|
|
22345
|
+
} catch (error) {
|
|
22346
|
+
if (isMissingPackageError2(error, "webcrack")) {
|
|
22347
|
+
throw new Error(
|
|
22348
|
+
'Script deobfuscation requires the optional "webcrack" dependency. Install it with `npm install webcrack` in the environment running Opensteer.'
|
|
22349
|
+
);
|
|
22350
|
+
}
|
|
22351
|
+
throw error;
|
|
22352
|
+
}
|
|
22353
|
+
}
|
|
22354
|
+
function isMissingPackageError2(error, packageName) {
|
|
22355
|
+
return error instanceof Error && "code" in error && error.code === "ERR_MODULE_NOT_FOUND" && error.message.includes(packageName);
|
|
22356
|
+
}
|
|
22339
22357
|
function inferTransforms(original, deobfuscated) {
|
|
22340
22358
|
if (original === deobfuscated) {
|
|
22341
22359
|
return [];
|
|
@@ -32567,5 +32585,5 @@ function normalizeOpensteerError2(error) {
|
|
|
32567
32585
|
}
|
|
32568
32586
|
|
|
32569
32587
|
export { AttachedOpensteerSessionProxy, CloudSessionProxy, DEFAULT_OPENSTEER_ENGINE, DEFERRED_MATCH_ATTR_KEYS, ElementPathError, MATCH_ATTRIBUTE_PRIORITY, OPENSTEER_DOM_ACTION_BRIDGE_SYMBOL, OPENSTEER_FILESYSTEM_ROOT_LAYOUT, OPENSTEER_FILESYSTEM_ROOT_VERSION, OPENSTEER_PROTOCOL_VERSION, OpensteerAttachAmbiguousError, OpensteerCliServiceError, OpensteerCloudClient, OpensteerLocalProfileUnavailableError, OpensteerSessionRuntime, OpensteerSessionServiceClient, STABLE_PRIMARY_ATTR_KEYS, ServiceOperationScheduler, assertExecutionModeSupportsEngine, assertValidSemanticOperationInput, buildArrayFieldPathCandidates, buildPathCandidates, buildPathSelectorHint, buildSegmentSelector, cloneElementPath, cloneReplayElementPath, cloneStructuralElementAnchor, connectOpensteerService, createDomRuntime, createFilesystemOpensteerRoot, createOpensteerSemanticRuntime, defaultFallbackPolicy, defaultPolicy, defaultRetryPolicy, defaultSettlePolicy, defaultTimeoutPolicy, delayWithSignal, detectInstalledBrowserBrands, discoverLocalCdpBrowsers, dispatchSemanticOperation, fileUriToPath, generateStealthInitScript, generateStealthProfile, getAllBrowserBrands, getBrowserBrand, getOpensteerServiceMetadataPath, inspectCdpEndpoint, inspectLocalBrowserProfile, isCurrentUrlField, isPageRef, isValidCssAttributeKey, listLocalChromeProfiles, normalizeCookieDomain, normalizeExtractedValue, normalizeOpensteerEngineName, normalizeOpensteerExecutionMode, normalizeOpensteerSessionName, normalizeThrownOpensteerError, opensteerAuthRecipePayloadSchema, opensteerExecutableResolverSchema, opensteerRequestPlanPayloadSchema, opensteerReverseWorkflowStepSchema, opensteerSemanticOperationSpecifications, opensteerValidationRuleSchema, parseOpensteerServiceMetadata, parseRequestEnvelope, readOpensteerServiceMetadata, removeOpensteerServiceMetadata, requireOpensteerService, resolveCloudConfig, resolveCookieCaptureStrategy, resolveDomActionBridge, resolveExtractedValueInContext, resolveLiveOpensteerServiceMetadata, resolveOpensteerEngineName, resolveOpensteerExecutionMode, runOpensteerServiceHost, runWithPolicyTimeout, sandboxAjaxRouteSchema, sanitizeElementPath, sanitizeReplayElementPath, sanitizeStructuralElementAnchor, settleWithPolicy, shouldKeepAttributeForPath, toCanonicalJsonValue, unlockLocalBrowserProfile, validateJsonSchema, writeOpensteerServiceMetadata };
|
|
32570
|
-
//# sourceMappingURL=chunk-
|
|
32571
|
-
//# sourceMappingURL=chunk-
|
|
32588
|
+
//# sourceMappingURL=chunk-7QTHGTGN.js.map
|
|
32589
|
+
//# sourceMappingURL=chunk-7QTHGTGN.js.map
|