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.
- package/README.md +104 -84
- package/package.json +18 -5
package/README.md
CHANGED
|
@@ -1,121 +1,141 @@
|
|
|
1
1
|
<div align="center">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
<
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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
|
-
|
|
37
|
-
|
|
38
|
-
## ✨
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
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
|
-
###
|
|
68
|
+
### As a Dependency (SDK)
|
|
73
69
|
|
|
74
|
-
|
|
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
|
-
|
|
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
|
-
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## 💻 SDK Usage (Programmatic)
|
|
98
|
+
|
|
99
|
+
Import the logic directly into your **TypeScript** or **JavaScript** projects:
|
|
84
100
|
|
|
85
|
-
```
|
|
101
|
+
```ts
|
|
86
102
|
import { signJWT, getYoutubeTokens, generateSecurePassword } from "cf-keys";
|
|
87
103
|
|
|
88
|
-
async function
|
|
89
|
-
//
|
|
104
|
+
async function setup() {
|
|
105
|
+
// Automate YouTube token retrieval
|
|
90
106
|
const tokens = await getYoutubeTokens();
|
|
91
107
|
|
|
92
|
-
//
|
|
93
|
-
const token = signJWT({
|
|
108
|
+
// Sign a new JWT for your internal services
|
|
109
|
+
const token = signJWT({ service: "dashboard" }, "your_super_secret_key");
|
|
94
110
|
|
|
95
|
-
//
|
|
96
|
-
const
|
|
111
|
+
// Generate a high-entropy 32-character password
|
|
112
|
+
const password = generateSecurePassword(32);
|
|
97
113
|
|
|
98
|
-
console.log({ tokens, token,
|
|
114
|
+
console.log({ tokens, token, password });
|
|
99
115
|
}
|
|
100
116
|
```
|
|
101
117
|
|
|
102
|
-
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## 🛠️ Tech Stack
|
|
103
121
|
|
|
104
122
|
<div align="left">
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
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
|
-
|
|
129
|
+
---
|
|
112
130
|
|
|
113
|
-
|
|
131
|
+
## 📄 License
|
|
114
132
|
|
|
115
|
-
|
|
133
|
+
This project is licensed under the **MIT License**.
|
|
116
134
|
|
|
117
|
-
|
|
135
|
+
You are free to use it in personal or commercial projects as long as proper attribution is maintained.
|
|
118
136
|
|
|
119
|
-
|
|
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
|
|
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": "
|
|
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
|
-
"
|
|
34
|
+
"type": "commonjs",
|
|
22
35
|
"bin": {
|
|
23
36
|
"cf-keys": "dist/index.js"
|
|
24
37
|
},
|