hardixx-code 1.0.0__tar.gz

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 (32) hide show
  1. hardixx_code-1.0.0/CHANGELOG.md +77 -0
  2. hardixx_code-1.0.0/CONTRIBUTING.md +97 -0
  3. hardixx_code-1.0.0/LICENSE +21 -0
  4. hardixx_code-1.0.0/MANIFEST.in +9 -0
  5. hardixx_code-1.0.0/PKG-INFO +511 -0
  6. hardixx_code-1.0.0/PUBLISHING_GUIDE.md +354 -0
  7. hardixx_code-1.0.0/README.md +469 -0
  8. hardixx_code-1.0.0/docs/ADVANCED_EXAMPLES.md +360 -0
  9. hardixx_code-1.0.0/docs/QUICKSTART.md +180 -0
  10. hardixx_code-1.0.0/docs/SECURITY_AND_ETHICS.md +131 -0
  11. hardixx_code-1.0.0/examples/__init__.py +0 -0
  12. hardixx_code-1.0.0/examples/basic_decrypt.py +30 -0
  13. hardixx_code-1.0.0/examples/batch_processing.py +66 -0
  14. hardixx_code-1.0.0/examples/full_analysis.py +67 -0
  15. hardixx_code-1.0.0/examples/telegram_bot_example.py +36 -0
  16. hardixx_code-1.0.0/hardixx_code/__init__.py +27 -0
  17. hardixx_code-1.0.0/hardixx_code/cli.py +269 -0
  18. hardixx_code-1.0.0/hardixx_code/crypto.py +148 -0
  19. hardixx_code-1.0.0/hardixx_code/packet_handler.py +198 -0
  20. hardixx_code-1.0.0/hardixx_code/packet_sniffer.py +234 -0
  21. hardixx_code-1.0.0/hardixx_code/protobuf_handler.py +199 -0
  22. hardixx_code-1.0.0/hardixx_code/telegram_bot.py +307 -0
  23. hardixx_code-1.0.0/hardixx_code.egg-info/PKG-INFO +511 -0
  24. hardixx_code-1.0.0/hardixx_code.egg-info/SOURCES.txt +30 -0
  25. hardixx_code-1.0.0/hardixx_code.egg-info/dependency_links.txt +1 -0
  26. hardixx_code-1.0.0/hardixx_code.egg-info/entry_points.txt +2 -0
  27. hardixx_code-1.0.0/hardixx_code.egg-info/requires.txt +11 -0
  28. hardixx_code-1.0.0/hardixx_code.egg-info/top_level.txt +3 -0
  29. hardixx_code-1.0.0/requirements.txt +5 -0
  30. hardixx_code-1.0.0/setup.cfg +4 -0
  31. hardixx_code-1.0.0/setup.py +49 -0
  32. hardixx_code-1.0.0/tests/__init__.py +0 -0
