mirror of
https://github.com/Li4n0/revsuit.git
synced 2026-09-27 00:51:55 +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,27 @@
|
||||
package database
|
||||
|
||||
import (
|
||||
"database/sql/driver"
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type MapField map[string]string
|
||||
|
||||
func (f MapField) Value() (driver.Value, error) {
|
||||
return json.Marshal(f)
|
||||
}
|
||||
|
||||
func (f *MapField) Scan(data interface{}) error {
|
||||
return json.Unmarshal(data.([]byte), f)
|
||||
}
|
||||
|
||||
|
||||
type ListField []string
|
||||
|
||||
func (f ListField) Value() (driver.Value, error) {
|
||||
return json.Marshal(f)
|
||||
}
|
||||
|
||||
func (f *ListField) Scan(data interface{}) error {
|
||||
return json.Unmarshal(data.([]byte), f)
|
||||
}
|
||||
Reference in New Issue
Block a user