mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-26 21:21:53 +08:00
refactor(grdp): 精简RDP库,删除认证检测不需要的代码
- 删除 VNC 协议支持 (protocol/rfb, client/rfb.go) - 删除完整客户端框架 (client/) - 删除 RemoteApp 等插件 (plugin/) - 删除 RLE 图形解压 (core/rle.go) - 删除绘图指令处理 (pdu/orders.go, pdu/gdi.go) - 精简 screen.go,移除截图和完整会话功能 - 移除未使用的 RGB 转换函数 grdp 代码从 13,044 行精简至 7,581 行,削减 42%
This commit is contained in:
@@ -383,8 +383,6 @@ func (c *Client) recvPDU(s []byte) {
|
||||
p := up.Udata
|
||||
if up.UpdateType == FASTPATH_UPDATETYPE_BITMAP {
|
||||
c.Emit("bitmap", p.(*BitmapUpdateDataPDU).Rectangles)
|
||||
} else if up.UpdateType == FASTPATH_UPDATETYPE_ORDERS {
|
||||
c.Emit("orders", p.(*FastPathOrdersPDU).OrderPdus)
|
||||
}
|
||||
}
|
||||
if d.Header.PDUType2 == PDUTYPE2_SAVE_SESSION_INFO {
|
||||
@@ -445,8 +443,6 @@ func (c *Client) RecvFastPath(secFlag byte, s []byte) {
|
||||
c.Emit("bitmap", p.Data.(*FastPathBitmapUpdateDataPDU).Rectangles)
|
||||
} else if updateCode == FASTPATH_UPDATETYPE_COLOR {
|
||||
c.Emit("color", p.Data.(*FastPathColorPdu))
|
||||
} else if updateCode == FASTPATH_UPDATETYPE_ORDERS {
|
||||
c.Emit("orders", p.Data.(*FastPathOrdersPDU).OrderPdus)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user