cf-keys 1.0.7 → 1.1.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.
Files changed (2) hide show
  1. package/README.md +104 -84
  2. package/package.json +18 -5
package/README.md CHANGED
@@ -1,121 +1,141 @@
1
1
  <div align="center">
2
- <br />
3
- <p align="center">
4
- <img src="https://raw.githubusercontent.com/choco-latito29/choco-latito29/main/Assets/cf-keys.png" width="150" alt="cf-keys-logo">
5
- </p>
6
-
7
- <h1><code>cf-keys</code></h1>
8
-
9
- <p align="center">
10
- <strong>Security & Utility Suite for Systems Engineering</strong>
11
- <br />
12
- <i>Una navaja suiza modular para la gestión de credenciales, seguridad JWT y automatización de tokens.</i>
13
- </p>
14
-
15
- <p align="center">
16
- <a href="https://www.npmjs.com/package/cf-keys">
17
- <img src="https://img.shields.io/npm/v/cf-keys?style=for-the-badge&logo=npm&logoColor=white&color=007acc" alt="npm version" />
18
- </a>
19
-
20
- <img src="https://img.shields.io/npm/dt/cf-keys?style=for-the-badge&logo=npm&logoColor=white&color=339933" alt="npm downloads" />
21
-
22
- <img src="https://img.shields.io/badge/License-MIT-f39c12?style=for-the-badge&logo=opensourceinitiative&logoColor=white" alt="license" />
23
-
24
- <img src="https://img.shields.io/badge/Node.js-18+-339933?style=for-the-badge&logo=nodedotjs&logoColor=white" alt="Node.js" />
25
- <img src="https://img.shields.io/badge/TypeScript-5.x-3178C6?style=for-the-badge&logo=typescript&logoColor=white" alt="TypeScript" />
26
- </p>
27
-
28
- <p align="center">
29
- <a href="#-características">Características</a> •
30
- <a href="#-instalación">Instalación</a> •
31
- <a href="#-uso-programático">Uso Programático</a> •
32
- <a href="#-licencia">Licencia</a>
33
- </p>
2
+
3
+ <img src="https://raw.githubusercontent.com/choco-latito29/choco-latito29/main/Assets/cf-keys.png" width="140" alt="cf-keys-logo" />
4
+
5
+ # `cf-keys`
6
+
7
+ **Security & Utility Suite for Systems Engineering** <i>Modular toolkit for security, credential generation, and token automation in Node.js.</i>
8
+
9
+ <br/>
10
+
11
+ <a href="https://www.npmjs.com/package/cf-keys">
12
+ <img src="https://img.shields.io/npm/v/cf-keys?style=for-the-badge&logo=npm&logoColor=white&color=007acc" />
13
+ </a>
14
+
15
+ <img src="https://img.shields.io/npm/dt/cf-keys?style=for-the-badge&logo=npm&logoColor=white&color=339933" />
16
+
17
+ <a href="https://github.com/choco-latito29/CF-KEYS/blob/main/LICENSE">
18
+ <img src="https://img.shields.io/github/license/choco-latito29/CF-KEYS?style=for-the-badge&logo=github&logoColor=white&color=f39c12" />
19
+ </a>
20
+
21
+ <br/>
22
+
23
+ <img src="https://img.shields.io/badge/Node.js-18+-339933?style=for-the-badge&logo=nodedotjs&logoColor=white" />
24
+ <img src="https://img.shields.io/badge/TypeScript-5.x-3178C6?style=for-the-badge&logo=typescript&logoColor=white" />
25
+
26
+ <br/><br/>
27
+
28
+ <a href="#-features">Features</a> •
29
+ <a href="#-installation">Installation</a> •
30
+ <a href="#-cli-usage">CLI Usage</a> •
31
+ <a href="#-sdk-usage">SDK Usage</a> •
32
+ <a href="#-tech-stack">Tech Stack</a>
33
+ <a href="#-license">License</a>
34
+
34
35
  </div>
35
36
 
