oculon 0.1.6 → 0.2.0
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/README.md +93 -17
- package/dist/cli/main.js +397 -0
- package/dist/core/calls.d.ts +63 -0
- package/dist/core/calls.js +120 -0
- package/dist/core/der.d.ts +2 -0
- package/dist/core/der.js +17 -0
- package/dist/core/http.d.ts +30 -1
- package/dist/core/http.js +133 -29
- package/dist/core/pdf.d.ts +51 -0
- package/dist/core/pdf.js +211 -0
- package/dist/core/qr.d.ts +23 -0
- package/dist/core/qr.js +577 -0
- package/dist/core/quota.js +5 -0
- package/dist/core/raster.d.ts +6 -0
- package/dist/core/raster.js +298 -0
- package/dist/core/safeurl.d.ts +5 -0
- package/dist/core/safeurl.js +26 -0
- package/dist/core/verdict.d.ts +30 -0
- package/dist/core/verdict.js +164 -0
- package/dist/core/zip.d.ts +9 -0
- package/dist/core/zip.js +46 -0
- package/dist/index.d.ts +83 -0
- package/dist/index.js +128 -0
- package/dist/mcp.d.ts +1 -0
- package/dist/mcp.js +256 -6
- package/dist/modules/address.d.ts +6 -2
- package/dist/modules/address.js +32 -5
- package/dist/modules/apk.d.ts +37 -0
- package/dist/modules/apk.js +191 -0
- package/dist/modules/approvals.d.ts +40 -0
- package/dist/modules/approvals.js +155 -0
- package/dist/modules/archive.d.ts +21 -0
- package/dist/modules/archive.js +94 -0
- package/dist/modules/checks.d.ts +59 -0
- package/dist/modules/checks.js +167 -0
- package/dist/modules/contract.d.ts +56 -0
- package/dist/modules/contract.js +167 -0
- package/dist/modules/deployer.d.ts +42 -0
- package/dist/modules/deployer.js +90 -0
- package/dist/modules/doc.d.ts +83 -0
- package/dist/modules/doc.js +841 -0
- package/dist/modules/eml.d.ts +46 -0
- package/dist/modules/eml.js +175 -0
- package/dist/modules/hashcheck.d.ts +19 -3
- package/dist/modules/hashcheck.js +28 -4
- package/dist/modules/image.d.ts +32 -0
- package/dist/modules/image.js +276 -0
- package/dist/modules/invite.d.ts +27 -0
- package/dist/modules/invite.js +69 -0
- package/dist/modules/job.d.ts +33 -0
- package/dist/modules/job.js +64 -0
- package/dist/modules/meerkat.d.ts +1 -1
- package/dist/modules/meerkat.js +35 -2
- package/dist/modules/monitor.js +14 -0
- package/dist/modules/poisoning.d.ts +43 -0
- package/dist/modules/poisoning.js +114 -0
- package/dist/modules/qrcheck.d.ts +24 -0
- package/dist/modules/qrcheck.js +136 -0
- package/dist/modules/repo.d.ts +61 -0
- package/dist/modules/repo.js +162 -0
- package/dist/modules/report.d.ts +32 -0
- package/dist/modules/report.js +108 -0
- package/dist/modules/signature.d.ts +35 -0
- package/dist/modules/signature.js +283 -0
- package/dist/modules/site.d.ts +62 -0
- package/dist/modules/site.js +191 -0
- package/dist/modules/stocktoken.d.ts +48 -0
- package/dist/modules/stocktoken.js +99 -0
- package/dist/modules/trace.d.ts +37 -0
- package/dist/modules/trace.js +150 -0
- package/dist/modules/txexplain.d.ts +40 -0
- package/dist/modules/txexplain.js +135 -0
- package/dist/modules/urlcheck.js +15 -1
- package/dist/modules/utility.d.ts +27 -1
- package/dist/modules/utility.js +108 -11
- package/dist/modules/where.d.ts +63 -0
- package/dist/modules/where.js +165 -0
- package/dist/report-pdf.d.ts +7 -0
- package/dist/report-pdf.js +84 -0
- package/dist/sources/cfurlscan.d.ts +24 -0
- package/dist/sources/cfurlscan.js +46 -0
- package/dist/sources/chainabuse.d.ts +17 -0
- package/dist/sources/chainabuse.js +19 -0
- package/dist/sources/evm.d.ts +135 -0
- package/dist/sources/evm.js +260 -0
- package/dist/sources/phishlists.d.ts +20 -0
- package/dist/sources/phishlists.js +90 -0
- package/dist/telegram.d.ts +17 -0
- package/dist/telegram.js +151 -4
- package/dist/web/card.d.ts +28 -0
- package/dist/web/card.js +75 -0
- package/dist/web/docs.html +1 -1
- package/dist/web/index.html +213 -5
- package/dist/web/landing.html +1 -1
- package/dist/web/legal.html +3 -1
- package/dist/web/mcp.html +1 -1
- package/dist/web/openapi.js +15 -0
- package/dist/web/pages.d.ts +24 -0
- package/dist/web/pages.js +139 -0
- package/dist/web/public.js +16 -1
- package/dist/web/server.d.ts +13 -0
- package/dist/web/server.js +152 -13
- package/dist/web/token.html +25 -4
- package/dist/web/token.json +12 -1
- package/dist/web/utility.html +40 -14
- package/package.json +2 -2
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import type { Ctx } from '../core/context.js';
|
|
2
|
+
import type { ModuleResult } from '../core/types.js';
|
|
3
|
+
export interface DocIban {
|
|
4
|
+
iban: string;
|
|
5
|
+
valid: boolean;
|
|
6
|
+
country: string | null;
|
|
7
|
+
problems: string[];
|
|
8
|
+
}
|
|
9
|
+
export interface DocResult {
|
|
10
|
+
name: string;
|
|
11
|
+
type: 'pdf' | 'jpeg' | 'png' | 'docx' | 'xlsx' | 'pptx' | 'office (legacy)';
|
|
12
|
+
bytes: number;
|
|
13
|
+
sha256: string;
|
|
14
|
+
verdict: 'dangerous file' | 'likely edited' | 'signs of editing' | 'no signs of editing found';
|
|
15
|
+
risk: number;
|
|
16
|
+
flags: string[];
|
|
17
|
+
notes: string[];
|
|
18
|
+
metadata: Record<string, string>;
|
|
19
|
+
/** PDF: times the file was saved (1 = never changed after it was made). */
|
|
20
|
+
revisions: number | null;
|
|
21
|
+
signed: boolean;
|
|
22
|
+
fonts: string[];
|
|
23
|
+
text: {
|
|
24
|
+
chars: number;
|
|
25
|
+
excerpt: string;
|
|
26
|
+
from: 'text layer' | 'ocr' | 'none';
|
|
27
|
+
};
|
|
28
|
+
/** Office files: macros, external links, embedded objects and hidden sheets found in the package. */
|
|
29
|
+
office?: {
|
|
30
|
+
macros: boolean;
|
|
31
|
+
external: string[];
|
|
32
|
+
embedded: string[];
|
|
33
|
+
hiddenSheets: string[];
|
|
34
|
+
};
|
|
35
|
+
ibans: DocIban[];
|
|
36
|
+
domains: string[];
|
|
37
|
+
advice: string[];
|
|
38
|
+
}
|
|
39
|
+
export declare const DOC_MAX_BYTES: number;
|
|
40
|
+
interface PdfObj {
|
|
41
|
+
num: number;
|
|
42
|
+
dict: string;
|
|
43
|
+
stream: Buffer | null;
|
|
44
|
+
/** Raw stream bytes as stored (for images). */
|
|
45
|
+
raw: Buffer | null;
|
|
46
|
+
}
|
|
47
|
+
export declare function inflate(b: Buffer): Buffer | null;
|
|
48
|
+
/** Objects of a PDF, including those packed in object streams. Streams are decoded when they use FlateDecode. */
|
|
49
|
+
export declare function pdfObjects(buf: Buffer): PdfObj[];
|
|
50
|
+
/** A PDF string value: (literal) with escapes, or <hex>, UTF-16 when it starts with a byte order mark. */
|
|
51
|
+
export declare function pdfString(src: string): string;
|
|
52
|
+
/** D:YYYYMMDDHHmmSS+hh'mm' to epoch milliseconds. */
|
|
53
|
+
export declare function pdfDate(s: string | null): number | null;
|
|
54
|
+
interface PdfFont {
|
|
55
|
+
name: string;
|
|
56
|
+
cmap: {
|
|
57
|
+
map: Map<string, string>;
|
|
58
|
+
bytes: number;
|
|
59
|
+
} | null;
|
|
60
|
+
twoByte: boolean;
|
|
61
|
+
}
|
|
62
|
+
/** Text shown by a content stream, plus white filled boxes that are not page backgrounds. */
|
|
63
|
+
export declare function contentText(c: string, fonts: Map<string, PdfFont>): {
|
|
64
|
+
text: string;
|
|
65
|
+
whiteBoxes: number;
|
|
66
|
+
};
|
|
67
|
+
export declare function jpegMeta(b: Buffer): {
|
|
68
|
+
meta: Record<string, string>;
|
|
69
|
+
};
|
|
70
|
+
export declare function pngMeta(b: Buffer): {
|
|
71
|
+
meta: Record<string, string>;
|
|
72
|
+
};
|
|
73
|
+
export declare const IMAGE_EDITORS: RegExp;
|
|
74
|
+
export declare function officeScan(b: Buffer, type: DocResult['type'], nowMs: number): {
|
|
75
|
+
flags: [string, number][];
|
|
76
|
+
notes: string[];
|
|
77
|
+
metadata: Record<string, string>;
|
|
78
|
+
danger: boolean;
|
|
79
|
+
text: string;
|
|
80
|
+
office: NonNullable<DocResult['office']>;
|
|
81
|
+
};
|
|
82
|
+
export declare function docCheck(ctx: Ctx, file: Buffer, name?: string): Promise<ModuleResult<DocResult>>;
|
|
83
|
+
export {};
|