FreeFire TCP Bot for chat + squad + actions over TCP socket.
.
├── main.py # Bot main: auth, chat handler, squad logic, 0500 packet handler
├── api.md # Like API documentation
└── teexez/
├── ReQAPI.py # Garena auth, protobuf parser/encoder, AES-CBC128
└── GPackGEN.py # Game packet builder (chat, squad, emote, animation)
- Auth: Read
bot.txt→ Garena guest token → MajorLogin → GetLoginData - Connect: TCP socket to Chat (39801) + Online (39699) servers
- Chat: Receive 1200 packets → parse commands (
/help,/like,/5,/6,/js,/cut,/all,/share) - Squad: Send/receive 0500 packets via Online socket → auto-accept invites, collect UIDs, join channels
- Reconnect: Auto-reconnect on disconnect (chat 5s, online 3s), re-auth every 30s
protobuf-decoder— protobuf parsingpycryptodome— AES-CBC128 encryptionrequests— HTTP API calls
main.py: Complete bot implementation with all chat and squad functionalityapi.md: Like API documentationteexez/ReQAPI.py: Garena authentication and packet encoding/decodingteexez/GPackGEN.py: Game packet builder for chat commands, squad actions, and animations
This is a daemon bot that requires:
- A
bot.txtconfiguration file with UID/token - Network connectivity to FreeFire servers
- TCP access to ports 39801 (chat) and 39699 (online)
The bot runs continuously with auto-reconnect and periodic re-authentication.
_process_0500_packet— auto-accept invite + collect UIDs + join channelsjoin_channel(uid, code, None)on chat socket for squad members- Invite: code from parsed["5"]["8"]
- Player join: code from parsed["5"]["17"]