36
- <hr />
37
-
38
- ## ✨ Características Principales
39
-
40
- <table width="100%">
41
- <tr>
42
- <td width="50%" style="border: none; vertical-align: top;">
43
- <h3>🔐 Módulos de Seguridad</h3>
44
- <ul>
45
- <li><strong>JWT Engine:</strong> Firma tokens con algoritmos industriales para bots y dashboards.</li>
46
- <li><strong>Secure Passwords:</strong> Generación aleatoria con alta entropía mediante <code>node:crypto</code>.</li>
47
- <li><strong>Hash Integrity:</strong> Verificación de archivos vía MD5, SHA-256 y SHA-512.</li>
48
- </ul>
49
- </td>
50
- <td width="50%" style="border: none; vertical-align: top;">
51
- <h3>🛠️ Utilidades de Infraestructura</h3>
52
- <ul>
53
- <li><strong>YouTube Auth:</strong> Extracción automática de <code>poToken</code> y <code>visitorData</code> para bots de música.</li>
54
- <li><strong>Data Utils:</strong> Encoding y Decoding instantáneo para Base64 y URL.</li>
55
- <li><strong>Hybrid Architecture:</strong> Funciona como comando CLI global y como SDK para Node.js.</li>
56
- </ul>
57
- </td>
58
- </tr>
59
- </table>
60
-
61
- ## 🚀 Instalación
62
-
63
- ### Uso Global (Terminal)
64
-
65
- Ideal para tareas rápidas de administración de servidores o cualquier parte del mundo:
37
+ ---
38
+
39
+ ## ✨ Features
40
+
41
+ ### 🔐 Security Modules
42
+
43
+ - **JWT Engine** Sign and verify JWT tokens for bots, APIs, and dashboards.
44
+ - **Secure Passwords** → Generate cryptographically secure passwords using `node:crypto`.
45
+ - **Hash Integrity** → Calculate and verify MD5, SHA-256, and SHA-512 hashes for data integrity.
46
+
47
+ ---
48
+
49
+ ### 🛠️ Infrastructure Utilities
50
+
51
+ - **YouTube Auth** Automated retrieval of `poToken` and `visitorData` for specialized integrations.
52
+ - **Data Utils** → Instant encoding and decoding for Base64 and URL formats.
53
+ - **Hybrid Architecture** → Seamlessly works as a global CLI and a programmatic SDK.
54
+
55
+ ---
56
+
57
+ ## 🚀 Installation
58
+
59
+ ### Global Usage (CLI)
60
+
61
+ Best for automation, sysadmin tasks, and quick terminal operations:
66
62
 
67
63
  ```bash
68
64
  npm install -g cf-keys --foreground-scripts
69
65
 
70
66
  ```
71
67
 
72
- ### Como Dependencia (Bots/Backend)
68
+ ### As a Dependency (SDK)
73
69
 
74
- Instala `cf-keys` en tus proyectos de **Discord.js**:
70
+ For integration into your own projects (bots, servers, etc.):
75
71
 
76
72
  ```bash
77
73
  npm install cf-keys
78
74
 
79
75
  ```
80
76
 
81
- ## 💻 Uso Programático (SDK)
77
+ ---
78
+
79
+ ## ⚡ CLI Usage
80
+
81
+ After global installation, you can access the suite using the `cf-keys` command. If run without arguments, it displays a professional dashboard with the status and version.
82
+
83
+ ### Common Commands & Examples:
84
+
85
+ | Command | Description | Example |
86
+ | ---------- | ------------------------- | ------------------------------- |
87
+ | `jwt sign` | Interactive JWT signing | `cf-keys jwt sign` |
88
+ | `password` | Generate a secure string | `cf-keys password 32` |
89
+ | `youtube` | Get YouTube bypass tokens | `cf-keys youtube` |
90
+ | `hash` | Calculate file/text hash | `cf-keys hash -a sha256 MyData` |
91
+ | `utils` | Base64/URL Encoding | `cf-keys utils encode "hello"` |
92
+
93
+ **Pro Tip:** Use `cf-keys --help` to see all available flags and options for each module.
82
94
 
83
- Gracias a su arquitectura de entrada dual, puedes importar la lógica pura directamente en tu código de **TypeScript** o **JavaScript**:
95
+ ---
96
+
97
+ ## 💻 SDK Usage (Programmatic)
98
+
99
+ Import the logic directly into your **TypeScript** or **JavaScript** projects:
84
100
 
85
- ```typescript
101
+ ```ts
86
102
  import { signJWT, getYoutubeTokens, generateSecurePassword } from "cf-keys";
87
103
 
