nolimit-x 1.0.2 → 1.0.3

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/init.js +6 -20
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nolimit-x",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Advanced email sender for red team operations",
5
5
  "main": "src/cli.js",
6
6
  "bin": {
package/src/init.js CHANGED
@@ -3,23 +3,20 @@ const path = require("path");
3
3
 
4
4
  function printBanner() {
5
5
  console.log(`\n\x1b[36m` +
6
- ` _ _ _ _ _ _ _ \n| \ | | ___ | | | __| (_)___| |_ \n| \| |/ _ \| | |/ _ | / __| __|\n| |\ | (_) | | | (_| | \__ \ |_ \n|_| \_|\___/|_|_|\__,_|_|___/\__|\n` + '\x1b[0m');
6
+ ` _ _ _ _ _ _ _ \n| \ | | ___ | | | __| (_)___| |_ \n| \| |/ _ \| | |/ _| | / __| __|\n| |\ | (_) | | | (_| | \__ \ |_ \n|_| \_|\___/|_|_|\__,_|_|___/\__|\n` + '\x1b[0m');
7
7
  }
8
8
 
9
9
  function copyTemplate(src, dest) {
10
10
  try {
11
11
  const srcPath = path.join(__dirname, "../templates", src);
12
12
  const destPath = path.join(dest, src);
13
- console.log(`Copying from ${srcPath} to ${destPath}`);
14
13
  fs.copyFileSync(srcPath, destPath);
15
14
  } catch (err) {
16
- console.error(`Failed to copy template ${src}:`, err);
17
15
  throw err;
18
16
  }
19
17
  }
20
18
 
21
19
  function fixConfigPaths(configPath, workspace) {
22
- // Read config, update all file paths to be relative to workspace
23
20
  const config = JSON.parse(fs.readFileSync(configPath, 'utf8'));
24
21
  if (config.emails_list) config.emails_list.path = "emails.txt";
25
22
  if (config.senders_list) config.senders_list.path = "senders.txt";
@@ -36,40 +33,29 @@ async function init(projectName) {
36
33
  printBanner();
37
34
  process.stdout.write('Setting up workspace...');
38
35
  const projectPath = path.resolve(process.cwd(), projectName);
39
- console.log("Project path:", projectPath);
40
-
41
36
  if (fs.existsSync(projectPath)) {
42
37
  console.error(`\nDirectory ${projectName} already exists.`);
43
38
  process.exit(1);
44
39
  }
45
-
46
40
  try {
47
41
  fs.mkdirSync(projectPath);
48
- console.log("Created directory:", projectPath);
49
-
50
- // Create attachments dir if needed
51
42
  const attachmentsDir = path.join(projectPath, "attachments");
52
43
  if (!fs.existsSync(attachmentsDir)) fs.mkdirSync(attachmentsDir);
53
-
54
- ["config.json", "emails.txt", "senders.txt", "messages.html"].forEach(file => {
44
+ const files = ["config.json", "emails.txt", "senders.txt", "messages.html"];
45
+ files.forEach(file => {
55
46
  copyTemplate(file, projectPath);
56
- console.log("Copied template:", file);
57
47
  });
58
-
59
- // Fix config paths
60
48
  fixConfigPaths(path.join(projectPath, "config.json"), projectPath);
61
-
62
49
  // Simulate progress
63
50
  await new Promise(res => setTimeout(res, 800));
64
51
  process.stdout.clearLine();
65
52
  process.stdout.cursorTo(0);
66
- console.log("\x1b[32mWorkspace ready!\x1b[0m\n");
67
- console.log("Template files created:");
68
- ["config.json", "emails.txt", "senders.txt", "messages.html"].forEach(file => {
53
+ console.log("\x1b[32mTemplate created!\x1b[0m");
54
+ files.forEach(file => {
69
55
  console.log(` - ${file}`);
70
56
  });
71
57
  console.log(" - attachments/ (directory)");
72
- console.log(`\nInitialized new campaign in ${projectPath}`);
58
+ console.log(`Initialized new campaign in '${projectName}'`);
73
59
  } catch (error) {
74
60
  console.error("Error during initialization:", error);
75
61
  process.exit(1);