fazer-lang 3.2.0 → 3.2.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/README.md +21 -3
- package/docs/GUIDE.md +5 -2
- package/package.json +1 -1
- package/tools/builder.js +78 -53
package/README.md
CHANGED
|
@@ -6,6 +6,21 @@ Conçu pour l'automatisation, la sécurité et le traitement de données, Fazer
|
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
9
|
+
### Windows
|
|
10
|
+
1. Téléchargez ou clonez le dépôt.
|
|
11
|
+
2. Double-cliquez sur `install_system.ps1`.
|
|
12
|
+
3. Redémarrez votre terminal.
|
|
13
|
+
|
|
14
|
+
### Linux / Mac
|
|
15
|
+
1. Téléchargez ou clonez le dépôt.
|
|
16
|
+
2. Rendez le script d'installation exécutable et lancez-le :
|
|
17
|
+
```bash
|
|
18
|
+
chmod +x install_system.sh
|
|
19
|
+
./install_system.sh
|
|
20
|
+
```
|
|
21
|
+
3. Redémarrez votre terminal ou faites `source ~/.bashrc` (ou `.zshrc`).
|
|
22
|
+
|
|
23
|
+
### Via NPM (Global)
|
|
9
24
|
Installez Fazer globalement via npm :
|
|
10
25
|
|
|
11
26
|
```bash
|
|
@@ -31,16 +46,19 @@ fazer scan google.com
|
|
|
31
46
|
fazer whois microsoft.com
|
|
32
47
|
```
|
|
33
48
|
|
|
34
|
-
## Création d'Exécutable (.exe)
|
|
49
|
+
## Création d'Exécutable (.exe / Binaire)
|
|
35
50
|
|
|
36
|
-
Transformez vos scripts Fazer en applications
|
|
51
|
+
Transformez vos scripts Fazer en applications portables et natives :
|
|
37
52
|
|
|
38
53
|
1. (Optionnel) Placez une icône `app.ico` dans le dossier.
|
|
39
54
|
2. Lancez la commande de build :
|
|
40
55
|
```bash
|
|
41
56
|
fazer build mon_script.fz
|
|
42
57
|
```
|
|
43
|
-
3. Récupérez votre application dans `dist/mon_script
|
|
58
|
+
3. Récupérez votre application dans `dist/mon_script/`.
|
|
59
|
+
|
|
60
|
+
* **Sur Windows** : Crée un fichier `.exe` autonome.
|
|
61
|
+
* **Sur Linux/Mac** : Crée un binaire exécutable (script shell + runtime).
|
|
44
62
|
|
|
45
63
|
Le dossier généré est **portable** : zippez-le et envoyez-le à n'importe qui, aucune installation n'est requise !
|
|
46
64
|
|
package/docs/GUIDE.md
CHANGED
|
@@ -283,12 +283,15 @@ Pour plus de détails, voir le [Guide Moteur 3D](3D_ENGINE.md).
|
|
|
283
283
|
|
|
284
284
|
---
|
|
285
285
|
|
|
286
|
-
## Annexe : Compiler en .EXE
|
|
286
|
+
## Annexe : Compiler en .EXE / Binaire
|
|
287
287
|
|
|
288
|
-
Transformez n'importe quel script `.fz` en un exécutable
|
|
288
|
+
Transformez n'importe quel script `.fz` en un exécutable autonome que vous pouvez partager.
|
|
289
289
|
|
|
290
290
|
```bash
|
|
291
291
|
fazer build mon_script.fz
|
|
292
292
|
```
|
|
293
293
|
|
|
294
294
|
L'exécutable sera généré dans le dossier `dist/`. Il contient tout le nécessaire pour fonctionner sans installer Fazer sur la machine cible.
|
|
295
|
+
|
|
296
|
+
* **Windows** : Génère `mon_script.exe`.
|
|
297
|
+
* **Linux/Mac** : Génère un script de lancement `mon_script` (exécutable directement via `./mon_script`).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fazer-lang",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.1",
|
|
4
4
|
"description": "Fazer — The Red Team Language. Native modules for C2 Implant, WiFi Recon, Steganography (LSB), Process Injection, Crypto, 3D Game Engine, and Automation. Secure, powerful, standalone.",
|
|
5
5
|
"main": "fazer.js",
|
|
6
6
|
"types": "index.d.ts",
|
package/tools/builder.js
CHANGED
|
@@ -70,10 +70,13 @@ const build = async function(inputFile, args) {
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
// 5. Generate Launcher (
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
// 5. Generate Launcher (Platform Specific)
|
|
74
|
+
const isWin = process.platform === "win32";
|
|
75
|
+
log(`Generating Launcher for ${process.platform}...`);
|
|
76
|
+
|
|
77
|
+
if (isWin) {
|
|
78
|
+
// --- WINDOWS (C# / .EXE) ---
|
|
79
|
+
const launcherCs = `
|
|
77
80
|
using System;
|
|
78
81
|
using System.Diagnostics;
|
|
79
82
|
using System.IO;
|
|
@@ -123,59 +126,81 @@ class Program {
|
|
|
123
126
|
}
|
|
124
127
|
}
|
|
125
128
|
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
129
|
+
`;
|
|
130
|
+
|
|
131
|
+
const csPath = path.join(distDir, 'Launcher.cs');
|
|
132
|
+
fs.writeFileSync(csPath, launcherCs);
|
|
130
133
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
134
|
+
const exeName = `${appName}.exe`;
|
|
135
|
+
const exePath = path.join(distDir, exeName);
|
|
136
|
+
|
|
137
|
+
let iconArg = "";
|
|
138
|
+
if (iconPath && fs.existsSync(iconPath)) {
|
|
139
|
+
const distIcon = path.join(distDir, 'app.ico');
|
|
140
|
+
fs.copyFileSync(iconPath, distIcon);
|
|
141
|
+
iconArg = `-Win32Icon "${distIcon}"`;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
log("Compiling EXE...");
|
|
145
|
+
|
|
146
|
+
const psScript = `
|
|
147
|
+
$csc = (Get-ChildItem -Path "$env:windir\\Microsoft.NET\\Framework64\\v4*" -Filter csc.exe | Select-Object -Last 1).FullName
|
|
148
|
+
if (-not $csc) {
|
|
149
|
+
$csc = (Get-ChildItem -Path "$env:windir\\Microsoft.NET\\Framework\\v4*" -Filter csc.exe | Select-Object -Last 1).FullName
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
if ($csc) {
|
|
153
|
+
Write-Host "Compiling with CSC: $csc"
|
|
154
|
+
$args = @("/target:winexe", "/out:${exePath}", "${csPath}")
|
|
155
|
+
if ("${iconArg}") { $args += "/win32icon:${path.join(distDir, 'app.ico')}" }
|
|
156
|
+
& $csc $args
|
|
157
|
+
} else {
|
|
158
|
+
Write-Error "CSC.exe not found. Cannot compile."
|
|
159
|
+
exit 1
|
|
160
|
+
}
|
|
161
|
+
`;
|
|
162
|
+
|
|
163
|
+
const psBuildPath = path.join(distDir, 'build_exe.ps1');
|
|
164
|
+
fs.writeFileSync(psBuildPath, psScript);
|
|
165
|
+
|
|
166
|
+
try {
|
|
167
|
+
execSync(`powershell -ExecutionPolicy Bypass -File "${psBuildPath}"`, { stdio: 'inherit' });
|
|
168
|
+
} catch(e) {
|
|
169
|
+
log("Compilation failed.");
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
if (fs.existsSync(exePath)) {
|
|
174
|
+
fs.unlinkSync(csPath);
|
|
175
|
+
fs.unlinkSync(psBuildPath);
|
|
176
|
+
log("Build Success!");
|
|
177
|
+
log(`Created: ${exePath}`);
|
|
178
|
+
} else {
|
|
179
|
+
error("EXE file was not created.");
|
|
180
|
+
}
|
|
141
181
|
|
|
142
|
-
log("Compiling EXE...");
|
|
143
|
-
|
|
144
|
-
// Using PowerShell to find CSC and compile
|
|
145
|
-
const psScript = `
|
|
146
|
-
$csc = (Get-ChildItem -Path "$env:windir\\Microsoft.NET\\Framework64\\v4*" -Filter csc.exe | Select-Object -Last 1).FullName
|
|
147
|
-
if (-not $csc) {
|
|
148
|
-
$csc = (Get-ChildItem -Path "$env:windir\\Microsoft.NET\\Framework\\v4*" -Filter csc.exe | Select-Object -Last 1).FullName
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
if ($csc) {
|
|
152
|
-
Write-Host "Compiling with CSC: $csc"
|
|
153
|
-
$args = @("/target:winexe", "/out:${exePath}", "${csPath}")
|
|
154
|
-
if ("${iconArg}") { $args += "/win32icon:${path.join(distDir, 'app.ico')}" }
|
|
155
|
-
& $csc $args
|
|
156
182
|
} else {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
fs.
|
|
174
|
-
|
|
183
|
+
// --- LINUX / MAC (Bash Script) ---
|
|
184
|
+
|
|
185
|
+
const launcherSh = `#!/bin/bash
|
|
186
|
+
DIR="$( cd "$( dirname "\${BASH_SOURCE[0]}" )" && pwd )"
|
|
187
|
+
# Use embedded node if available, else system node
|
|
188
|
+
if [ -f "$DIR/node" ]; then
|
|
189
|
+
NODE="$DIR/node"
|
|
190
|
+
else
|
|
191
|
+
NODE="node"
|
|
192
|
+
fi
|
|
193
|
+
|
|
194
|
+
"$NODE" "$DIR/fazer.js" "$DIR/app.fz" "$@"
|
|
195
|
+
`;
|
|
196
|
+
|
|
197
|
+
const shPath = path.join(distDir, appName);
|
|
198
|
+
fs.writeFileSync(shPath, launcherSh);
|
|
199
|
+
fs.chmodSync(shPath, 0o755);
|
|
200
|
+
|
|
175
201
|
log("Build Success!");
|
|
176
|
-
log(`Created: ${
|
|
177
|
-
|
|
178
|
-
error("EXE file was not created.");
|
|
202
|
+
log(`Created: ${shPath}`);
|
|
203
|
+
log("You can now zip the folder '${distDir}' and share it.");
|
|
179
204
|
}
|
|
180
205
|
};
|
|
181
206
|
|