@@ -0,0 +1,77 @@
1
+ # Changelog
2
+
3
+ All notable changes to hardixx-code will be documented in this file.
4
+
5
+ The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
6
+
7
+ ## [1.0.0] - 2024-02-03
8
+
9
+ ### Added
10
+
11
+ - Initial release of hardixx-code
12
+ - FFCrypto module for AES-256-CBC encryption/decryption
13
+ - Decrypt Free Fire game packets
14
+ - Encrypt data with AES-CBC
15
+ - Support for hex string input/output
16
+ - Custom key and IV support
17
+ - ProtobufHandler module for Protocol Buffer decoding
18
+ - Decode protobuf messages without schema
19
+ - Extract strings from protobuf data
20
+ - Field filtering and extraction
21
+ - Pretty printing of decoded fields
22
+ - PacketHandler module for complete packet processing
23
+ - Full pipeline: decrypt -> decode -> analyze
24
+ - Batch processing of multiple packets
25
+ - Packet logging and statistics
26
+ - Field extraction and analysis
27
+ - PacketSniffer module for network packet capture
28
+ - Raw socket packet capture
29
+ - Port-based filtering
30
+ - PCAP file export
31
+ - Free Fire port detection
32
+ - FFTelegramBot module for Telegram integration
33
+ - Interactive bot for packet analysis
34
+ - Decrypt command
35
+ - Full analysis command
36
+ - Status and help commands
37
+ - Session management
38
+ - CLI tool (hardixx-cli)
39
+ - Interactive mode
40
+ - Command-line packet processing
41
+ - Batch processing
42
+ - Processing log
43
+ - Comprehensive documentation
44
+ - API documentation
45
+ - Usage examples
46
+ - Quick start guide
47
+ - Troubleshooting guide
48
+ - Example scripts
49
+ - Basic decryption example
50
+ - Full analysis example
51
+ - Batch processing example
52
+ - Telegram bot example
53
+
54
+ ### Security
55
+
56
+ - Uses official Free Fire AES keys (public knowledge)
57
+ - PKCS7 padding for AES encryption
58
+ - Proper error handling for invalid input
59
+
60
+ ## Future Releases
61
+
62
+ ### Planned for 1.1.0
63
+
64
+ - Support for multiple encryption algorithms
65
+ - Advanced protobuf schema support
66
+ - Real-time packet monitoring
67
+ - Database storage for packet analysis
68
+ - Web dashboard for visualization
69
+ - Performance optimizations
70
+
71
+ ### Under Consideration
72
+
73
+ - Support for other games
74
+ - Machine learning for packet classification
75
+ - Automated vulnerability detection
76
+ - Integration with Wireshark
77
+ - Mobile app for packet analysis
@@ -0,0 +1,97 @@
1
+ # Contributing to hardixx-code
2
+
3
+ Thank you for your interest in contributing to hardixx-code! This document provides guidelines and instructions for contributing.
4
+
5
+ ## Code of Conduct
6
+
7
+ - Be respectful and professional
8
+ - No harassment or discrimination
9
+ - Follow all applicable laws and regulations
10
+ - Respect the Free Fire Terms of Service
11
+
12
+ ## How to Contribute
13
+
14
+ ### Reporting Bugs
15
+
16
+ 1. Check if the bug has already been reported
17
+ 2. Create a new issue with a clear title and description
18
+ 3. Include steps to reproduce the bug
19
+ 4. Provide example code if possible
20
+ 5. Include your environment details (Python version, OS, etc.)
21
+
22
+ ### Suggesting Features
23
+
24
+ 1. Check if the feature has already been suggested
25
+ 2. Create a new issue with "Feature Request" in the title
26
+ 3. Clearly describe the feature and its benefits
27
+ 4. Explain why this feature would be useful
28
+
29
+ ### Submitting Code
30
+
31
+ 1. Fork the repository
32
+ 2. Create a feature branch: `git checkout -b feature/your-feature-name`
33
+ 3. Make your changes
34
+ 4. Add tests for new functionality
35
+ 5. Ensure all tests pass: `pytest`
36
+ 6. Commit with clear messages: `git commit -m "Add feature description"`
37
+ 7. Push to your fork: `git push origin feature/your-feature-name`
38
+ 8. Create a Pull Request with a clear description
39
+
40
+ ## Code Style
41
+
42
+ - Follow PEP 8 guidelines
43
+ - Use meaningful variable and function names
44
+ - Add docstrings to all functions and classes
45
+ - Keep functions focused and modular
46
+ - Use type hints where appropriate
47
+
48
+ ## Testing
49
+
50
+ - Write tests for new functionality
51
+ - Ensure existing tests still pass
52
+ - Aim for good code coverage
53
+ - Use pytest for testing
54
+
55
+ ## Documentation
56
+
57
+ - Update README.md if adding new features
58
+ - Add docstrings to all public functions
59
+ - Include examples for new features
60
+ - Keep documentation up to date
61
+
62
+ ## Commit Messages
63
+
64
+ - Use clear, descriptive commit messages
65
+ - Start with a verb (Add, Fix, Update, etc.)
66
+ - Keep the first line under 50 characters
67
+ - Add more details in the body if needed
68
+
69
+ Example:
70
+ ```
71
+ Add packet filtering by field number
72
+
73
+ - Implement filter_by_field_number() in ProtobufHandler
74
+ - Add unit tests for new functionality
75
+ - Update documentation with examples
76
+ ```
77
+
78
+ ## Pull Request Process
79
+
80
+ 1. Update the README.md with any new features
81
+ 2. Update the version number following semantic versioning
82
+ 3. Ensure all tests pass
83
+ 4. Request review from maintainers
84
+ 5. Address any feedback or requested changes
85
+
86
+ ## Legal
87
+
88
+ By contributing to hardixx-code, you agree that:
89
+ - Your contributions will be licensed under the MIT License
90
+ - You have the right to contribute the code
91
+ - The code does not violate any laws or third-party rights
92
+
93
+ ## Questions?
94
+
95
+ Feel free to open an issue for questions or discussions.
96
+
97
+ Thank you for contributing!
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 H4RDIXX
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,9 @@
1
+ include README.md
2
+ include LICENSE
3
+ include CHANGELOG.md
4
+ include CONTRIBUTING.md
5
+ include PUBLISHING_GUIDE.md
6
+ include requirements.txt
7
+ recursive-include hardixx_code *.py
8
+ recursive-include docs *.md
9
+ recursive-include examples *.py
@@ -0,0 +1,511 @@
1
+ Metadata-Version: 2.4
2
+ Name: hardixx-code
3
+ Version: 1.0.0
4
+ Summary: Advanced Free Fire packet analysis, decryption, and reverse engineering library
5
+ Home-page: https://github.com/hardixx/hardixx-code
6
+ Author: H4RDIXX
7
+ Author-email: adomaderbali@gmail.com
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3.8
10
+ Classifier: Programming Language :: Python :: 3.9
11
+ Classifier: Programming Language :: Python :: 3.10
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Development Status :: 4 - Beta
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
18
+ Requires-Python: >=3.8
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+ Requires-Dist: pycryptodome>=3.15.0
22
+ Requires-Dist: protobuf>=3.20.0
23
+ Requires-Dist: python-telegram-bot>=20.0
24
+ Requires-Dist: requests>=2.28.0
25
+ Requires-Dist: scapy>=2.5.0
26
+ Provides-Extra: dev
27
+ Requires-Dist: pytest>=7.0; extra == "dev"
28
+ Requires-Dist: pytest-cov>=4.0; extra == "dev"
29
+ Requires-Dist: black>=22.0; extra == "dev"
30
+ Requires-Dist: flake8>=4.0; extra == "dev"
31
+ Dynamic: author
32
+ Dynamic: author-email
33
+ Dynamic: classifier
34
+ Dynamic: description
35
+ Dynamic: description-content-type
36
+ Dynamic: home-page
37
+ Dynamic: license-file
38
+ Dynamic: provides-extra
39
+ Dynamic: requires-dist
40
+ Dynamic: requires-python
41
+ Dynamic: summary
42
+
43
+ # hardixx-code: Free Fire Packet Analysis Library
44
+
45
+ Advanced Python library for analyzing, decrypting, and manipulating Free Fire game packets. Includes AES decryption, Protobuf decoding, packet sniffing, and Telegram bot integration for developers.
46
+
47
+ **Version:** 1.0.0
48
+ **Author:** H4RDIXX
49
+ **License:** MIT
50
+
51
+ ---
52
+
53
+ ## Features
54
+
55
+ - AES-256-CBC Decryption - Decrypt Free Fire game packets using official keys
56
+ - Protobuf Decoding - Parse and analyze Protocol Buffer encoded messages without schema
57
+ - Packet Handler - Complete pipeline for decrypt → decode → analyze workflow
58
+ - Packet Sniffer - Capture and filter network traffic (requires root)
59
+ - Telegram Bot - Real-time packet analysis via Telegram
60
+ - CLI Tool - Interactive command-line interface
61
+ - Batch Processing - Process multiple packets at once
62
+ - Comprehensive Logging - Track all packet processing operations
63
+
64
+ ---
65
+
66
+ ## Installation
67
+
68
+ ### From PyPI (Coming Soon)
69
+ ```bash
70
+ pip install hardixx-code
71
+ ```
72
+
73
+ ### From Source
74
+ ```bash
75
+ git clone https://github.com/hardixx/hardixx-code.git
76
+ cd hardixx-code
77
+ pip install -r requirements.txt
78
+ pip install -e .
79
+ ```
80
+
81
+ ### Requirements
82
+ - Python 3.8+
83
+ - pycryptodome
84
+ - protobuf
85
+ - python-telegram-bot (for Telegram features)
86
+ - scapy (for packet sniffing)
87
+
88
+ ---
89
+
90
+ ## Quick Start
91
+
92
+ ### 1. Basic Decryption
93
+
94
+ ```python
95
+ from hardixx_code import FFCrypto
96
+
97
+ crypto = FFCrypto()
98
+ hex_packet = "a1b2c3d4e5f6g7h8..."
99
+ decrypted = crypto.decrypt(hex_packet)
100
+ print(decrypted.hex())
101
+ ```
102
+
103
+ ### 2. Full Packet Analysis
104
+
105
+ ```python
106
+ from hardixx_code import PacketHandler
107
+
108
+ handler = PacketHandler()
109
+ result = handler.process_packet("a1b2c3d4e5f6g7h8...")
110
+
111
+ if result['success']:
112
+ print(f"Decrypted: {result['decrypted_hex']}")
113
+ print(f"Fields: {len(result['fields'])}")
114
+ for field in result['fields']:
115
+ print(f" Field {field['field_number']}: {field['value']}")
116
+ ```
117
+
118
+ ### 3. Extract Strings from Packet
119
+
120
+ ```python
121
+ from hardixx_code import PacketHandler
122
+
123
+ handler = PacketHandler()
124
+ result = handler.process_packet("a1b2c3d4e5f6g7h8...")
125
+
126
+ strings = handler.extract_strings(result['fields'])
127
+ for s in strings:
128
+ print(s)
129
+ ```
130
+
131
+ ### 4. Telegram Bot
132
+
133
+ ```python
134
+ from hardixx_code import FFTelegramBot, PacketHandler
135
+
136
+ handler = PacketHandler()
137
+ bot = FFTelegramBot(token="YOUR_BOT_TOKEN", packet_handler=handler)
138
+ bot.run()
139
+ ```
140
+
141
+ ### 5. Command-Line Interface
142
+
143
+ ```bash
144
+ # Interactive mode
145
+ hardixx-cli
146
+
147
+ # Decrypt a packet
148
+ hardixx-cli -d "a1b2c3d4e5f6..."
149
+
150
+ # Analyze a packet
151
+ hardixx-cli -a "a1b2c3d4e5f6..."
152
+ ```
153
+
154
+ ---
155
+
156
+ ## API Documentation
157
+
158
+ ### FFCrypto
159
+
160
+ Handles AES encryption/decryption of game packets.
161
+
162
+ ```python
163
+ from hardixx_code import FFCrypto
164
+
165
+ # Initialize with default keys
166
+ crypto = FFCrypto()
167
+
168
+ # Decrypt hex string
169
+ decrypted = crypto.decrypt("a1b2c3d4...")
170
+
171
+ # Encrypt data
172
+ encrypted = crypto.encrypt(b"plaintext")
173
+
174
+ # Get hex output
175
+ hex_encrypted = crypto.encrypt_hex(b"plaintext")
176
+
177
+ # Custom keys
178
+ custom_crypto = FFCrypto(key=b"your_16_byte_key", iv=b"your_16_byte_iv")
179
+ ```
180
+
181
+ **Methods:**
182
+ - decrypt(ciphertext) - Decrypt AES-CBC encrypted data
183
+ - encrypt(plaintext) - Encrypt data with AES-CBC
184
+ - decrypt_hex(hex_string) - Decrypt hex-encoded ciphertext
185
+ - encrypt_hex(plaintext) - Encrypt and return as hex
186
+ - set_key(key) - Change encryption key
187
+ - set_iv(iv) - Change initialization vector
188
+
189
+ ### ProtobufHandler
190
+
191
+ Decodes Protocol Buffer messages without schema.
192
+
193
+ ```python
194
+ from hardixx_code import ProtobufHandler
195
+
196
+ # Decode raw bytes
197
+ fields = ProtobufHandler.decode(decrypted_bytes)
198
+
199
+ # Extract strings
200
+ strings = ProtobufHandler.extract_strings(fields)
201
+
202
+ # Get specific field
203
+ field_5 = ProtobufHandler.extract_by_field_number(fields, 5)
204
+
205
+ # Convert to dictionary
206
+ fields_dict = ProtobufHandler.to_dict(fields)
207
+
208
+ # Format for display
209
+ formatted = ProtobufHandler.format_output(fields)
210
+ print(formatted)
211
+ ```
212
+
213
+ **Methods:**
214
+ - decode(data) - Decode protobuf bytes
215
+ - extract_strings(fields) - Get all string values
216
+ - extract_by_field_number(fields, number) - Get fields by number
217
+ - to_dict(fields) - Convert to dictionary
218
+ - format_output(fields) - Pretty print fields
219
+
220
+ ### PacketHandler
221
+
222
+ Complete packet processing pipeline.
223
+
224
+ ```python
225
+ from hardixx_code import PacketHandler
226
+
227
+ handler = PacketHandler()
228
+
229
+ # Process complete packet
230
+ result = handler.process_packet("a1b2c3d4...")
231
+
232
+ # Decrypt only
233
+ decrypted = handler.decrypt_only("a1b2c3d4...")
234
+
235
+ # Decode only
236
+ fields = handler.decode_only(decrypted_bytes)
237
+
238
+ # Extract strings
239
+ strings = handler.extract_strings()
240
+
241
+ # Get specific field
242
+ field = handler.get_field(5)
243
+
244
+ # Batch process
245
+ results = handler.batch_process(["packet1", "packet2", ...])
246
+
247
+ # Get log
248
+ log = handler.get_packet_log()
249
+ ```
250
+
251
+ **Methods:**
252
+ - process_packet(packet_hex, log=True) - Full processing
253
+ - decrypt_only(packet_hex) - Decrypt only
254
+ - decode_only(decrypted_bytes) - Decode only
255
+ - extract_strings(fields=None) - Extract strings
256
+ - get_field(field_number, fields=None) - Get field by number
257
+ - batch_process(packets) - Process multiple packets
258
+ - get_packet_log() - Get processing log
259
+ - clear_log() - Clear log
260
+
261
+ ### PacketSniffer
262
+
263
+ Capture and analyze network packets.
264
+
265
+ ```python
266
+ from hardixx_code import PacketSniffer, PacketHandler
267
+
268
+ handler = PacketHandler()
269
+ sniffer = PacketSniffer(handler)
270
+
271
+ # Capture packets (requires root)
272
+ packets = sniffer.capture_raw_socket(timeout=60)
273
+
274
+ # Filter by port
275
+ filtered = sniffer.filter_by_port(packets, 443)
276
+
277
+ # Filter by FF ports
278
+ ff_packets = sniffer.filter_by_ff_ports(packets)
279
+
280
+ # Analyze captured
281
+ results = sniffer.analyze_captured()
282
+
283
+ # Export to PCAP
284
+ sniffer.export_pcap("output.pcap")
285
+ ```
286
+
287
+ **Methods:**
288
+ - capture_raw_socket(interface=None, timeout=60) - Capture packets
289
+ - filter_by_port(packets, port) - Filter by port
290
+ - filter_by_ff_ports(packets) - Filter by FF ports
291
+ - analyze_captured() - Analyze all captured packets
292
+ - export_pcap(filename) - Export to PCAP file
293
+ - stop_sniffing() - Stop capture
294
+
295
+ ### FFTelegramBot
296
+
297
+ Telegram bot interface for packet analysis.
298
+
299
+ ```python
300
+ from hardixx_code import FFTelegramBot, PacketHandler
301
+
302
+ handler = PacketHandler()
303
+ bot = FFTelegramBot(token="YOUR_BOT_TOKEN", packet_handler=handler)
304
+
305
+ # Setup handlers
306
+ bot.setup_handlers()
307
+
308
+ # Run bot
309
+ bot.run()
310
+ ```
311
+
312
+ **Telegram Commands:**
313
+ - /start - Start bot
314
+ - /help - Show help
315
+ - /decrypt - Decrypt packet
316
+ - /analyze - Full analysis
317
+ - /status - Bot status
318
+ - /clear - Clear session
319
+
320
+ ---
321
+
322
+ ## Security Notes
323
+
324
+ - **Keys are embedded** - The default AES keys are public knowledge (extracted from game)
325
+ - **For development only** - Use for learning and authorized testing only
326
+ - **Respect ToS** - Comply with Free Fire Terms of Service
327
+ - **No malicious use** - Do not use for cheating, hacking, or unauthorized access
328
+
329
+ ---
330
+
331
+ ## Examples
332
+
333
+ ### Example 1: Decrypt and Display
334
+
335
+ ```python
336
+ from hardixx_code import PacketHandler
337
+
338
+ handler = PacketHandler()
339
+ packet_hex = input("Enter packet hex: ")
340
+
341
+ result = handler.process_packet(packet_hex)
342
+
343
+ if result['success']:
344
+ print(" Success!")
345
+ print(f"Decrypted: {result['decrypted_hex']}")
346
+ print(f"\nFields ({len(result['fields'])}):")
347
+ for field in result['fields']:
348
+ print(f" {field['field_number']}: {field['value']}")
349
+ else:
350
+ print(f" Error: {result['error']}")
351
+ ```
352
+
353
+ ### Example 2: Extract Player Names
354
+
355
+ ```python
356
+ from hardixx_code import PacketHandler
357
+
358
+ handler = PacketHandler()
359
+ result = handler.process_packet(packet_hex)
360
+
361
+ strings = handler.extract_strings(result['fields'])
362
+ player_names = [s for s in strings if len(s) > 2 and len(s) < 20]
363
+
364
+ print("Possible player names:")
365
+ for name in player_names:
366
+ print(f" - {name}")
367
+ ```
368
+
369
+ ### Example 3: Batch Analysis
370
+
371
+ ```python
372
+ from hardixx_code import PacketHandler
373
+
374
+ handler = PacketHandler()
375
+ packets = [
376
+ "a1b2c3d4...",
377
+ "e5f6g7h8...",
378
+ "i9j0k1l2...",
379
+ ]
380
+
381
+ results = handler.batch_process(packets)
382
+
383
+ for i, result in enumerate(results, 1):
384
+ if result['success']:
385
+ print(f"Packet {i}: {len(result['fields'])} fields")
386
+ else:
387
+ print(f"Packet {i}: ERROR - {result['error']}")
388
+ ```
389
+
390
+ ---
391
+
392
+ ## Telegram Bot Setup
393
+
394
+ 1. **Create a bot** with BotFather on Telegram
395
+ 2. **Get token** from BotFather
396
+ 3. **Create script:**
397
+
398
+ ```python
399
+ from hardixx_code import FFTelegramBot, PacketHandler
400
+
401
+ handler = PacketHandler()
402
+ bot = FFTelegramBot(token="YOUR_BOT_TOKEN", packet_handler=handler)
403
+ bot.run()
404
+ ```
405
+
406
+ 4. **Run bot:**
407
+ ```bash
408
+ python bot_script.py
409
+ ```
410
+
411
+ 5. **Use in Telegram:**
412
+ - Send `/start` to bot
413
+ - Send `/decrypt` and paste packet hex
414
+ - Bot will decrypt and analyze
415
+
416
+ ---
417
+
418
+ ## CLI Usage
419
+
420
+ ```bash
421
+ # Interactive mode
422
+ hardixx-cli
423
+
424
+ # Decrypt packet
425
+ hardixx-cli -d "a1b2c3d4e5f6..."
426
+
427
+ # Analyze packet
428
+ hardixx-cli -a "a1b2c3d4e5f6..."
429
+
430
+ # Show help
431
+ hardixx-cli --help
432
+ ```
433
+
434
+ **Interactive Commands:**
435
+ - decrypt - Decrypt a packet
436
+ - analyze - Full analysis
437
+ - batch - Process multiple packets
438
+ - status - Show status
439
+ - log - Show processing log
440
+ - clear - Clear log
441
+ - help - Show help
442
+ - exit - Exit program
443
+
444
+ ---
445
+
446
+ ## Troubleshooting
447
+
448
+ ### "Invalid HEX" Error
449
+ - Make sure packet is valid hex string
450
+ - Remove any spaces or special characters
451
+ - Hex should only contain 0-9, a-f
452
+
453
+ ### "Decryption failed" Error
454
+ - Packet may be corrupted
455
+ - Check if packet is actually encrypted with FF keys
456
+ - Verify hex format
457
+
458
+ ### "Protobuf decoding error"
459
+ - Decrypted data may not be valid protobuf
460
+ - Try using `decrypt_only()` to check decryption
461
+ - Check packet format
462
+
463
+ ### Telegram Bot Not Responding
464
+ - Verify bot token is correct
465
+ - Check internet connection
466
+ - Ensure python-telegram-bot is installed
467
+ - Check bot logs for errors
468
+
469
+ ---
470
+
471
+ ## Contributing
472
+
473
+ Contributions are welcome! Please:
474
+
475
+ 1. Fork the repository
476
+ 2. Create a feature branch
477
+ 3. Make your changes
478
+ 4. Submit a pull request
479
+
480
+ ---
481
+
482
+ ## License
483
+
484
+ MIT License - See LICENSE file for details
485
+
486
+ ---
487
+
488
+ ## Credits
489
+
490
+ - **H4RDIXX** - Original developer
491
+ - **Free Fire** - Game and protocol reference
492
+ - **Google Protobuf** - Serialization format
493
+ - **PyCryptodome** - Cryptography library
494
+
495
+ ---
496
+
497
+ ## Disclaimer
498
+
499
+ This library is for educational and authorized testing purposes only. Users are responsible for complying with applicable laws and the Free Fire Terms of Service. The author is not responsible for misuse of this library.
500
+
501
+ ---
502
+
503
+ ## Support
504
+
505
+ For issues, questions, or suggestions:
506
+ - GitHub Issues: https://github.com/hardixx/hardixx-code/issues
507
+ - Telegram: @lilililililililillliillllililill
508
+
509
+ ---
510
+
511
+ Made with care by H4RDIXX