88
- async function setupBot() {
89
- // Generar tokens para bypass de YouTube
104
+ async function setup() {
105
+ // Automate YouTube token retrieval
90
106
  const tokens = await getYoutubeTokens();
91
107
 
92
- // Firmar acceso para el dashboard de ChocoFactory.dev
93
- const token = signJWT({ bot: "KiwiChan" }, "tu_secreto_secreta");
108
+ // Sign a new JWT for your internal services
109
+ const token = signJWT({ service: "dashboard" }, "your_super_secret_key");
94
110
 
95
- // Generar credenciales de base de datos
96
- const dbPass = generateSecurePassword(32);
111
+ // Generate a high-entropy 32-character password
112
+ const password = generateSecurePassword(32);
97
113
 
98
- console.log({ tokens, token, dbPass });
114
+ console.log({ tokens, token, password });
99
115
  }
100
116
  ```
101
117
 
102
- ## 🛠️ Stack Tecnológico
118
+ ---
119
+
120
+ ## 🛠️ Tech Stack
103
121
 
104
122
  <div align="left">
105
- <img src="https://img.shields.io/badge/Node.js-339933?style=flat-square&logo=nodedotjs&logoColor=white" alt="Node.js Badge" />
106
- <img src="https://img.shields.io/badge/TypeScript-007ACC?style=flat-square&logo=typescript&logoColor=white" alt="TypeScript Badge" />
107
- <img src="https://img.shields.io/badge/Commander.js-FFD700?style=flat-square&logo=commanderdotjs&logoColor=black" alt="Commander.js Badge" />
108
- <img src="https://img.shields.io/badge/JSONWebToken-black?style=flat-square&logo=jsonwebtokens&logoColor=white" alt="JWT Badge" />
123
+ <img src="https://img.shields.io/badge/Node.js-339933?style=flat-square&logo=nodedotjs&logoColor=white" />
124
+ <img src="https://img.shields.io/badge/TypeScript-007ACC?style=flat-square&logo=typescript&logoColor=white" />
125
+ <img src="https://img.shields.io/badge/Commander.js-FFD700?style=flat-square&logo=commanderdotjs&logoColor=black" />
126
+ <img src="https://img.shields.io/badge/JSONWebToken-black?style=flat-square&logo=jsonwebtokens&logoColor=white" />
109
127
  </div>
110
128
 
111
- ## 📄 Licencia
129
+ ---
112
130
 
113
- Este proyecto está bajo la **Licencia MIT**. Esto significa que puedes usarlo libremente en tus proyectos personales o comerciales siempre que mantengas la atribución original.
131
+ ## 📄 License
114
132
 
115
- ---
133
+ This project is licensed under the **MIT License**.
116
134
 
117
- <div align="center">
135
+ You are free to use it in personal or commercial projects as long as proper attribution is maintained.
118
136
 
119
- <a href="https://www.google.com/search?q=https://chocofactory.dev"><strong>Visitar ChocoFactory.dev</strong></a>
137
+ ---
120
138
 
139
+ <div align="center">
140
+ <sub>Built with ⚡ by Choco</sub>
121
141
  </div>
package/package.json CHANGED
@@ -1,24 +1,37 @@
1
1
  {
2
2
  "name": "cf-keys",
3
- "version": "1.0.7",
3
+ "version": "1.1.0",
4
4
  "description": "Suite global de generación de claves y credenciales",
5
5
  "main": "dist/lib.js",
6
6
  "types": "dist/lib.d.ts",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/choco-latito29/CF-KEYS.git"
10
+ },
11
+ "bugs": {
12
+ "url": "https://github.com/choco-latito29/CF-KEYS/issues"
13
+ },
14
+ "homepage": "https://github.com/choco-latito29/CF-KEYS#readme",
7
15
  "scripts": {
8
16
  "build": "tsc",
9
17
  "prepublishOnly": "npm run build",
10
- "postinstall": "cf-keys welcome"
18
+ "postinstall": "node dist/index.js welcome"
11
19
  },
20
+ "files": [
21
+ "dist"
22
+ ],
12
23
  "keywords": [
13
24
  "security",
14
25
  "cloudflare",
15
26
  "jwt",
16
27
  "youtube-token",
17
- "systems-engineering"
28
+ "systems-engineering",
29
+ "cli",
30
+ "automation"
18
31
  ],
19
- "author": "",
32
+ "author": "𝒞𝒽𝑜𝒸𝑜",
20
33
  "license": "MIT",
21
- "module": "CommonJS",
34
+ "type": "commonjs",
22
35
  "bin": {
23
36
  "cf-keys": "dist/index.js"
24
37
  },