mirror of
https://github.com/Li4n0/revsuit.git
synced 2026-09-26 16:41:53 +08:00
feat: complete basic functions
Support http,dns and mysql connection. Support custom http, dns response. Support dns rebinding. Support mysql load local files and jdbc deserialize exploit.
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
package record
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
var recordChan = make(chan BaseRecord, 100)
|
||||
|
||||
type Record interface {
|
||||
GetFlag() string
|
||||
PushToClient()
|
||||
Notice()
|
||||
}
|
||||
|
||||
type BaseRecord struct {
|
||||
Record `gorm:"-" json:"-"`
|
||||
ID uint `gorm:"primarykey" form:"id" json:"id" notice:"-"`
|
||||
RuleName string `gorm:"index" form:"rule_name" json:"rule_name" notice:"rule"`
|
||||
Flag string `gorm:"index" form:"flag" json:"flag" `
|
||||
RemoteIP string `gorm:"index" form:"remote_ip" json:"remote_ip" notice:"remote_ip"`
|
||||
IpArea string `form:"ip_area" json:"ip_area" notice:"ip_area"`
|
||||
RequestTime time.Time `gorm:"index" form:"request_time" json:"request_time" notice:"-"`
|
||||
}
|
||||
|
||||
func (b BaseRecord) GetFlag() string {
|
||||
return b.Flag
|
||||
}
|
||||
|
||||
func (b BaseRecord) PushToClient() {
|
||||
recordChan <- b
|
||||
}
|
||||
|
||||
func (b BaseRecord) Notice() {
|
||||
}
|
||||
|
||||
func Channel() chan BaseRecord {
|
||||
return recordChan
|
||||
}
|
||||
Reference in New Issue
Block a user