https://github.com/whoisdreamer/gagalive-client
The non-official gagalive client implemented golang
https://github.com/whoisdreamer/gagalive-client
Last synced: about 2 months ago
JSON representation
The non-official gagalive client implemented golang
- Host: GitHub
- URL: https://github.com/whoisdreamer/gagalive-client
- Owner: wHoIsDReAmer
- Created: 2024-03-02T00:28:49.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-03-04T05:04:39.000Z (about 1 year ago)
- Last Synced: 2025-02-01T18:22:12.142Z (4 months ago)
- Language: Go
- Homepage:
- Size: 2.93 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Gagalive client
gagalive client is unofficial client implemented golang## Analysis
* 패킷 타입: 웹소켓
* 패킷 암호화 방식: 없음 (NoEncryption)
> ⚠ 보안에 굉장히 취약함
* 서버 주소: ws://rchat.gagalive.kr:8082/**패킷 종류**
- **Send**:
- 세션 등록: `Y[세션]`
- 닉네임 등록: `L[닉네임]|@@@randomchat`
- 메세지 보내기: `#[메세지]`
- 스팸 방지 문자 해결: ``P``- **Receive**:
- 채팅 받기 (낯선 사람에게): `:[고유아이디|고유아이디]`
- 채팅 받기 (시스템 메세지): `G[메세지]`
- 채팅 시작 알림: `C[My Temp ID]|[Opponent Temp ID]`## Usage example
```go
client := gagalive.NewGagaClient()client.SetOnConnected(func() {
client.Send("foo")
})client.SetOnMessage(func(msg string) {
// Solve the captcha
if strings.Contains(msg, "방지 문자: ") {
captcha := strings.Split(msg, "방지 문자: ")[1]
solvedCaptcha := gagalive.NewSolveMacro().Solve(captcha)
client.Send(solvedCaptcha)
return
}
})client.SetOnDisconnected(func() {
fmt.Println("Bye anonymous")
// when it disconnected do reconnect
client.Connect()
})
```