@sparrowai/sparrow-mcp 1.0.11 → 1.1.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/.agent/skills/README.md +67 -0
- package/.agent/skills/sparrow-comprehensive-security/SKILL.md +141 -0
- package/.agent/skills/sparrow-fix-vulnerabilities/SKILL.md +101 -0
- package/.agent/skills/sparrow-full-audit/SKILL.md +103 -0
- package/.agent/skills/sparrow-mcp-test/SKILL.md +199 -0
- package/.agent/skills/sparrow-quick-scan/SKILL.md +91 -0
- package/.agent/skills/sparrow-sca-check/SKILL.md +126 -0
- package/README.md +65 -0
- package/bin/sparrow-mcp-test.cjs +29 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/scripts/mcp-test/mcp-client.d.ts +39 -0
- package/dist/scripts/mcp-test/mcp-client.js +1 -0
- package/dist/scripts/test-runner/standalone-test.d.ts +1 -0
- package/dist/scripts/test-runner/standalone-test.js +1 -0
- package/dist/src/config/appConfig.js +1 -0
- package/dist/src/config/constants.d.ts +45 -0
- package/dist/src/config/constants.js +1 -0
- package/dist/src/controllers/__tests__/analysis.controller.test.d.ts +1 -0
- package/dist/src/controllers/__tests__/analysis.controller.test.js +1 -0
- package/dist/src/controllers/__tests__/sast.controller.test.d.ts +1 -0
- package/dist/src/controllers/__tests__/sast.controller.test.js +1 -0
- package/dist/src/controllers/__tests__/sca.controller.test.d.ts +1 -0
- package/dist/src/controllers/__tests__/sca.controller.test.js +1 -0
- package/dist/src/controllers/__tests__/security.controller.test.d.ts +1 -0
- package/dist/src/controllers/__tests__/security.controller.test.js +1 -0
- package/dist/src/controllers/__tests__/system.controller.test.d.ts +1 -0
- package/dist/src/controllers/__tests__/system.controller.test.js +1 -0
- package/dist/src/controllers/analysis.controller.d.ts +150 -0
- package/dist/src/controllers/analysis.controller.js +1 -0
- package/dist/src/controllers/sast.controller.d.ts +109 -0
- package/dist/src/controllers/sast.controller.js +1 -0
- package/dist/src/controllers/sca.controller.d.ts +119 -0
- package/dist/src/controllers/sca.controller.js +1 -0
- package/dist/src/controllers/security.controller.d.ts +30 -0
- package/dist/src/controllers/security.controller.js +1 -0
- package/dist/src/controllers/system.controller.d.ts +2 -0
- package/dist/src/controllers/system.controller.js +1 -0
- package/dist/src/schemas/tool.schemas.d.ts +51 -0
- package/dist/src/schemas/tool.schemas.js +1 -0
- package/dist/src/server.js +2 -0
- package/dist/src/services/__tests__/checker.service.test.d.ts +1 -0
- package/dist/src/services/__tests__/checker.service.test.js +1 -0
- package/dist/src/services/__tests__/llm.service.test.d.ts +1 -0
- package/dist/src/services/__tests__/llm.service.test.js +1 -0
- package/dist/src/services/__tests__/s3.service.test.d.ts +1 -0
- package/dist/src/services/__tests__/s3.service.test.js +1 -0
- package/dist/src/services/__tests__/sparrow.service.test.d.ts +1 -0
- package/dist/src/services/__tests__/sparrow.service.test.js +1 -0
- package/dist/{services → src/services}/analysis.service.d.ts +32 -10
- package/dist/src/services/analysis.service.js +1 -0
- package/dist/src/services/checker.service.d.ts +21 -0
- package/dist/src/services/checker.service.js +1 -0
- package/dist/src/services/llm/AnthropicProvider.d.ts +7 -0
- package/dist/src/services/llm/AnthropicProvider.js +1 -0
- package/dist/src/services/llm/BedrockProvider.d.ts +7 -0
- package/dist/src/services/llm/BedrockProvider.js +1 -0
- package/dist/src/services/llm/GeminiProvider.d.ts +7 -0
- package/dist/src/services/llm/GeminiProvider.js +1 -0
- package/dist/src/services/llm/LLMFactory.d.ts +4 -0
- package/dist/src/services/llm/LLMFactory.js +1 -0
- package/dist/src/services/llm/LLMProvider.d.ts +3 -0
- package/dist/src/services/llm/LLMProvider.js +1 -0
- package/dist/src/services/llm/OllamaProvider.d.ts +7 -0
- package/dist/src/services/llm/OllamaProvider.js +1 -0
- package/dist/src/services/llm/OpenAIProvider.d.ts +7 -0
- package/dist/src/services/llm/OpenAIProvider.js +1 -0
- package/dist/{services → src/services}/llm.service.d.ts +1 -2
- package/dist/src/services/llm.service.js +1 -0
- package/dist/src/services/s3.service.d.ts +33 -0
- package/dist/src/services/s3.service.js +1 -0
- package/dist/{services → src/services}/sparrow.service.d.ts +3 -15
- package/dist/src/services/sparrow.service.js +1 -0
- package/dist/src/types/types.d.ts +186 -0
- package/dist/src/types/types.js +1 -0
- package/dist/src/utils/__tests__/crypto.util.test.d.ts +1 -0
- package/dist/src/utils/__tests__/crypto.util.test.js +1 -0
- package/dist/src/utils/__tests__/diff.util.test.d.ts +1 -0
- package/dist/src/utils/__tests__/diff.util.test.js +1 -0
- package/dist/src/utils/__tests__/fileManager.test.d.ts +1 -0
- package/dist/src/utils/__tests__/fileManager.test.js +1 -0
- package/dist/src/utils/__tests__/fileManagerSecure.test.d.ts +1 -0
- package/dist/src/utils/__tests__/fileManagerSecure.test.js +1 -0
- package/dist/src/utils/__tests__/logger.test.d.ts +1 -0
- package/dist/src/utils/__tests__/logger.test.js +1 -0
- package/dist/src/utils/crypto.util.d.ts +3 -0
- package/dist/src/utils/crypto.util.js +1 -0
- package/dist/src/utils/diff.util.js +1 -0
- package/dist/src/utils/fileManager.d.ts +7 -0
- package/dist/src/utils/fileManager.js +1 -0
- package/dist/src/utils/fileManagerSecure.d.ts +8 -0
- package/dist/src/utils/fileManagerSecure.js +1 -0
- package/dist/src/utils/logger.js +1 -0
- package/package.json +28 -7
- package/test-cases-example.md +97 -0
- package/dist/config/appConfig.js +0 -1
- package/dist/server.js +0 -2
- package/dist/services/analysis.service.js +0 -1
- package/dist/services/llm.service.js +0 -1
- package/dist/services/s3.service.d.ts +0 -75
- package/dist/services/s3.service.js +0 -1
- package/dist/services/sparrow.service.js +0 -1
- package/dist/types/types.d.ts +0 -100
- package/dist/types/types.js +0 -1
- package/dist/utils/crypto.util.d.ts +0 -36
- package/dist/utils/crypto.util.js +0 -1
- package/dist/utils/diff.util.js +0 -1
- package/dist/utils/logger.js +0 -1
- /package/dist/{config → src/config}/appConfig.d.ts +0 -0
- /package/dist/{server.d.ts → src/server.d.ts} +0 -0
- /package/dist/{utils → src/utils}/diff.util.d.ts +0 -0
- /package/dist/{utils → src/utils}/logger.d.ts +0 -0
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
export interface AnalysisRequest {
|
|
2
|
+
fileContent: string;
|
|
3
|
+
fileName: string;
|
|
4
|
+
}
|
|
5
|
+
export interface FileInfo {
|
|
6
|
+
fileName: string;
|
|
7
|
+
fileContent: string;
|
|
8
|
+
}
|
|
9
|
+
export interface MultiFileAnalysisRequest {
|
|
10
|
+
files: FileInfo[];
|
|
11
|
+
zipFileName?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface MultiFileAnalysisRequestWithPaths {
|
|
14
|
+
filePaths: string[];
|
|
15
|
+
zipFileName?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface AnalysisStatus {
|
|
18
|
+
analysisId: string;
|
|
19
|
+
status: 'pending' | 'processing' | 'completed' | 'failed';
|
|
20
|
+
progress?: number;
|
|
21
|
+
message?: string;
|
|
22
|
+
vulnerabilities?: Vulnerability[];
|
|
23
|
+
analysisBrief?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface AnalysisResult {
|
|
26
|
+
analysisId: string;
|
|
27
|
+
status: 'completed' | 'failed';
|
|
28
|
+
result?: 'SUCCESS' | 'FAIL' | 'STOP';
|
|
29
|
+
vulnerabilities: Vulnerability[];
|
|
30
|
+
analysisBrief: string;
|
|
31
|
+
}
|
|
32
|
+
export interface Vulnerability {
|
|
33
|
+
checkerKey: string;
|
|
34
|
+
description: string;
|
|
35
|
+
severity: 'HIGH' | 'MEDIUM' | 'LOW';
|
|
36
|
+
lineNumber?: number;
|
|
37
|
+
filePath?: string;
|
|
38
|
+
}
|
|
39
|
+
export interface SparrowAnalysisRequest {
|
|
40
|
+
fileName: string;
|
|
41
|
+
fileContent: string;
|
|
42
|
+
}
|
|
43
|
+
export interface SparrowAnalysisResponse {
|
|
44
|
+
requestId: string;
|
|
45
|
+
analysisId?: string;
|
|
46
|
+
status: string;
|
|
47
|
+
message?: string;
|
|
48
|
+
}
|
|
49
|
+
export interface SparrowAnalysisResult {
|
|
50
|
+
requestId: string;
|
|
51
|
+
analysisId?: string;
|
|
52
|
+
status: string;
|
|
53
|
+
result?: 'SUCCESS' | 'FAIL' | 'STOP';
|
|
54
|
+
progress?: number;
|
|
55
|
+
downloadUrl?: string;
|
|
56
|
+
vulnerabilities?: any[];
|
|
57
|
+
}
|
|
58
|
+
export interface S3UploadResult {
|
|
59
|
+
success: boolean;
|
|
60
|
+
key?: string;
|
|
61
|
+
url?: string;
|
|
62
|
+
error?: string;
|
|
63
|
+
skippedFolders?: string[];
|
|
64
|
+
}
|
|
65
|
+
export interface LLMResponse {
|
|
66
|
+
content: string;
|
|
67
|
+
success: boolean;
|
|
68
|
+
error?: string;
|
|
69
|
+
}
|
|
70
|
+
export interface Config {
|
|
71
|
+
ollama: {
|
|
72
|
+
baseUrl: string;
|
|
73
|
+
model: string;
|
|
74
|
+
};
|
|
75
|
+
openai?: {
|
|
76
|
+
apiKey: string;
|
|
77
|
+
model: string;
|
|
78
|
+
};
|
|
79
|
+
anthropic?: {
|
|
80
|
+
apiKey: string;
|
|
81
|
+
model: string;
|
|
82
|
+
};
|
|
83
|
+
gemini?: {
|
|
84
|
+
apiKey: string;
|
|
85
|
+
model: string;
|
|
86
|
+
};
|
|
87
|
+
aws?: {
|
|
88
|
+
region: string;
|
|
89
|
+
accessKeyId?: string;
|
|
90
|
+
secretAccessKey?: string;
|
|
91
|
+
sessionToken?: string;
|
|
92
|
+
model: string;
|
|
93
|
+
};
|
|
94
|
+
s3: {
|
|
95
|
+
bucket: string;
|
|
96
|
+
region: string;
|
|
97
|
+
accessKeyId: string;
|
|
98
|
+
secretAccessKey: string;
|
|
99
|
+
endpoint?: string;
|
|
100
|
+
};
|
|
101
|
+
sparrow: {
|
|
102
|
+
baseUrl: string;
|
|
103
|
+
apiKey: string;
|
|
104
|
+
};
|
|
105
|
+
notion?: {
|
|
106
|
+
apiKey: string;
|
|
107
|
+
databaseId: string;
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
export interface ComplianceReference {
|
|
111
|
+
name: string;
|
|
112
|
+
version: string | null;
|
|
113
|
+
}
|
|
114
|
+
export interface ReferenceItem {
|
|
115
|
+
name: string;
|
|
116
|
+
reference: ComplianceReference;
|
|
117
|
+
}
|
|
118
|
+
export interface CodeExample {
|
|
119
|
+
codes: string[];
|
|
120
|
+
descriptions: string[];
|
|
121
|
+
}
|
|
122
|
+
export interface LocalizedCheckerInfo {
|
|
123
|
+
name: string;
|
|
124
|
+
description: string;
|
|
125
|
+
lang: string;
|
|
126
|
+
country: string;
|
|
127
|
+
examples: {
|
|
128
|
+
dangerous: CodeExample[];
|
|
129
|
+
safe: CodeExample[];
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
export interface CheckerInfo {
|
|
133
|
+
id: number;
|
|
134
|
+
key: string;
|
|
135
|
+
legacyKey?: string | null;
|
|
136
|
+
type: 'sast' | 'sca' | 'dast';
|
|
137
|
+
language: string;
|
|
138
|
+
level: number;
|
|
139
|
+
tags: string[];
|
|
140
|
+
localized: LocalizedCheckerInfo[];
|
|
141
|
+
referenceItems: ReferenceItem[];
|
|
142
|
+
options?: any[];
|
|
143
|
+
}
|
|
144
|
+
export interface VulnerabilityWithCheckerInfo extends Vulnerability {
|
|
145
|
+
checkerInfo?: {
|
|
146
|
+
name: string;
|
|
147
|
+
description: string;
|
|
148
|
+
compliance?: ReferenceItem[];
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
export interface ScaLicense {
|
|
152
|
+
name: string;
|
|
153
|
+
spdxId?: string;
|
|
154
|
+
url?: string;
|
|
155
|
+
}
|
|
156
|
+
export interface ScaVulnerability {
|
|
157
|
+
cveId: string;
|
|
158
|
+
severity: 'CRITICAL' | 'HIGH' | 'MEDIUM' | 'LOW';
|
|
159
|
+
cvssScore?: number;
|
|
160
|
+
description?: string;
|
|
161
|
+
fixedVersion?: string;
|
|
162
|
+
}
|
|
163
|
+
export interface ScaComponent {
|
|
164
|
+
name: string;
|
|
165
|
+
version: string;
|
|
166
|
+
purl?: string;
|
|
167
|
+
repository?: string;
|
|
168
|
+
repositoryUri?: string;
|
|
169
|
+
matchType?: string;
|
|
170
|
+
licenses: ScaLicense[];
|
|
171
|
+
issues: ScaVulnerability[];
|
|
172
|
+
confidenceScore?: number;
|
|
173
|
+
publishedDate?: string;
|
|
174
|
+
}
|
|
175
|
+
export interface ScaAnalysisResult {
|
|
176
|
+
analysisId: string;
|
|
177
|
+
status: 'completed' | 'failed';
|
|
178
|
+
result?: 'SUCCESS' | 'FAIL' | 'STOP';
|
|
179
|
+
components: ScaComponent[];
|
|
180
|
+
totalVulnerabilities: number;
|
|
181
|
+
criticalCount: number;
|
|
182
|
+
highCount: number;
|
|
183
|
+
mediumCount: number;
|
|
184
|
+
lowCount: number;
|
|
185
|
+
analysisBrief: string;
|
|
186
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a32_0x3b63(_0x13afc9,_0x1c52a2){_0x13afc9=_0x13afc9-0xd3;var _0x534cb9=a32_0xe6f2();var _0x2dcae8=_0x534cb9[_0x13afc9];return _0x2dcae8;}(function(_0x18d802,_0x5b3fbe){var _0x47e359=a32_0x3b63,_0x41691f=_0x18d802();while(!![]){try{var _0x3dae49=parseInt(_0x47e359(0xdf))/0x1+parseInt(_0x47e359(0xd9))/0x2*(parseInt(_0x47e359(0xd3))/0x3)+parseInt(_0x47e359(0xde))/0x4+parseInt(_0x47e359(0xd8))/0x5+parseInt(_0x47e359(0xd4))/0x6+-parseInt(_0x47e359(0xdd))/0x7+parseInt(_0x47e359(0xda))/0x8*(-parseInt(_0x47e359(0xdc))/0x9);if(_0x3dae49===_0x5b3fbe)break;else _0x41691f['push'](_0x41691f['shift']());}catch(_0x2a0aa3){_0x41691f['push'](_0x41691f['shift']());}}}(a32_0xe6f2,0x7eb1c));var a32_0x11839c=(function(){var _0x39593d=!![];return function(_0xc86d1c,_0x23f530){var _0x7af51f=_0x39593d?function(){if(_0x23f530){var _0x46e2c3=_0x23f530['apply'](_0xc86d1c,arguments);return _0x23f530=null,_0x46e2c3;}}:function(){};return _0x39593d=![],_0x7af51f;};}()),a32_0x2dcae8=a32_0x11839c(this,function(){var _0x44aad4=a32_0x3b63;return a32_0x2dcae8[_0x44aad4(0xd6)]()[_0x44aad4(0xd5)](_0x44aad4(0xd7)+'+$')['toString']()[_0x44aad4(0xdb)+'r'](a32_0x2dcae8)['search'](_0x44aad4(0xd7)+'+$');});function a32_0xe6f2(){var _0x5813af=['2162594zDyFLq','2701704fdMuiS','448559NTiJQP','3pidRQt','1891596nEoQut','search','toString','(((.+)+)+)','2653520LCbYqr','578142RNrGAs','96voIDXo','constructo','1073358ThjqUJ'];a32_0xe6f2=function(){return _0x5813af;};return a32_0xe6f2();}a32_0x2dcae8();export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a38_0x5ae6(_0x4f623c,_0x6d54b){_0x4f623c=_0x4f623c-0x150;const _0xa08e37=a38_0x47a3();let _0x139c37=_0xa08e37[_0x4f623c];return _0x139c37;}const a38_0x95b223=a38_0x5ae6;(function(_0x52dfce,_0x3e9b1a){const _0xfd2266=a38_0x5ae6,_0x3a3b8e=_0x52dfce();while(!![]){try{const _0x255453=parseInt(_0xfd2266(0x173))/0x1+parseInt(_0xfd2266(0x178))/0x2+parseInt(_0xfd2266(0x15d))/0x3+-parseInt(_0xfd2266(0x161))/0x4*(parseInt(_0xfd2266(0x184))/0x5)+parseInt(_0xfd2266(0x16f))/0x6+parseInt(_0xfd2266(0x176))/0x7*(parseInt(_0xfd2266(0x157))/0x8)+-parseInt(_0xfd2266(0x17b))/0x9;if(_0x255453===_0x3e9b1a)break;else _0x3a3b8e['push'](_0x3a3b8e['shift']());}catch(_0x5f9859){_0x3a3b8e['push'](_0x3a3b8e['shift']());}}}(a38_0x47a3,0x83917));const a38_0x5f5314=(function(){let _0x180497=!![];return function(_0x30968c,_0x298323){const _0x4e948e=_0x180497?function(){if(_0x298323){const _0x372576=_0x298323['apply'](_0x30968c,arguments);return _0x298323=null,_0x372576;}}:function(){};return _0x180497=![],_0x4e948e;};}()),a38_0x139c37=a38_0x5f5314(this,function(){const _0x162c02=a38_0x5ae6;return a38_0x139c37['toString']()[_0x162c02(0x16c)](_0x162c02(0x152)+'+$')[_0x162c02(0x15b)]()[_0x162c02(0x166)+'r'](a38_0x139c37)[_0x162c02(0x16c)](_0x162c02(0x152)+'+$');});a38_0x139c37();function a38_0x47a3(){const _0x390987=['1091454VaWsLh','CryptoUtil','ecret\x20Mess','toBe','264804KPJCne','key2','not','Hello,\x20Wor','test-secre','constructo','ong\x20key','rypt\x20and\x20d','erent\x20keys','S3_Key_Enc','strings','search','rypt_2024','Secret\x20Dat','5143542aucnqk','correct-ke','rectly\x20enc','pCSFR','279136qEFcfZ','with\x20the\x20i','Internal\x20S','7ZeCJtV','l\x20to\x20decry','765534hvbUSJ','dle\x20empty\x20','encrypted\x20','13820553QfBrKJ','t\x20for\x20diff','tring','rent\x20outpu','age','should\x20pro','should\x20cor','t-key','ing\x20&\x20decr','5sOTIua','pt\x20with\x20wr','code','(((.+)+)+)','should\x20han','decryptInt','rs\x20and\x20uni','azxwY','2061944dFBWuR','^&*()\x20한글\x20🚀','ld!','Hello\x20@#$%','toString','should\x20dec'];a38_0x47a3=function(){return _0x390987;};return a38_0x47a3();}import{encryptString,decryptString,decryptInternal}from'../crypto.util.js';describe(a38_0x95b223(0x15e),()=>{const _0x2c6214=a38_0x95b223,_0x523b18={'pCSFR':_0x2c6214(0x164)+_0x2c6214(0x159),'azxwY':function(_0x459a0e,_0x5d9f16,_0x1b0864){return _0x459a0e(_0x5d9f16,_0x1b0864);}},_0x4c055d=_0x2c6214(0x165)+_0x2c6214(0x182),_0x5a0d87=_0x2c6214(0x16a)+_0x2c6214(0x16d);describe('encryptStr'+_0x2c6214(0x183)+'yptString',()=>{const _0x5123b5=_0x2c6214;it(_0x5123b5(0x181)+_0x5123b5(0x171)+_0x5123b5(0x168)+'ecrypt\x20a\x20s'+_0x5123b5(0x17d),()=>{const _0xb7279f=_0x5123b5,_0x4947a7=_0x523b18[_0xb7279f(0x172)],_0x13f373=encryptString(_0x4947a7,_0x4c055d),_0x5b010=_0x523b18[_0xb7279f(0x156)](decryptString,_0x13f373,_0x4c055d);expect(_0x5b010)[_0xb7279f(0x160)](_0x4947a7),expect(_0x13f373)[_0xb7279f(0x163)][_0xb7279f(0x160)](_0x4947a7);}),it(_0x5123b5(0x153)+_0x5123b5(0x179)+_0x5123b5(0x16b),()=>{const _0x42534c=_0x5123b5,_0x727ccb='',_0x3ee134=encryptString(_0x727ccb,_0x4c055d),_0x204876=decryptString(_0x3ee134,_0x4c055d);expect(_0x204876)[_0x42534c(0x160)](_0x727ccb);}),_0x523b18[_0x5123b5(0x156)](it,'should\x20han'+'dle\x20specia'+'l\x20characte'+_0x5123b5(0x155)+_0x5123b5(0x151),()=>{const _0x51022a=_0x5123b5,_0x210ac3=_0x51022a(0x15a)+_0x51022a(0x158),_0x74d3f2=encryptString(_0x210ac3,_0x4c055d),_0x4caede=decryptString(_0x74d3f2,_0x4c055d);expect(_0x4caede)['toBe'](_0x210ac3);}),it(_0x5123b5(0x180)+'duce\x20diffe'+_0x5123b5(0x17e)+_0x5123b5(0x17c)+_0x5123b5(0x169),()=>{const _0x3c073b=_0x5123b5,_0x31dcd7=_0x3c073b(0x16e)+'a',_0x294cbc=encryptString(_0x31dcd7,'key1'),_0x33a8da=encryptString(_0x31dcd7,_0x3c073b(0x162));expect(_0x294cbc)[_0x3c073b(0x163)][_0x3c073b(0x160)](_0x33a8da);}),it('should\x20fai'+_0x5123b5(0x177)+_0x5123b5(0x150)+_0x5123b5(0x167),()=>{const _0x229890=_0x5123b5,_0x519de7=_0x229890(0x16e)+'a',_0x1cdd6c=encryptString(_0x519de7,_0x229890(0x170)+'y'),_0x3555c6=decryptString(_0x1cdd6c,'wrong-key');expect(_0x3555c6)[_0x229890(0x163)]['toBe'](_0x519de7);});}),describe(_0x2c6214(0x154)+'ernal',()=>{const _0x1d64c3=_0x2c6214;_0x523b18[_0x1d64c3(0x156)](it,_0x1d64c3(0x15c)+'rypt\x20data\x20'+_0x1d64c3(0x17a)+_0x1d64c3(0x174)+'nternal\x20ke'+'y',()=>{const _0x2bc5f7=_0x1d64c3,_0x4f5683=_0x2bc5f7(0x175)+_0x2bc5f7(0x15f)+_0x2bc5f7(0x17f),_0x36e062=encryptString(_0x4f5683,_0x5a0d87),_0x49e72c=decryptInternal(_0x36e062);expect(_0x49e72c)[_0x2bc5f7(0x160)](_0x4f5683);});});});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x2989d0,_0x425c21){const _0x383c4a=a39_0x23c3,_0x153683=_0x2989d0();while(!![]){try{const _0x127d68=parseInt(_0x383c4a(0xe3))/0x1*(parseInt(_0x383c4a(0xbc))/0x2)+parseInt(_0x383c4a(0xd3))/0x3+parseInt(_0x383c4a(0x9c))/0x4+parseInt(_0x383c4a(0xc9))/0x5*(parseInt(_0x383c4a(0xac))/0x6)+-parseInt(_0x383c4a(0xbf))/0x7+-parseInt(_0x383c4a(0xc1))/0x8+-parseInt(_0x383c4a(0xd2))/0x9*(-parseInt(_0x383c4a(0xa6))/0xa);if(_0x127d68===_0x425c21)break;else _0x153683['push'](_0x153683['shift']());}catch(_0x40ceb4){_0x153683['push'](_0x153683['shift']());}}}(a39_0x370d,0xbe34e));const a39_0x23065d=(function(){let _0x300499=!![];return function(_0x54768d,_0xb06d42){const _0x1cfa39=_0x300499?function(){const _0x400e0e=a39_0x23c3;if(_0xb06d42){const _0x4ed0b1=_0xb06d42[_0x400e0e(0xc2)](_0x54768d,arguments);return _0xb06d42=null,_0x4ed0b1;}}:function(){};return _0x300499=![],_0x1cfa39;};}()),a39_0x4e34de=a39_0x23065d(this,function(){const _0x5a4829=a39_0x23c3;return a39_0x4e34de[_0x5a4829(0xa2)]()[_0x5a4829(0xc6)](_0x5a4829(0x9f)+'+$')[_0x5a4829(0xa2)]()['constructo'+'r'](a39_0x4e34de)[_0x5a4829(0xc6)](_0x5a4829(0x9f)+'+$');});a39_0x4e34de();function a39_0x370d(){const _0x6337e2=['dle\x20comple','\x20}\x0a}','tring\x20quer','ifiedDiff','4661ktepaO','conn.prepa','execute(qu','rect\x20ident','---\x20원본\x20코드','d\x20+\x20\x22\x27\x22;','g\x20id,\x20Stri','generateUn','+\x20\x22\x27\x22;\x0a\x20\x20\x20','erate\x20a\x20un','\x20id=\x27\x22\x20+\x20i','1346252SWfQfB','erate\x20a\x20si','ery);\x0a\x20\x20\x20\x20','(((.+)+)+)','cal\x20code','computeHun','toString','string','slice','\x20id=?\x22;','639310FJQutd','rent\x20conte','c\x20void\x20doL','\x20\x20\x20\x20\x20stmt.','rs\x20WHERE\x20i','T\x20*\x20FROM\x20u','48PgZpxo','tmt.setStr','toBe','public\x20cla','PNQZa','should\x20han','+++\x20안전한\x20코드','=\x20\x22SELECT\x20','ng\x20pw)\x20{\x0a\x20','ing(1,\x20id)','\x20\x20\x20\x20\x20\x20\x20Str','t\x20pstmt\x20=\x20','d=?\x22;\x0a\x20\x20\x20\x20','dle\x20identi','reStatemen','generateDi','548GTVesl','ogin(Strin','\x20\x20\x20\x20\x20\x20\x20\x20ps','10446037zwKycu','ify\x20change','7956768PptZzq','apply','forEach','A\x0aMODIFIED','sers\x20WHERE','search','ss\x20Login\x20{','+MODIFIED','386050ehBwpA','ing\x20query\x20','ZXpgX','mple\x20diff\x20','+++\x20b/','split','wmUAL','pstmt.exec','\x20format','99KzDCca','994125zIlERZ',';\x0a\x20\x20\x20\x20\x20\x20\x20\x20','ute();\x0a\x20\x20\x20','y\x20=\x20\x22SELEC','Login.java','+\x20\x20\x20\x20\x20\x20\x20\x20S','---\x20a/','t(query);\x0a','MrPCW','A\x0aB\x0aC','edStatemen','toContain'];a39_0x370d=function(){return _0x6337e2;};return a39_0x370d();}import{DiffUtil}from'../diff.util.js';function a39_0x23c3(_0x12e9a3,_0x1cab21){_0x12e9a3=_0x12e9a3-0x9c;const _0x3be29d=a39_0x370d();let _0x4e34de=_0x3be29d[_0x12e9a3];return _0x4e34de;}describe('DiffUtil',()=>{const _0x548522=a39_0x23c3,_0x504618={'PNQZa':_0x548522(0xe7),'MrPCW':'should\x20gen'+_0x548522(0x9d)+_0x548522(0xcc)+_0x548522(0xa3),'ZejTj':_0x548522(0xd7),'wmUAL':_0x548522(0xc8),'ZXpgX':function(_0x4f3bee,_0x245528,_0x136b68){return _0x4f3bee(_0x245528,_0x136b68);}},_0x438213=_0x548522(0xaf)+_0x548522(0xc7)+'\x0a\x20\x20\x20\x20publi'+_0x548522(0xa8)+_0x548522(0xbd)+_0x548522(0xe9)+_0x548522(0xb4)+_0x548522(0xb6)+_0x548522(0xca)+'=\x20\x22SELECT\x20'+'*\x20FROM\x20use'+'rs\x20WHERE\x20i'+'d=\x27\x22\x20+\x20id\x20'+_0x548522(0xeb)+_0x548522(0xa9)+_0x548522(0xe5)+_0x548522(0x9e)+'}\x0a}',_0x3f6f56=_0x548522(0xaf)+_0x548522(0xc7)+'\x0a\x20\x20\x20\x20publi'+'c\x20void\x20doL'+_0x548522(0xbd)+_0x548522(0xe9)+'ng\x20pw)\x20{\x0a\x20'+_0x548522(0xb6)+_0x548522(0xca)+_0x548522(0xb3)+'*\x20FROM\x20use'+_0x548522(0xaa)+_0x548522(0xb8)+'\x20\x20\x20\x20Prepar'+_0x548522(0xdd)+_0x548522(0xb7)+_0x548522(0xe4)+_0x548522(0xba)+_0x548522(0xda)+_0x548522(0xbe)+_0x548522(0xad)+_0x548522(0xb5)+_0x548522(0xd4)+_0x548522(0xd0)+_0x548522(0xd5)+_0x548522(0xe0);describe(_0x548522(0xbb)+'ff',()=>{const _0x59b1e1=_0x548522;it(_0x504618[_0x59b1e1(0xdb)],()=>{const _0x1b6a98=_0x59b1e1,_0x2611b6=DiffUtil[_0x1b6a98(0xbb)+'ff'](_0x438213,_0x3f6f56);expect(_0x2611b6)[_0x1b6a98(0xde)](_0x504618[_0x1b6a98(0xb0)]),expect(_0x2611b6)[_0x1b6a98(0xde)](_0x1b6a98(0xb2)),expect(_0x2611b6)['toContain']('-\x20\x20\x20\x20\x20\x20\x20\x20S'+_0x1b6a98(0xe1)+_0x1b6a98(0xd6)+'T\x20*\x20FROM\x20u'+_0x1b6a98(0xc5)+_0x1b6a98(0xed)+_0x1b6a98(0xe8)),expect(_0x2611b6)[_0x1b6a98(0xde)](_0x1b6a98(0xd8)+_0x1b6a98(0xe1)+_0x1b6a98(0xd6)+_0x1b6a98(0xab)+'sers\x20WHERE'+_0x1b6a98(0xa5));}),it(_0x59b1e1(0xb1)+_0x59b1e1(0xb9)+_0x59b1e1(0xa0),()=>{const _0x4668db=_0x59b1e1,_0x258a1a=DiffUtil[_0x4668db(0xbb)+'ff'](_0x438213,_0x438213),_0x286e76=_0x258a1a[_0x4668db(0xce)]('\x0a'),_0x52e9af=_0x286e76[_0x4668db(0xa4)](0x3);_0x52e9af[_0x4668db(0xc3)](_0x47be42=>{const _0x3198ea=_0x4668db;expect(_0x47be42['startsWith']('-'))[_0x3198ea(0xae)](![]),expect(_0x47be42['startsWith']('+'))[_0x3198ea(0xae)](![]);});});}),describe(_0x548522(0xea)+_0x548522(0xe2),()=>{const _0x5e2956=_0x548522;it('should\x20gen'+_0x5e2956(0xec)+'ified\x20diff'+_0x5e2956(0xd1),()=>{const _0x8823c3=_0x5e2956,_0x22ccb7=_0x504618['ZejTj'],_0x260821=DiffUtil[_0x8823c3(0xea)+_0x8823c3(0xe2)](_0x438213,_0x3f6f56,_0x22ccb7);expect(_0x260821)['toContain'](_0x8823c3(0xd9)+_0x22ccb7),expect(_0x260821)[_0x8823c3(0xde)](_0x8823c3(0xcd)+_0x22ccb7),expect(_0x260821)[_0x8823c3(0xde)]('@@');});}),describe(_0x548522(0xa1)+'ks',()=>{const _0x34699d=_0x548522;_0x504618[_0x34699d(0xcb)](it,'should\x20cor'+_0x34699d(0xe6)+_0x34699d(0xc0)+'s',()=>{const _0x5c6734=_0x34699d,_0x26dde7=DiffUtil[_0x5c6734(0xea)+_0x5c6734(0xe2)](_0x5c6734(0xdc),_0x5c6734(0xc4)+'\x0aC');expect(_0x26dde7)[_0x5c6734(0xde)]('-B'),expect(_0x26dde7)[_0x5c6734(0xde)](_0x504618[_0x5c6734(0xcf)]);}),it(_0x34699d(0xb1)+_0x34699d(0xdf)+'tely\x20diffe'+_0x34699d(0xa7)+'nt',()=>{const _0x1f13f9=_0x34699d,_0x26dc8e=DiffUtil[_0x1f13f9(0xea)+_0x1f13f9(0xe2)]('A','B');expect(_0x26dc8e)[_0x1f13f9(0xde)]('-A'),expect(_0x26dc8e)[_0x1f13f9(0xde)]('+B');});});});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a40_0x1f5256=a40_0x38d6;(function(_0xd90904,_0x108218){const _0x1f1a0e=a40_0x38d6,_0x4d97c4=_0xd90904();while(!![]){try{const _0x3a263=parseInt(_0x1f1a0e(0x9e))/0x1*(parseInt(_0x1f1a0e(0x8b))/0x2)+parseInt(_0x1f1a0e(0x9c))/0x3+-parseInt(_0x1f1a0e(0x9d))/0x4+parseInt(_0x1f1a0e(0x86))/0x5*(-parseInt(_0x1f1a0e(0x98))/0x6)+-parseInt(_0x1f1a0e(0x74))/0x7+parseInt(_0x1f1a0e(0x95))/0x8+parseInt(_0x1f1a0e(0x76))/0x9;if(_0x3a263===_0x108218)break;else _0x4d97c4['push'](_0x4d97c4['shift']());}catch(_0x212153){_0x4d97c4['push'](_0x4d97c4['shift']());}}}(a40_0x1236,0x93477));function a40_0x1236(){const _0x121aec=['toHaveBeen','deleteFile','clearAllMo','mockReturn','search','Auhbt','2680536NATfCx','\x20to\x20file','readFileSy','4409184tIVkGy','utf-8','ete\x20file\x20i','unlinkSync','255057dlUraE','884540Ubefxg','1LvlGlR','should\x20wri','(((.+)+)+)','constructo','ync','Called','cks','not','FileManage','../fileMan','5167841vHbzVI','should\x20not','7299603obuLsf','should\x20rea','te\x20content','mtFZb','CalledWith','krcrN','stringCont','toString','ager.js','existsSync','should\x20del','unstable_m','ockModule','writeFileS','d\x20file\x20con','writeFile','5hwClCW','aining','test.txt','readFile','tent','2132728Cmyxth','f\x20exists','RCkxT','content'];a40_0x1236=function(){return _0x121aec;};return a40_0x1236();}const a40_0x4a33c6=(function(){let _0x535ff4=!![];return function(_0x3a91fc,_0x14b7cc){const _0x55caf2=_0x535ff4?function(){if(_0x14b7cc){const _0x4b0165=_0x14b7cc['apply'](_0x3a91fc,arguments);return _0x14b7cc=null,_0x4b0165;}}:function(){};return _0x535ff4=![],_0x55caf2;};}()),a40_0x49838e=a40_0x4a33c6(this,function(){const _0x293cc4=a40_0x38d6;return a40_0x49838e[_0x293cc4(0x7d)]()[_0x293cc4(0x93)](_0x293cc4(0xa0)+'+$')[_0x293cc4(0x7d)]()[_0x293cc4(0xa1)+'r'](a40_0x49838e)[_0x293cc4(0x93)](_0x293cc4(0xa0)+'+$');});a40_0x49838e();import{jest,describe,it,expect,beforeEach}from'@jest/globals';const mockReadFileSync=jest['fn'](),mockWriteFileSync=jest['fn'](),mockExistsSync=jest['fn'](),mockUnlinkSync=jest['fn'](),a40_0x2a6443={};a40_0x2a6443[a40_0x1f5256(0x97)+'nc']=mockReadFileSync,a40_0x2a6443[a40_0x1f5256(0x83)+a40_0x1f5256(0x6e)]=mockWriteFileSync,a40_0x2a6443[a40_0x1f5256(0x7f)]=mockExistsSync,a40_0x2a6443[a40_0x1f5256(0x9b)]=mockUnlinkSync,jest[a40_0x1f5256(0x81)+a40_0x1f5256(0x82)]('fs',()=>({'default':a40_0x2a6443,'readFileSync':mockReadFileSync,'writeFileSync':mockWriteFileSync,'existsSync':mockExistsSync,'unlinkSync':mockUnlinkSync}));const {FileManager}=await import(a40_0x1f5256(0x73)+a40_0x1f5256(0x7e));function a40_0x38d6(_0x59039e,_0x348317){_0x59039e=_0x59039e-0x6e;const _0x174892=a40_0x1236();let _0x49838e=_0x174892[_0x59039e];return _0x49838e;}describe(a40_0x1f5256(0x72)+'r',()=>{const _0x17bdcb=a40_0x1f5256,_0x174978={'RCkxT':_0x17bdcb(0x8e),'krcrN':_0x17bdcb(0x88),'mtFZb':function(_0x48f306,_0xab80ea,_0x4700c1){return _0x48f306(_0xab80ea,_0x4700c1);}};let _0x4e9bc9;const _0x39e6aa='/base/dir';beforeEach(()=>{const _0x16971f=_0x17bdcb;jest[_0x16971f(0x91)+_0x16971f(0x70)](),_0x4e9bc9=new FileManager(_0x39e6aa);}),describe(_0x17bdcb(0x89),()=>{const _0x20573c=_0x17bdcb;it(_0x20573c(0x77)+_0x20573c(0x84)+_0x20573c(0x8a),()=>{const _0x2cbe54=_0x20573c;mockReadFileSync['mockReturn'+'Value'](_0x174978[_0x2cbe54(0x8d)]);const _0x5c2320=_0x4e9bc9[_0x2cbe54(0x89)](_0x174978[_0x2cbe54(0x7b)]);expect(_0x5c2320)['toBe'](_0x2cbe54(0x8e)),expect(mockReadFileSync)[_0x2cbe54(0x8f)+'CalledWith'](expect[_0x2cbe54(0x7c)+_0x2cbe54(0x87)](_0x2cbe54(0x88)),_0x2cbe54(0x99));});}),describe(_0x17bdcb(0x85),()=>{const _0x5b95bd=_0x17bdcb;it(_0x5b95bd(0x9f)+_0x5b95bd(0x78)+_0x5b95bd(0x96),()=>{const _0xb49671=_0x5b95bd;_0xb49671(0x94)==='ggWZm'?(_0x49cbc3['writeFile'](_0xb49671(0x88),_0xb49671(0x8e)),_0x214a28(_0x27c127)['toHaveBeen'+'CalledWith'](_0x5c0644[_0xb49671(0x7c)+_0xb49671(0x87)](_0xb49671(0x88)),'content',_0xb49671(0x99))):(_0x4e9bc9[_0xb49671(0x85)]('test.txt',_0xb49671(0x8e)),expect(mockWriteFileSync)[_0xb49671(0x8f)+_0xb49671(0x7a)](expect['stringCont'+_0xb49671(0x87)](_0xb49671(0x88)),_0xb49671(0x8e),_0xb49671(0x99)));});}),_0x174978[_0x17bdcb(0x79)](describe,_0x17bdcb(0x90),()=>{const _0x27c955=_0x17bdcb;it(_0x27c955(0x80)+_0x27c955(0x9a)+_0x27c955(0x8c),()=>{const _0x2115cb=_0x27c955;mockExistsSync[_0x2115cb(0x92)+'Value'](!![]),_0x4e9bc9[_0x2115cb(0x90)](_0x2115cb(0x88)),expect(mockUnlinkSync)[_0x2115cb(0x8f)+_0x2115cb(0x6f)]();}),it(_0x27c955(0x75)+'\x20delete\x20fi'+'le\x20if\x20not\x20'+'exists',()=>{const _0x38cb3c=_0x27c955;mockExistsSync[_0x38cb3c(0x92)+'Value'](![]),_0x4e9bc9['deleteFile'](_0x38cb3c(0x88)),expect(mockUnlinkSync)[_0x38cb3c(0x71)][_0x38cb3c(0x8f)+'Called']();});});});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a41_0x5507bd=a41_0x36fb;(function(_0x3a1a5f,_0xfdd837){const _0x443466=a41_0x36fb,_0x370630=_0x3a1a5f();while(!![]){try{const _0x519abc=-parseInt(_0x443466(0x142))/0x1+-parseInt(_0x443466(0x13a))/0x2*(-parseInt(_0x443466(0x12f))/0x3)+-parseInt(_0x443466(0x145))/0x4*(parseInt(_0x443466(0x132))/0x5)+-parseInt(_0x443466(0x138))/0x6*(parseInt(_0x443466(0x144))/0x7)+parseInt(_0x443466(0x14e))/0x8+parseInt(_0x443466(0x13d))/0x9+-parseInt(_0x443466(0x147))/0xa*(-parseInt(_0x443466(0x141))/0xb);if(_0x519abc===_0xfdd837)break;else _0x370630['push'](_0x370630['shift']());}catch(_0x19c1b5){_0x370630['push'](_0x370630['shift']());}}}(a41_0x19a6,0xd3ec3));const a41_0x575aec=(function(){let _0x10535c=!![];return function(_0x373fe7,_0x409a6a){const _0x16895b=_0x10535c?function(){const _0x3df3f9=a41_0x36fb;if(_0x409a6a){const _0x1ddf10=_0x409a6a[_0x3df3f9(0x127)](_0x373fe7,arguments);return _0x409a6a=null,_0x1ddf10;}}:function(){};return _0x10535c=![],_0x16895b;};}()),a41_0x389ea2=a41_0x575aec(this,function(){const _0x4ebf89=a41_0x36fb;return a41_0x389ea2[_0x4ebf89(0x156)]()[_0x4ebf89(0x152)]('(((.+)+)+)'+'+$')[_0x4ebf89(0x156)]()[_0x4ebf89(0x130)+'r'](a41_0x389ea2)['search'](_0x4ebf89(0x131)+'+$');});function a41_0x19a6(){const _0x503b28=['60068cbViMk','content','../hack.tx','228051YCBdIE','agerSecure','n\x20path\x20tra','toBe','92389AkiVIP','1282127QULdkR','should\x20wri','518sGaVWL','2868bMboSc','toHaveBeen','2620saiFyn','/base/dir','wwjBE','FileManage','.js','urely','XVNHm','9624512XJQmqr','test.txt','r\x20(Secure)','ied','search','Value','toThrow','readFile','toString','ow\x20error\x20o','ockModule','curely','clearAllMo','unstable_m','../../etc/','apply','egWcK','writeFileS','cks','ync','should\x20thr','passwd','writeFile','51COcWRF','constructo','(((.+)+)+)','4255lezTWw','issPl','Access\x20den','../fileMan','versal','d\x20file\x20sec','95610ZMkFKN','readFileSy'];a41_0x19a6=function(){return _0x503b28;};return a41_0x19a6();}a41_0x389ea2();import{jest,describe,it,expect,beforeEach}from'@jest/globals';import a41_0x1d2edf from'path';const mockReadFileSync=jest['fn'](),mockWriteFileSync=jest['fn'](),mockExistsSync=jest['fn'](),mockUnlinkSync=jest['fn'](),a41_0xa2a855={};a41_0xa2a855[a41_0x5507bd(0x139)+'nc']=mockReadFileSync,a41_0xa2a855[a41_0x5507bd(0x129)+a41_0x5507bd(0x12b)]=mockWriteFileSync,a41_0xa2a855['existsSync']=mockExistsSync,a41_0xa2a855['unlinkSync']=mockUnlinkSync,jest[a41_0x5507bd(0x15b)+a41_0x5507bd(0x158)]('fs',()=>({'default':a41_0xa2a855,'readFileSync':mockReadFileSync,'writeFileSync':mockWriteFileSync,'existsSync':mockExistsSync,'unlinkSync':mockUnlinkSync}));const {FileManager}=await import(a41_0x5507bd(0x135)+a41_0x5507bd(0x13e)+a41_0x5507bd(0x14b));function a41_0x36fb(_0x47d523,_0x400639){_0x47d523=_0x47d523-0x126;const _0x49948c=a41_0x19a6();let _0x389ea2=_0x49948c[_0x47d523];return _0x389ea2;}describe(a41_0x5507bd(0x14a)+a41_0x5507bd(0x150),()=>{const _0x59f91a=a41_0x5507bd,_0x1c5d7a={'egWcK':_0x59f91a(0x12c)+'ow\x20error\x20o'+_0x59f91a(0x13f)+_0x59f91a(0x136),'wwjBE':function(_0xfae8c5,_0x4dd0b2,_0x50e52f){return _0xfae8c5(_0x4dd0b2,_0x50e52f);},'XVNHm':_0x59f91a(0x12e)};let _0xd736d4;const _0x17e6fb=a41_0x1d2edf['resolve'](_0x59f91a(0x148));beforeEach(()=>{const _0x4d0ea9=_0x59f91a;jest[_0x4d0ea9(0x15a)+_0x4d0ea9(0x12a)](),_0xd736d4=new FileManager(_0x17e6fb);}),describe('readFile',()=>{const _0x17b87d=_0x59f91a;it('should\x20rea'+_0x17b87d(0x137)+_0x17b87d(0x14c),()=>{const _0x387c00=_0x17b87d;mockReadFileSync['mockReturn'+_0x387c00(0x153)](_0x387c00(0x13b));const _0x2f409e=_0xd736d4['readFile'](_0x387c00(0x14f));expect(_0x2f409e)[_0x387c00(0x140)]('content');}),it(_0x1c5d7a[_0x17b87d(0x128)],()=>{const _0x5ca7db=_0x17b87d;expect(()=>{const _0x2a4527=a41_0x36fb;_0xd736d4[_0x2a4527(0x155)](_0x2a4527(0x126)+_0x2a4527(0x12d));})[_0x5ca7db(0x154)](_0x5ca7db(0x134)+_0x5ca7db(0x151));});}),_0x1c5d7a[_0x59f91a(0x149)](describe,_0x1c5d7a[_0x59f91a(0x14d)],()=>{const _0x1309d8=_0x59f91a,_0x288897={};_0x288897['issPl']=_0x1309d8(0x134)+_0x1309d8(0x151);const _0x1796f8=_0x288897;it(_0x1309d8(0x143)+'te\x20file\x20se'+_0x1309d8(0x159),()=>{const _0x4ce8f1=_0x1309d8;_0xd736d4[_0x4ce8f1(0x12e)]('test.txt','content'),expect(mockWriteFileSync)[_0x4ce8f1(0x146)+'Called']();}),it('should\x20thr'+_0x1309d8(0x157)+_0x1309d8(0x13f)+_0x1309d8(0x136),()=>{const _0x3fc88b=_0x1309d8;expect(()=>{const _0x4a37d9=a41_0x36fb;_0xd736d4['writeFile'](_0x4a37d9(0x13c)+'t',_0x4a37d9(0x13b));})[_0x3fc88b(0x154)](_0x1796f8[_0x3fc88b(0x133)]);});});});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a42_0x13b425=a42_0xd981;function a42_0xd981(_0x4202a8,_0x30942b){_0x4202a8=_0x4202a8-0x1a0;const _0xae75f3=a42_0x515b();let _0xce31ed=_0xae75f3[_0x4202a8];return _0xce31ed;}(function(_0x21fa66,_0x3a474d){const _0x5cc3a9=a42_0xd981,_0x53e13b=_0x21fa66();while(!![]){try{const _0x5c0a28=-parseInt(_0x5cc3a9(0x1bc))/0x1+parseInt(_0x5cc3a9(0x1ac))/0x2*(-parseInt(_0x5cc3a9(0x1b5))/0x3)+-parseInt(_0x5cc3a9(0x1af))/0x4*(parseInt(_0x5cc3a9(0x1a5))/0x5)+-parseInt(_0x5cc3a9(0x1bd))/0x6+parseInt(_0x5cc3a9(0x1a3))/0x7+parseInt(_0x5cc3a9(0x1b7))/0x8+parseInt(_0x5cc3a9(0x1a6))/0x9;if(_0x5c0a28===_0x3a474d)break;else _0x53e13b['push'](_0x53e13b['shift']());}catch(_0x39cf49){_0x53e13b['push'](_0x53e13b['shift']());}}}(a42_0x515b,0xe1d8d));const a42_0x55b655=(function(){let _0x64c04e=!![];return function(_0x18343d,_0x2cdec6){const _0x33592a=_0x64c04e?function(){const _0x154080=a42_0xd981;if(_0x2cdec6){const _0x171fbe=_0x2cdec6[_0x154080(0x1a2)](_0x18343d,arguments);return _0x2cdec6=null,_0x171fbe;}}:function(){};return _0x64c04e=![],_0x33592a;};}()),a42_0xce31ed=a42_0x55b655(this,function(){const _0xee7870=a42_0xd981;return a42_0xce31ed['toString']()[_0xee7870(0x1b4)](_0xee7870(0x1aa)+'+$')['toString']()['constructo'+'r'](a42_0xce31ed)[_0xee7870(0x1b4)](_0xee7870(0x1aa)+'+$');});a42_0xce31ed();import{jest,describe,it,expect}from'@jest/globals';const mockInfo=jest['fn'](),mockWarn=jest['fn'](),mockError=jest['fn'](),mockDebug=jest['fn'](),mockLogger={'info':mockInfo,'warn':mockWarn,'error':mockError,'debug':mockDebug,'add':jest['fn']()},mockCreateLogger=jest['fn'](()=>mockLogger),mockTransports={'Console':jest['fn'](),'File':jest['fn']()},mockFormat={'combine':jest['fn'](),'timestamp':jest['fn'](),'printf':jest['fn'](),'colorize':jest['fn'](),'simple':jest['fn'](),'errors':jest['fn'](),'json':jest['fn']()},a42_0x4df816={};a42_0x4df816[a42_0x13b425(0x1be)+'er']=mockCreateLogger,a42_0x4df816[a42_0x13b425(0x1a9)]=mockTransports,a42_0x4df816[a42_0x13b425(0x1a8)]=mockFormat,jest[a42_0x13b425(0x1b2)+a42_0x13b425(0x1b9)](a42_0x13b425(0x1ba),()=>({'default':a42_0x4df816,'createLogger':mockCreateLogger,'transports':mockTransports,'format':mockFormat}));const {logger}=await import('../logger.'+'js');function a42_0x515b(){const _0x46614c=['createLogg','should\x20be\x20','test\x20info','apply','6184934ptdzEc','toHaveBeen','5iEkxFB','15458859suZzXT','Called','format','transports','(((.+)+)+)','toBeDefine','683018CbiuuM','HGIpD','ZzJnN','2400732JwCXdb','CalledWith','jUNGu','unstable_m','test\x20error','search','3ERQHuI','\x20info','7635528wUkrNd','should\x20log','ockModule','winston','mNFDh','320212jHJQEw','8212086nYRGVA'];a42_0x515b=function(){return _0x46614c;};return a42_0x515b();}describe('Logger',()=>{const _0x183c5c=a42_0x13b425,_0xd27845={'ZzJnN':function(_0x59a662,_0x411a79){return _0x59a662(_0x411a79);},'HGIpD':_0x183c5c(0x1a1),'mNFDh':_0x183c5c(0x1b8)+_0x183c5c(0x1b6),'jUNGu':_0x183c5c(0x1b8)+'\x20error'};it(_0x183c5c(0x1a0)+'initialize'+'d',()=>{const _0x4c428b=_0x183c5c;_0xd27845[_0x4c428b(0x1ae)](expect,logger)[_0x4c428b(0x1ab)+'d'](),expect(mockCreateLogger)['toHaveBeen'+_0x4c428b(0x1a7)]();}),it(_0xd27845[_0x183c5c(0x1bb)],()=>{const _0x14dbe5=_0x183c5c;logger['info'](_0x14dbe5(0x1a1)),expect(mockInfo)[_0x14dbe5(0x1a4)+'CalledWith'](_0xd27845[_0x14dbe5(0x1ad)]);}),it(_0xd27845[_0x183c5c(0x1b1)],()=>{const _0x2c2595=_0x183c5c;logger['error']('test\x20error'),expect(mockError)[_0x2c2595(0x1a4)+_0x2c2595(0x1b0)](_0x2c2595(0x1b3));});});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x1a4950,_0x36b02c){const _0x13d4a7=a33_0x5a23,_0xf6842b=_0x1a4950();while(!![]){try{const _0x2e9acc=parseInt(_0x13d4a7(0x158))/0x1+-parseInt(_0x13d4a7(0x161))/0x2*(-parseInt(_0x13d4a7(0x15d))/0x3)+parseInt(_0x13d4a7(0x163))/0x4*(parseInt(_0x13d4a7(0x151))/0x5)+parseInt(_0x13d4a7(0x155))/0x6*(parseInt(_0x13d4a7(0x15f))/0x7)+parseInt(_0x13d4a7(0x153))/0x8+-parseInt(_0x13d4a7(0x162))/0x9+parseInt(_0x13d4a7(0x152))/0xa*(-parseInt(_0x13d4a7(0x157))/0xb);if(_0x2e9acc===_0x36b02c)break;else _0xf6842b['push'](_0xf6842b['shift']());}catch(_0xfef241){_0xf6842b['push'](_0xf6842b['shift']());}}}(a33_0x56f7,0xf14d0));const a33_0x337e90=(function(){let _0x541601=!![];return function(_0x20b311,_0x3cab75){const _0x16fbe8=_0x541601?function(){if(_0x3cab75){const _0x16b710=_0x3cab75['apply'](_0x20b311,arguments);return _0x3cab75=null,_0x16b710;}}:function(){};return _0x541601=![],_0x16fbe8;};}()),a33_0x3075c3=a33_0x337e90(this,function(){const _0x1d251b=a33_0x5a23;return a33_0x3075c3[_0x1d251b(0x15e)]()[_0x1d251b(0x159)](_0x1d251b(0x156)+'+$')[_0x1d251b(0x15e)]()[_0x1d251b(0x15b)+'r'](a33_0x3075c3)['search'](_0x1d251b(0x156)+'+$');});function a33_0x5a23(_0x494d8a,_0x27bb61){_0x494d8a=_0x494d8a-0x14e;const _0x578d1c=a33_0x56f7();let _0x3075c3=_0x578d1c[_0x494d8a];return _0x3075c3;}a33_0x3075c3();function a33_0x56f7(){const _0x19fdc0=['4NuGvUv','length','base64','NkjfL','9246085fAZQgq','6910PKSqJY','2430728IZzqTp','from','11136peUISq','(((.+)+)+)','58146dMUliC','664801cTuMRt','search','fromCharCo','constructo','alloc','91167jGtVsw','toString','5250OFHkrw','utf8','38jFlwVp','1316304hmZiYC'];a33_0x56f7=function(){return _0x19fdc0;};return a33_0x56f7();}export function encryptString(_0x1b17fa,_0x573c4e){const _0x282d53=a33_0x5a23,_0x32ea6e={};_0x32ea6e[_0x282d53(0x150)]=_0x282d53(0x160);const _0x1a5598=_0x32ea6e,_0x3103b3=Buffer[_0x282d53(0x154)](_0x573c4e,'utf8'),_0x5415a1=Buffer[_0x282d53(0x154)](_0x1b17fa,_0x1a5598[_0x282d53(0x150)]),_0x832bc8=Buffer['alloc'](_0x5415a1[_0x282d53(0x14e)]);for(let _0xf86346=0x0;_0xf86346<_0x5415a1[_0x282d53(0x14e)];_0xf86346++){_0x832bc8[_0xf86346]=_0x5415a1[_0xf86346]^_0x3103b3[_0xf86346%_0x3103b3['length']];}return _0x832bc8[_0x282d53(0x15e)](_0x282d53(0x14f));}export function decryptString(_0x2b0ed7,_0x29477b){const _0x9cfe7e=a33_0x5a23,_0x1b4f21=Buffer[_0x9cfe7e(0x154)](_0x29477b,_0x9cfe7e(0x160)),_0x509ce6=Buffer['from'](_0x2b0ed7,_0x9cfe7e(0x14f)),_0x27917e=Buffer[_0x9cfe7e(0x15c)](_0x509ce6[_0x9cfe7e(0x14e)]);for(let _0x37459b=0x0;_0x37459b<_0x509ce6[_0x9cfe7e(0x14e)];_0x37459b++){_0x27917e[_0x37459b]=_0x509ce6[_0x37459b]^_0x1b4f21[_0x37459b%_0x1b4f21[_0x9cfe7e(0x14e)]];}return _0x27917e[_0x9cfe7e(0x15e)](_0x9cfe7e(0x160));}export function decryptInternal(_0x54f8ae){const _0x2974e6=a33_0x5a23,_0x9a4e86=String[_0x2974e6(0x15a)+'de'](0x53,0x33,0x5f,0x4b,0x65,0x79),_0x5e213c=String[_0x2974e6(0x15a)+'de'](0x5f,0x45,0x6e,0x63,0x72,0x79,0x70,0x74),_0x5ddec8=String[_0x2974e6(0x15a)+'de'](0x5f,0x32,0x30,0x32,0x34),_0x3573ff=_0x9a4e86+_0x5e213c+_0x5ddec8;return decryptString(_0x54f8ae,_0x3573ff);}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a34_0x4853(_0x5f108b,_0x319b8c){_0x5f108b=_0x5f108b-0x81;const _0x9384b=a34_0x57a8();let _0x100d8a=_0x9384b[_0x5f108b];return _0x100d8a;}const a34_0xc96f03=a34_0x4853;(function(_0x4557f7,_0x27d6ef){const _0x3febca=a34_0x4853,_0x27aad0=_0x4557f7();while(!![]){try{const _0x528cfd=-parseInt(_0x3febca(0xb2))/0x1+-parseInt(_0x3febca(0x99))/0x2+-parseInt(_0x3febca(0x88))/0x3*(parseInt(_0x3febca(0xa4))/0x4)+parseInt(_0x3febca(0xb0))/0x5*(parseInt(_0x3febca(0xa0))/0x6)+-parseInt(_0x3febca(0xac))/0x7+-parseInt(_0x3febca(0x90))/0x8*(parseInt(_0x3febca(0x89))/0x9)+-parseInt(_0x3febca(0x82))/0xa*(-parseInt(_0x3febca(0x95))/0xb);if(_0x528cfd===_0x27d6ef)break;else _0x27aad0['push'](_0x27aad0['shift']());}catch(_0x547557){_0x27aad0['push'](_0x27aad0['shift']());}}}(a34_0x57a8,0xbbf5a));function a34_0x57a8(){const _0x1add0a=['(((.+)+)+)','uibdx','ff\x20생성\x20실패:','oldStart','FcNei','277158WCNwDA','387CuVKWh','info','max','error','PnIvb','\x20@@','ifiedDiff','174088ebUUku','kBnYw','constructo','code.java','\x20+1,','73337bVrdcD','jndNU','push','apply','2842392bqFWmN','@@\x20-','search','length','generateDi','코드\x20diff\x20생성','\x20완료','60396InwlYw','toString','computeHun','ff\x20생성\x20완료','28KTZBkR','+++\x20안전한\x20코드','Diff\x20생성에\x20실','newStart','lines','join','+++\x20b/','ff\x20생성에\x20실패했','1945104IFKDed','split','Unified\x20di','newCount','315bytaNp','습니다.','1069674EVQHIa','@@\x20-1,','6730hreMMx'];a34_0x57a8=function(){return _0x1add0a;};return a34_0x57a8();}const a34_0x30f3c5=(function(){let _0x481cb9=!![];return function(_0x4e2e74,_0x422510){const _0x28a8fe=_0x481cb9?function(){const _0xefad7d=a34_0x4853;if(_0x422510){const _0x4037d3=_0x422510[_0xefad7d(0x98)](_0x4e2e74,arguments);return _0x422510=null,_0x4037d3;}}:function(){};return _0x481cb9=![],_0x28a8fe;};}()),a34_0x100d8a=a34_0x30f3c5(this,function(){const _0x50e3a5=a34_0x4853;return a34_0x100d8a[_0x50e3a5(0xa1)]()[_0x50e3a5(0x9b)]('(((.+)+)+)'+'+$')[_0x50e3a5(0xa1)]()[_0x50e3a5(0x92)+'r'](a34_0x100d8a)['search'](_0x50e3a5(0x83)+'+$');});a34_0x100d8a();import{logger}from'./logger.js';export class DiffUtil{static[a34_0xc96f03(0x9d)+'ff'](_0x3916a1,_0x1473ad){const _0x140486=a34_0xc96f03,_0x546527={};_0x546527[_0x140486(0x91)]=function(_0x9ceda7,_0x3f069c){return _0x9ceda7+_0x3f069c;},_0x546527[_0x140486(0x96)]=function(_0x33000a,_0x203768){return _0x33000a+_0x203768;};const _0x1dc668=_0x546527;try{const _0x16c281=_0x3916a1[_0x140486(0xad)]('\x0a'),_0x42e42c=_0x1473ad[_0x140486(0xad)]('\x0a'),_0x1f0499=[];_0x1f0499[_0x140486(0x97)]('---\x20원본\x20코드'),_0x1f0499[_0x140486(0x97)](_0x140486(0xa5)),_0x1f0499[_0x140486(0x97)](_0x1dc668[_0x140486(0x91)](_0x1dc668[_0x140486(0x91)](_0x1dc668[_0x140486(0x96)](_0x140486(0x81),_0x16c281[_0x140486(0x9c)])+_0x140486(0x94),_0x42e42c['length']),_0x140486(0x8e)));const _0x19f1a2=Math[_0x140486(0x8b)](_0x16c281['length'],_0x42e42c['length']);for(let _0x5e1f50=0x0;_0x5e1f50<_0x19f1a2;_0x5e1f50++){const _0x302b5e=_0x16c281[_0x5e1f50]||'',_0x561156=_0x42e42c[_0x5e1f50]||'';_0x302b5e===_0x561156?_0x1f0499[_0x140486(0x97)]('\x20'+_0x302b5e):(_0x302b5e&&_0x1f0499[_0x140486(0x97)]('-'+_0x302b5e),_0x561156&&_0x1f0499[_0x140486(0x97)]('+'+_0x561156));}return logger['info'](_0x140486(0x9e)+_0x140486(0x9f)),_0x1f0499['join']('\x0a');}catch(_0x491ac0){return logger['error']('Diff\x20생성\x20실패'+':',_0x491ac0),_0x140486(0xa6)+'패했습니다.';}}static['generateUn'+a34_0xc96f03(0x8f)](_0x38aea9,_0x571596,_0xb7c138=a34_0xc96f03(0x93)){const _0x5a0648=a34_0xc96f03;try{const _0x265c69=_0x38aea9[_0x5a0648(0xad)]('\x0a'),_0x44c501=_0x571596[_0x5a0648(0xad)]('\x0a'),_0x1964d7=[];_0x1964d7[_0x5a0648(0x97)]('---\x20a/'+_0xb7c138),_0x1964d7[_0x5a0648(0x97)](_0x5a0648(0xaa)+_0xb7c138);const _0x8c2ce1=this[_0x5a0648(0xa2)+'ks'](_0x265c69,_0x44c501);for(const _0x45f0ab of _0x8c2ce1){_0x1964d7[_0x5a0648(0x97)](_0x5a0648(0x9a)+_0x45f0ab[_0x5a0648(0x86)]+','+_0x45f0ab['oldCount']+'\x20+'+_0x45f0ab[_0x5a0648(0xa7)]+','+_0x45f0ab['newCount']+_0x5a0648(0x8e));for(const _0x48c18b of _0x45f0ab[_0x5a0648(0xa8)]){_0x1964d7[_0x5a0648(0x97)](_0x48c18b);}}return logger[_0x5a0648(0x8a)](_0x5a0648(0xae)+_0x5a0648(0xa3)),_0x1964d7[_0x5a0648(0xa9)]('\x0a');}catch(_0x3c58a2){return logger[_0x5a0648(0x8c)](_0x5a0648(0xae)+_0x5a0648(0x85),_0x3c58a2),_0x5a0648(0xae)+_0x5a0648(0xab)+_0x5a0648(0xb1);}}static['computeHun'+'ks'](_0x1b8c90,_0x41f7f9){const _0x55465c=a34_0xc96f03,_0x54d77a={};_0x54d77a[_0x55465c(0x84)]=function(_0xecfda,_0x23c7ff){return _0xecfda<_0x23c7ff;},_0x54d77a[_0x55465c(0x8d)]=function(_0x2ef27d,_0x342aa2){return _0x2ef27d+_0x342aa2;},_0x54d77a[_0x55465c(0x87)]=function(_0x49d618,_0xb5f542){return _0x49d618+_0xb5f542;};const _0x1c5878=_0x54d77a,_0x175cfa=[],_0x54e394=Math[_0x55465c(0x8b)](_0x1b8c90['length'],_0x41f7f9[_0x55465c(0x9c)]),_0x436993=[];let _0x241c16=0x1,_0x3897aa=0x1,_0x278a7f=0x0,_0x40b3d9=0x0;for(let _0x1b12c7=0x0;_0x1c5878[_0x55465c(0x84)](_0x1b12c7,_0x54e394);_0x1b12c7++){const _0xe3467b=_0x1b8c90[_0x1b12c7]||'',_0x14d0bf=_0x41f7f9[_0x1b12c7]||'';if(_0xe3467b===_0x14d0bf){if(_0x278a7f>0x0||_0x40b3d9>0x0){const _0x12c09b={};_0x12c09b[_0x55465c(0x86)]=_0x241c16,_0x12c09b['oldCount']=_0x278a7f,_0x12c09b[_0x55465c(0xa7)]=_0x3897aa,_0x12c09b[_0x55465c(0xaf)]=_0x40b3d9,_0x12c09b[_0x55465c(0xa8)]=[..._0x436993],_0x175cfa['push'](_0x12c09b),_0x436993[_0x55465c(0x9c)]=0x0,_0x278a7f=0x0,_0x40b3d9=0x0;}_0x241c16=_0x1b12c7+0x2,_0x3897aa=_0x1c5878[_0x55465c(0x8d)](_0x1b12c7,0x2);}else _0x278a7f===0x0&&_0x40b3d9===0x0&&(_0x241c16=_0x1b12c7+0x1,_0x3897aa=_0x1b12c7+0x1),_0xe3467b&&(_0x436993[_0x55465c(0x97)](_0x1c5878[_0x55465c(0x87)]('-',_0xe3467b)),_0x278a7f++),_0x14d0bf&&(_0x436993[_0x55465c(0x97)]('+'+_0x14d0bf),_0x40b3d9++);}if(_0x278a7f>0x0||_0x40b3d9>0x0){const _0x31f3bf={};_0x31f3bf['oldStart']=_0x241c16,_0x31f3bf['oldCount']=_0x278a7f,_0x31f3bf[_0x55465c(0xa7)]=_0x3897aa,_0x31f3bf[_0x55465c(0xaf)]=_0x40b3d9,_0x31f3bf[_0x55465c(0xa8)]=[..._0x436993],_0x175cfa[_0x55465c(0x97)](_0x31f3bf);}return _0x175cfa;}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a35_0x1f44(_0x93c25b,_0x154e75){_0x93c25b=_0x93c25b-0x1eb;const _0x1a6e63=a35_0x44d4();let _0x50c329=_0x1a6e63[_0x93c25b];return _0x50c329;}const a35_0x472b24=a35_0x1f44;(function(_0x14ea39,_0xc53be1){const _0x47a763=a35_0x1f44,_0x291a4a=_0x14ea39();while(!![]){try{const _0x5e328c=parseInt(_0x47a763(0x1fe))/0x1+parseInt(_0x47a763(0x1f9))/0x2+-parseInt(_0x47a763(0x1f8))/0x3+parseInt(_0x47a763(0x1f7))/0x4+parseInt(_0x47a763(0x1eb))/0x5+-parseInt(_0x47a763(0x1f0))/0x6*(parseInt(_0x47a763(0x1f6))/0x7)+parseInt(_0x47a763(0x1ee))/0x8*(parseInt(_0x47a763(0x1f5))/0x9);if(_0x5e328c===_0xc53be1)break;else _0x291a4a['push'](_0x291a4a['shift']());}catch(_0x20a210){_0x291a4a['push'](_0x291a4a['shift']());}}}(a35_0x44d4,0x8b84d));function a35_0x44d4(){const _0x5d7e39=['readFileSy','639150rbLSAe','existsSync','readFile','unlinkSync','(((.+)+)+)','660141eRblVC','49EJWeCW','1220468PlLhda','2497974gAhoxL','467434bopRiG','search','toString','join','ync','728441VodfDP','deleteFile','VjeIS','utf-8','3312400ehFXgo','writeFile','baseDir','24tzrBWg'];a35_0x44d4=function(){return _0x5d7e39;};return a35_0x44d4();}const a35_0x39e8b9=(function(){let _0x567579=!![];return function(_0x59d148,_0x42e136){const _0xcc2d0a=_0x567579?function(){if(_0x42e136){const _0x4cad73=_0x42e136['apply'](_0x59d148,arguments);return _0x42e136=null,_0x4cad73;}}:function(){};return _0x567579=![],_0xcc2d0a;};}()),a35_0x50c329=a35_0x39e8b9(this,function(){const _0x1161f0=a35_0x1f44,_0x26edac={};_0x26edac[_0x1161f0(0x200)]=_0x1161f0(0x1f4)+'+$';const _0x4af34d=_0x26edac;return a35_0x50c329[_0x1161f0(0x1fb)]()[_0x1161f0(0x1fa)](_0x1161f0(0x1f4)+'+$')[_0x1161f0(0x1fb)]()['constructo'+'r'](a35_0x50c329)[_0x1161f0(0x1fa)](_0x4af34d[_0x1161f0(0x200)]);});a35_0x50c329();import*as a35_0x7d7ebb from'fs';import*as a35_0x579028 from'path';export class FileManager{[a35_0x472b24(0x1ed)];constructor(_0x3f8430){const _0x26d540=a35_0x472b24;this[_0x26d540(0x1ed)]=_0x3f8430;}[a35_0x472b24(0x1f2)](_0x31d075){const _0x269357=a35_0x472b24,_0x1b5f49=a35_0x579028[_0x269357(0x1fc)](this[_0x269357(0x1ed)],_0x31d075);return a35_0x7d7ebb[_0x269357(0x1ef)+'nc'](_0x1b5f49,_0x269357(0x201));}[a35_0x472b24(0x1ec)](_0x76d8e9,_0x4bfb6b){const _0x1f89a1=a35_0x472b24,_0x4e5dfd=a35_0x579028[_0x1f89a1(0x1fc)](this[_0x1f89a1(0x1ed)],_0x76d8e9);a35_0x7d7ebb['writeFileS'+_0x1f89a1(0x1fd)](_0x4e5dfd,_0x4bfb6b,_0x1f89a1(0x201));}[a35_0x472b24(0x1ff)](_0x45159c){const _0x50e2c6=a35_0x472b24,_0x2b1713=a35_0x579028['join'](this['baseDir'],_0x45159c);a35_0x7d7ebb[_0x50e2c6(0x1f1)](_0x2b1713)&&a35_0x7d7ebb[_0x50e2c6(0x1f3)](_0x2b1713);}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a36_0x16ae98=a36_0x37b3;(function(_0x354fd9,_0x45553a){const _0x16a6e4=a36_0x37b3,_0x1a92e8=_0x354fd9();while(!![]){try{const _0x3c7cda=parseInt(_0x16a6e4(0x193))/0x1+-parseInt(_0x16a6e4(0x195))/0x2+-parseInt(_0x16a6e4(0x1a5))/0x3*(-parseInt(_0x16a6e4(0x19b))/0x4)+-parseInt(_0x16a6e4(0x190))/0x5+-parseInt(_0x16a6e4(0x18c))/0x6*(-parseInt(_0x16a6e4(0x199))/0x7)+-parseInt(_0x16a6e4(0x194))/0x8*(-parseInt(_0x16a6e4(0x1a0))/0x9)+parseInt(_0x16a6e4(0x19a))/0xa*(-parseInt(_0x16a6e4(0x191))/0xb);if(_0x3c7cda===_0x45553a)break;else _0x1a92e8['push'](_0x1a92e8['shift']());}catch(_0x443227){_0x1a92e8['push'](_0x1a92e8['shift']());}}}(a36_0x41f9,0xd489d));function a36_0x37b3(_0x22e183,_0x3f15fa){_0x22e183=_0x22e183-0x18a;const _0x428127=a36_0x41f9();let _0x543ea2=_0x428127[_0x22e183];return _0x543ea2;}function a36_0x41f9(){const _0x155f3a=['752174tQYnoI','(((.+)+)+)','unlinkSync','writeFileS','7vkqzrh','10QTfJLX','4552776liTqqe','readFile','search','th.','writeFile','52587Ktroqd','utf-8','constructo','baseDir','toString','3baTmFC','resolvePat','join','789702FekmFI','ync','Access\x20den','resolve','1713050SOFGee','27208511QOjlbF','deleteFile','1466583wbTHsj','1816tqBYmG'];a36_0x41f9=function(){return _0x155f3a;};return a36_0x41f9();}const a36_0x56e99e=(function(){let _0x5487ac=!![];return function(_0x7f40f8,_0x5a9f32){const _0x1e44ba=_0x5487ac?function(){if(_0x5a9f32){const _0x4ad236=_0x5a9f32['apply'](_0x7f40f8,arguments);return _0x5a9f32=null,_0x4ad236;}}:function(){};return _0x5487ac=![],_0x1e44ba;};}()),a36_0x543ea2=a36_0x56e99e(this,function(){const _0x5956bf=a36_0x37b3;return a36_0x543ea2[_0x5956bf(0x1a4)]()[_0x5956bf(0x19d)](_0x5956bf(0x196)+'+$')[_0x5956bf(0x1a4)]()[_0x5956bf(0x1a2)+'r'](a36_0x543ea2)[_0x5956bf(0x19d)](_0x5956bf(0x196)+'+$');});a36_0x543ea2();import*as a36_0x533f3c from'fs';import*as a36_0x1aa660 from'path';export class FileManager{[a36_0x16ae98(0x1a3)];constructor(_0x3ee638){const _0x307e72=a36_0x16ae98;this[_0x307e72(0x1a3)]=_0x3ee638;}[a36_0x16ae98(0x18a)+'h'](_0x5a903f){const _0x1ddb9e=a36_0x16ae98,_0x51ea5a=a36_0x1aa660[_0x1ddb9e(0x18b)](this[_0x1ddb9e(0x1a3)],_0x5a903f);if(!_0x51ea5a['startsWith'](a36_0x1aa660[_0x1ddb9e(0x18f)](this[_0x1ddb9e(0x1a3)])))throw new Error(_0x1ddb9e(0x18e)+'ied:\x20Inval'+'id\x20file\x20pa'+_0x1ddb9e(0x19e));return _0x51ea5a;}[a36_0x16ae98(0x19c)](_0x5ee848){const _0x142219=this['resolvePat'+'h'](_0x5ee848);return a36_0x533f3c['readFileSy'+'nc'](_0x142219,'utf-8');}[a36_0x16ae98(0x19f)](_0x3dd8c5,_0x26b846){const _0x1fde24=a36_0x16ae98,_0x34998d=this[_0x1fde24(0x18a)+'h'](_0x3dd8c5);a36_0x533f3c[_0x1fde24(0x198)+_0x1fde24(0x18d)](_0x34998d,_0x26b846,_0x1fde24(0x1a1));}[a36_0x16ae98(0x192)](_0x15dc20){const _0x2b6959=a36_0x16ae98,_0x221416=this[_0x2b6959(0x18a)+'h'](_0x15dc20);a36_0x533f3c['existsSync'](_0x221416)&&a36_0x533f3c[_0x2b6959(0x197)](_0x221416);}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a37_0x465b70=a37_0x5006;(function(_0x24d18b,_0x39fc33){const _0x3fb995=a37_0x5006,_0x3e10c7=_0x24d18b();while(!![]){try{const _0x158ceb=parseInt(_0x3fb995(0x1a1))/0x1+parseInt(_0x3fb995(0x1a8))/0x2*(parseInt(_0x3fb995(0x1a0))/0x3)+parseInt(_0x3fb995(0x1a6))/0x4+-parseInt(_0x3fb995(0x1a3))/0x5*(parseInt(_0x3fb995(0x1a2))/0x6)+parseInt(_0x3fb995(0x1b0))/0x7*(-parseInt(_0x3fb995(0x1af))/0x8)+parseInt(_0x3fb995(0x19f))/0x9*(-parseInt(_0x3fb995(0x1b6))/0xa)+parseInt(_0x3fb995(0x1ba))/0xb*(-parseInt(_0x3fb995(0x1c5))/0xc);if(_0x158ceb===_0x39fc33)break;else _0x3e10c7['push'](_0x3e10c7['shift']());}catch(_0x51d6f0){_0x3e10c7['push'](_0x3e10c7['shift']());}}}(a37_0xcd93,0xc096e));const a37_0x251741=(function(){let _0x2d9d98=!![];return function(_0x38ab62,_0x556b8f){const _0x2dcc3d=_0x2d9d98?function(){const _0x45d78c=a37_0x5006;if(_0x556b8f){const _0x4d4014=_0x556b8f[_0x45d78c(0x1aa)](_0x38ab62,arguments);return _0x556b8f=null,_0x4d4014;}}:function(){};return _0x2d9d98=![],_0x2dcc3d;};}()),a37_0x749f27=a37_0x251741(this,function(){const _0x40fda3=a37_0x5006;return a37_0x749f27[_0x40fda3(0x1b7)]()[_0x40fda3(0x1ce)](_0x40fda3(0x1b3)+'+$')[_0x40fda3(0x1b7)]()[_0x40fda3(0x19c)+'r'](a37_0x749f27)[_0x40fda3(0x1ce)](_0x40fda3(0x1b3)+'+$');});a37_0x749f27();import a37_0x34e580 from'winston';import a37_0x157dec from'path';import a37_0x2f9977 from'fs';import{fileURLToPath}from'url';const loggerModuleDir=a37_0x157dec[a37_0x465b70(0x1c8)](fileURLToPath(import.meta.url)),projectRootForLogs=a37_0x157dec[a37_0x465b70(0x19d)](loggerModuleDir,'../..'),logsDirAbs=a37_0x157dec['resolve'](projectRootForLogs,'logs');try{if(!a37_0x2f9977[a37_0x465b70(0x1ad)](logsDirAbs)){const a37_0x3d8798={};a37_0x3d8798[a37_0x465b70(0x1b9)]=!![],a37_0x2f9977[a37_0x465b70(0x1b8)](logsDirAbs,a37_0x3d8798);}}catch(a37_0x2e71b6){console[a37_0x465b70(0x1a5)](a37_0x465b70(0x1c1)+a37_0x465b70(0x1c2)+a37_0x465b70(0x1bb)+'y:',a37_0x2e71b6);}const isStdioMcpHost=Boolean(process.env.MCP||process.env.MCP_SERVER||process.env.MCP_STDIO||process.env.CURSOR||process.env.CURSOR_MCP),enableConsole=![],a37_0x1d7655={};a37_0x1d7655[a37_0x465b70(0x1b4)]=!![];const a37_0x5b0c67={};function a37_0x5006(_0x276189,_0x38c17d){_0x276189=_0x276189-0x19c;const _0xf47b9e=a37_0xcd93();let _0x749f27=_0xf47b9e[_0x276189];return _0x749f27;}a37_0x5b0c67[a37_0x465b70(0x1c4)]=a37_0x465b70(0x1cf)+a37_0x465b70(0x1ab)+a37_0x465b70(0x1be);function a37_0xcd93(){const _0x2408d0=['Failed\x20to\x20','create\x20log','combine','service','14306808MjhoHD','keys','join','dirname','add\x20file\x20t','errors','error.log','File','info','search','mcp-secure','constructo','resolve','add','9UEyuad','9JUICqh','117853ymtuHN','35778CFJtdw','320RQhzUF','length','error','4829252jZMoZg','transports','949990rwvdpT','format','apply','-code-gene','json','existsSync','ransports:','40712MmduZS','119OeUopp','SSSZ','THH:mm:ss.','(((.+)+)+)','stack','timestamp','3009260PMdqRb','toString','mkdirSync','recursive','11EsheyT','s\x20director','printf','YYYY-MM-DD','rator','combined.l','stringify'];a37_0xcd93=function(){return _0x2408d0;};return a37_0xcd93();}export const logger=a37_0x34e580['createLogg'+'er']({'level':process.env.LOG_LEVEL||a37_0x465b70(0x1cd),'format':a37_0x34e580[a37_0x465b70(0x1a9)][a37_0x465b70(0x1c3)](a37_0x34e580[a37_0x465b70(0x1a9)][a37_0x465b70(0x1b5)](),a37_0x34e580[a37_0x465b70(0x1a9)][a37_0x465b70(0x1ca)](a37_0x1d7655),a37_0x34e580[a37_0x465b70(0x1a9)][a37_0x465b70(0x1ac)]()),'defaultMeta':a37_0x5b0c67,'transports':[]});try{const a37_0x5ad928={};a37_0x5ad928['format']=a37_0x465b70(0x1bd)+a37_0x465b70(0x1b2)+a37_0x465b70(0x1b1);const a37_0x4c5d3a={};a37_0x4c5d3a[a37_0x465b70(0x1b4)]=!![],logger[a37_0x465b70(0x19e)](new a37_0x34e580[(a37_0x465b70(0x1a7))][(a37_0x465b70(0x1cc))]({'filename':a37_0x157dec['join'](logsDirAbs,a37_0x465b70(0x1cb)),'level':a37_0x465b70(0x1a5),'format':a37_0x34e580[a37_0x465b70(0x1a9)][a37_0x465b70(0x1c3)](a37_0x34e580[a37_0x465b70(0x1a9)]['timestamp'](a37_0x5ad928),a37_0x34e580[a37_0x465b70(0x1a9)][a37_0x465b70(0x1ca)](a37_0x4c5d3a),a37_0x34e580[a37_0x465b70(0x1a9)][a37_0x465b70(0x1ac)]())}));const a37_0x24592f={};a37_0x24592f[a37_0x465b70(0x1a9)]='YYYY-MM-DD'+a37_0x465b70(0x1b2)+'SSSZ';const a37_0x25815b={};a37_0x25815b[a37_0x465b70(0x1b4)]=!![],logger['add'](new a37_0x34e580[(a37_0x465b70(0x1a7))][(a37_0x465b70(0x1cc))]({'filename':a37_0x157dec[a37_0x465b70(0x1c7)](logsDirAbs,a37_0x465b70(0x1bf)+'og'),'format':a37_0x34e580[a37_0x465b70(0x1a9)][a37_0x465b70(0x1c3)](a37_0x34e580['format']['timestamp'](a37_0x24592f),a37_0x34e580['format']['errors'](a37_0x25815b),a37_0x34e580[a37_0x465b70(0x1a9)][a37_0x465b70(0x1ac)]())}));}catch(a37_0x4156e4){console[a37_0x465b70(0x1a5)]('Failed\x20to\x20'+a37_0x465b70(0x1c9)+a37_0x465b70(0x1ae),a37_0x4156e4);}if(enableConsole){const a37_0x120223={};a37_0x120223['format']=a37_0x465b70(0x1bd)+'THH:mm:ss.'+a37_0x465b70(0x1b1),logger[a37_0x465b70(0x19e)](new a37_0x34e580[(a37_0x465b70(0x1a7))]['Console']({'format':a37_0x34e580[a37_0x465b70(0x1a9)][a37_0x465b70(0x1c3)](a37_0x34e580['format']['colorize'](),a37_0x34e580['format'][a37_0x465b70(0x1b5)](a37_0x120223),a37_0x34e580['format'][a37_0x465b70(0x1bc)](_0x403fc3=>{const _0x55655a=a37_0x465b70,{level:_0x56da0c,message:_0x4dc1d9,timestamp:_0x10bd80,..._0xf501b6}=_0x403fc3,_0x4071a7=Object[_0x55655a(0x1c6)](_0xf501b6)[_0x55655a(0x1a4)]?'\x20'+JSON[_0x55655a(0x1c0)](_0xf501b6):'';return'['+_0x10bd80+']\x20'+_0x56da0c+':\x20'+_0x4dc1d9+_0x4071a7;})),'stderrLevels':['error','warn']}));}
|
package/package.json
CHANGED
|
@@ -1,21 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sparrowai/sparrow-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"type": "module",
|
|
5
|
+
"bin": {
|
|
6
|
+
"sparrow-mcp-test": "./bin/sparrow-mcp-test.cjs"
|
|
7
|
+
},
|
|
5
8
|
"scripts": {
|
|
6
9
|
"start": "tsx src/server.ts",
|
|
7
10
|
"clean": "rimraf dist",
|
|
8
11
|
"clean:safe": "node scripts/clean-dist.cjs",
|
|
9
|
-
"build": "node scripts/clean-dist.cjs &&
|
|
10
|
-
"build:force": "npm run clean &&
|
|
12
|
+
"build": "node scripts/clean-dist.cjs && tsc && npm run obfuscate",
|
|
13
|
+
"build:force": "npm run clean && tsc && npm run obfuscate",
|
|
14
|
+
"obfuscate": "javascript-obfuscator dist --output dist --config obfuscator.json",
|
|
11
15
|
"dev": "tsx watch src/server.ts",
|
|
12
|
-
"test": "
|
|
16
|
+
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
|
|
17
|
+
"test:coverage": "node --experimental-vm-modules node_modules/jest/bin/jest.js --coverage",
|
|
18
|
+
"inspector": "tsx scripts/mcp-inspector.ts",
|
|
19
|
+
"inspector:local": "tsx scripts/mcp-inspector.ts --target local --output all",
|
|
20
|
+
"inspector:npm": "tsx scripts/mcp-inspector.ts --target npm --output all",
|
|
21
|
+
"inspector:help": "tsx scripts/mcp-inspector.ts --help"
|
|
13
22
|
},
|
|
14
23
|
"files": [
|
|
15
24
|
"dist",
|
|
25
|
+
"bin",
|
|
26
|
+
".agent/skills",
|
|
16
27
|
"package.json",
|
|
17
28
|
"README.md",
|
|
18
|
-
"LICENSE"
|
|
29
|
+
"LICENSE",
|
|
30
|
+
"test-cases-example.md"
|
|
19
31
|
],
|
|
20
32
|
"publishConfig": {
|
|
21
33
|
"access": "public"
|
|
@@ -32,22 +44,31 @@
|
|
|
32
44
|
"licenseFile": "LICENSE",
|
|
33
45
|
"description": "",
|
|
34
46
|
"dependencies": {
|
|
47
|
+
"@anthropic-ai/sdk": "^0.71.2",
|
|
48
|
+
"@aws-sdk/client-bedrock-runtime": "^3.975.0",
|
|
35
49
|
"@aws-sdk/client-s3": "^3.705.0",
|
|
50
|
+
"@google/generative-ai": "^0.24.1",
|
|
36
51
|
"@modelcontextprotocol/sdk": "^1.20.2",
|
|
37
52
|
"@sparrowai/sparrow-mcp": "^1.0.3",
|
|
53
|
+
"adm-zip": "^0.5.16",
|
|
38
54
|
"archiver": "^7.0.1",
|
|
39
55
|
"axios": "^1.7.9",
|
|
56
|
+
"csv-parse": "^6.1.0",
|
|
40
57
|
"dotenv": "^16.4.5",
|
|
41
58
|
"form-data": "^4.0.0",
|
|
42
|
-
"
|
|
59
|
+
"openai": "^6.16.0",
|
|
43
60
|
"winston": "^3.15.0",
|
|
44
61
|
"zod": "^3.25.76"
|
|
45
62
|
},
|
|
46
63
|
"devDependencies": {
|
|
64
|
+
"@types/adm-zip": "^0.5.5",
|
|
47
65
|
"@types/archiver": "^6.0.2",
|
|
66
|
+
"@types/jest": "^30.0.0",
|
|
48
67
|
"@types/node": "^24.9.1",
|
|
49
|
-
"
|
|
68
|
+
"javascript-obfuscator": "^5.3.0",
|
|
69
|
+
"jest": "^30.2.0",
|
|
50
70
|
"rimraf": "^6.1.0",
|
|
71
|
+
"ts-jest": "^29.4.6",
|
|
51
72
|
"tsx": "^4.20.6",
|
|
52
73
|
"typescript": "^5.9.3"
|
|
53
74
|
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Sparrow MCP 테스트 케이스 예시
|
|
2
|
+
|
|
3
|
+
이 문서는 Sparrow MCP 서버를 테스트하기 위한 테스트 케이스 정의 예시입니다.
|
|
4
|
+
|
|
5
|
+
## 사용 방법
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
sparrow-mcp-test --test-cases ./test-cases-example.md
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## TC001: 단일 Java 파일 SAST 분석
|
|
14
|
+
|
|
15
|
+
- **파일**: ./samples/Vulnerable.java
|
|
16
|
+
- **도구**: analyze_file_sast
|
|
17
|
+
- **기대 결과**: 분석 성공
|
|
18
|
+
- **설명**: 취약점이 있는 Java 코드를 분석하여 보안 이슈를 찾습니다.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## TC002: JavaScript 파일 분석
|
|
23
|
+
|
|
24
|
+
- **파일**: ./samples/index.js
|
|
25
|
+
- **도구**: analyze_file_sast
|
|
26
|
+
- **기대 결과**: 분석 성공
|
|
27
|
+
- **설명**: JavaScript 코드의 보안 취약점을 분석합니다.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## TC003: 여러 파일 동시 분석
|
|
32
|
+
|
|
33
|
+
- **파일**:
|
|
34
|
+
- ./samples/UserController.java
|
|
35
|
+
- ./samples/DatabaseUtil.java
|
|
36
|
+
- **도구**: analyze_files_sast
|
|
37
|
+
- **기대 결과**: 분석 성공
|
|
38
|
+
- **설명**: 여러 소스 파일을 한 번에 분석합니다.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## TC004: 폴더 전체 분석
|
|
43
|
+
|
|
44
|
+
- **폴더**: ./my-project/src
|
|
45
|
+
- **도구**: analyze_folder_sast
|
|
46
|
+
- **기대 결과**: 분석 성공
|
|
47
|
+
- **설명**: 프로젝트 폴더 전체를 분석합니다.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## TC005: ZIP 파일 분석
|
|
52
|
+
|
|
53
|
+
- **파일**: ./my-project.zip
|
|
54
|
+
- **도구**: analyze_zip_sast
|
|
55
|
+
- **기대 결과**: 분석 성공
|
|
56
|
+
- **설명**: ZIP으로 압축된 프로젝트를 분석합니다.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## TC006: SCA 분석 - package.json
|
|
61
|
+
|
|
62
|
+
- **파일**: ./package.json
|
|
63
|
+
- **도구**: analyze_file_sca
|
|
64
|
+
- **기대 결과**: 분석 성공
|
|
65
|
+
- **설명**: npm 의존성의 취약점을 분석합니다.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## 주의사항
|
|
70
|
+
|
|
71
|
+
1. **파일 경로**: 상대 경로 또는 절대 경로 사용 가능
|
|
72
|
+
2. **테스트 파일 준비**: 실제 테스트 파일을 test-cases.md와 같은 디렉토리에 준비
|
|
73
|
+
3. **API 키**: 환경 변수 `SPARROW_API_KEY` 설정 필요
|
|
74
|
+
|
|
75
|
+
## 고급 사용 예시
|
|
76
|
+
|
|
77
|
+
### 대용량 파일 테스트 (100MB+)
|
|
78
|
+
|
|
79
|
+
```markdown
|
|
80
|
+
## TC_LARGE_01: 대용량 ZIP 분석
|
|
81
|
+
|
|
82
|
+
- **파일**: /path/to/large-project.zip
|
|
83
|
+
- **도구**: analyze_zip_sast
|
|
84
|
+
- **기대 결과**: 분석 성공
|
|
85
|
+
- **설명**: 100MB 이상의 대용량 프로젝트 분석
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### 특정 언어만 테스트
|
|
89
|
+
|
|
90
|
+
```markdown
|
|
91
|
+
## TC_JAVA_01: Java 전용 테스트
|
|
92
|
+
|
|
93
|
+
- **파일**: ./java-samples/*.java
|
|
94
|
+
- **도구**: analyze_folder_sast
|
|
95
|
+
- **기대 결과**: 분석 성공
|
|
96
|
+
- **설명**: Java 파일만 포함된 폴더 분석
|
|
97
|
+
```
|
package/dist/config/appConfig.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const a0_0x2f88c3=a0_0x151d;(function(_0x5556d4,_0x1dc022){const _0x169d62=a0_0x151d,_0xeec316=_0x5556d4();while(!![]){try{const _0x212ecd=parseInt(_0x169d62(0x150))/0x1+-parseInt(_0x169d62(0x182))/0x2*(parseInt(_0x169d62(0x184))/0x3)+parseInt(_0x169d62(0x162))/0x4+parseInt(_0x169d62(0x166))/0x5+-parseInt(_0x169d62(0x171))/0x6+parseInt(_0x169d62(0x15e))/0x7+-parseInt(_0x169d62(0x156))/0x8;if(_0x212ecd===_0x1dc022)break;else _0xeec316['push'](_0xeec316['shift']());}catch(_0x598aab){_0xeec316['push'](_0xeec316['shift']());}}}(a0_0x458b,0x67b81));const a0_0x1687e7=(function(){let _0x54bc49=!![];return function(_0x1b3b23,_0x1fedd9){const _0x9f2ad9=_0x54bc49?function(){const _0x58e1e9=a0_0x151d;if(_0x1fedd9){const _0x2ffad8=_0x1fedd9[_0x58e1e9(0x15b)](_0x1b3b23,arguments);return _0x1fedd9=null,_0x2ffad8;}}:function(){};return _0x54bc49=![],_0x9f2ad9;};}()),a0_0x255fac=a0_0x1687e7(this,function(){const _0x5ef074=a0_0x151d,_0x401066={};_0x401066['Axgxh']=_0x5ef074(0x14f)+'+$';const _0xaedcae=_0x401066;return a0_0x255fac[_0x5ef074(0x163)]()['search'](_0xaedcae[_0x5ef074(0x16a)])[_0x5ef074(0x163)]()['constructo'+'r'](a0_0x255fac)[_0x5ef074(0x174)](_0x5ef074(0x14f)+'+$');});a0_0x255fac();import{config}from'dotenv';import a0_0x423f91 from'path';import a0_0x103929 from'fs';import{fileURLToPath}from'url';import{logger}from'../utils/logger.js';const moduleDir=a0_0x423f91[a0_0x2f88c3(0x17f)](fileURLToPath(import.meta.url)),repoRootEnvPath=a0_0x423f91[a0_0x2f88c3(0x181)](moduleDir,a0_0x2f88c3(0x179)),cwdEnvPath=a0_0x423f91[a0_0x2f88c3(0x181)](process[a0_0x2f88c3(0x160)](),a0_0x2f88c3(0x175)),explicitEnvPath=process[a0_0x2f88c3(0x17a)][a0_0x2f88c3(0x189)]?a0_0x423f91[a0_0x2f88c3(0x181)](process[a0_0x2f88c3(0x160)](),process[a0_0x2f88c3(0x17a)]['ENV_PATH']):undefined,candidateEnvPaths=[explicitEnvPath,cwdEnvPath,repoRootEnvPath]['filter'](Boolean),envPath=candidateEnvPaths[a0_0x2f88c3(0x16b)](_0x4a05aa=>{try{return a0_0x103929['existsSync'](_0x4a05aa);}catch{return![];}})||repoRootEnvPath,a0_0x446284={};a0_0x446284[a0_0x2f88c3(0x15c)]=envPath,config(a0_0x446284);const a0_0xe2f2b0={};a0_0xe2f2b0[a0_0x2f88c3(0x18d)]=process[a0_0x2f88c3(0x17a)][a0_0x2f88c3(0x161)+a0_0x2f88c3(0x18e)]||a0_0x2f88c3(0x173)+a0_0x2f88c3(0x16e)+'34',a0_0xe2f2b0[a0_0x2f88c3(0x168)]=process[a0_0x2f88c3(0x17a)][a0_0x2f88c3(0x172)+'EL']||a0_0x2f88c3(0x169);const a0_0x190f4d={};function a0_0x458b(){const _0x244f73=['../../.env','env','filter','NOTION_API','\x20사용합니다.','region','dirname','ollama','resolve','293536PdGZCe','다.\x20암호화된\x20키를','3XmexTB','SPARROW_AP','sparrow','warn','NTAINER_NA','ENV_PATH','ssKey','_KEY','demand.spa','baseUrl','E_URL','(((.+)+)+)','122411fLKeES','지\x20키\x20환경\x20변수가','CESS_ID','개발\x20환경:\x20스토리','us-east-1','CRET_KEY','1147008uAVrgI','GION','accessKeyI','STORAGE_SE','STORAGE_AC','apply','path','bucket','279706EQclTO','\x20(로드\x20경로:\x20','cwd','OLLAMA_BAS','331644IkIoOJ','toString','I_URL','apiKey','4177125sEfsMz','STORAGE_EN','model','gemma2:27b','Axgxh','find','필수\x20환경\x20변수가\x20','NODE_ENV','alhost:114','join','DPOINT','2194368rxVDZf','OLLAMA_MOD','http://loc','search','.env','ABASE_ID','I_KEY','설정되지\x20않았습니다'];a0_0x458b=function(){return _0x244f73;};return a0_0x458b();}a0_0x190f4d[a0_0x2f88c3(0x15d)]=process[a0_0x2f88c3(0x17a)]['STORAGE_CO'+a0_0x2f88c3(0x188)+'ME']||'',a0_0x190f4d[a0_0x2f88c3(0x17e)]=process[a0_0x2f88c3(0x17a)]['STORAGE_RE'+a0_0x2f88c3(0x157)]||a0_0x2f88c3(0x154),a0_0x190f4d[a0_0x2f88c3(0x158)+'d']=process['env'][a0_0x2f88c3(0x15a)+a0_0x2f88c3(0x152)]||'',a0_0x190f4d['secretAcce'+a0_0x2f88c3(0x18a)]=process[a0_0x2f88c3(0x17a)][a0_0x2f88c3(0x159)+'CRET_KEY']||'',a0_0x190f4d['endpoint']=process[a0_0x2f88c3(0x17a)][a0_0x2f88c3(0x167)+a0_0x2f88c3(0x170)];const a0_0x6c09fa={};a0_0x6c09fa[a0_0x2f88c3(0x18d)]=process['env'][a0_0x2f88c3(0x185)+a0_0x2f88c3(0x164)]||'https://on'+a0_0x2f88c3(0x18c)+'rrowcloud.'+'ai',a0_0x6c09fa[a0_0x2f88c3(0x165)]=process[a0_0x2f88c3(0x17a)][a0_0x2f88c3(0x185)+a0_0x2f88c3(0x177)]||'';const a0_0x543408={};a0_0x543408[a0_0x2f88c3(0x180)]=a0_0xe2f2b0,a0_0x543408['s3']=a0_0x190f4d,a0_0x543408[a0_0x2f88c3(0x186)]=a0_0x6c09fa,a0_0x543408['notion']=process[a0_0x2f88c3(0x17a)][a0_0x2f88c3(0x17c)+a0_0x2f88c3(0x18b)]?{'apiKey':process[a0_0x2f88c3(0x17a)][a0_0x2f88c3(0x17c)+a0_0x2f88c3(0x18b)],'databaseId':process[a0_0x2f88c3(0x17a)]['NOTION_DAT'+a0_0x2f88c3(0x176)]||''}:undefined;export const appConfig=a0_0x543408;const requiredEnvVars=['SPARROW_AP'+a0_0x2f88c3(0x177)];function a0_0x151d(_0x1d225c,_0x4e14be){_0x1d225c=_0x1d225c-0x14f;const _0x2183ed=a0_0x458b();let _0x255fac=_0x2183ed[_0x1d225c];return _0x255fac;}process[a0_0x2f88c3(0x17a)][a0_0x2f88c3(0x16d)]==='developmen'+'t'&&((!process[a0_0x2f88c3(0x17a)]['STORAGE_AC'+a0_0x2f88c3(0x152)]||!process[a0_0x2f88c3(0x17a)][a0_0x2f88c3(0x159)+a0_0x2f88c3(0x155)])&&logger[a0_0x2f88c3(0x187)](a0_0x2f88c3(0x153)+a0_0x2f88c3(0x151)+'\x20설정되지\x20않았습니'+a0_0x2f88c3(0x183)+a0_0x2f88c3(0x17d)));for(const envVar of requiredEnvVars){if(!process['env'][envVar]){const triedPaths=[envPath][a0_0x2f88c3(0x17b)](Boolean)[a0_0x2f88c3(0x16f)](',\x20');logger['error'](a0_0x2f88c3(0x16c)+a0_0x2f88c3(0x178)+':\x20'+envVar+a0_0x2f88c3(0x15f)+triedPaths+')');throw new Error(a0_0x2f88c3(0x16c)+a0_0x2f88c3(0x178)+':\x20'+envVar+a0_0x2f88c3(0x15f)+triedPaths+')');}}
|