mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-08-09 20:39:14 +00:00
Fix some issues
This commit is contained in:
parent
ad5fd161ec
commit
f40228bcc4
@ -75,6 +75,8 @@ func main() {
|
||||
rlog.Infof("Filtering for the following authorities: %v", tap.GetFilterIPs())
|
||||
}
|
||||
|
||||
time.Sleep(2 * time.Second)
|
||||
|
||||
// harOutputChannel, outboundLinkOutputChannel := tap.StartPassiveTapper(tapOpts)
|
||||
filteredOutputItemsChannel := make(chan *tapApi.OutputChannelItem)
|
||||
tap.StartPassiveTapper(tapOpts, filteredOutputItemsChannel, extensions)
|
||||
|
@ -41,11 +41,7 @@ func init() {
|
||||
|
||||
func WebSocketRoutes(app *gin.Engine, eventHandlers EventHandlers) {
|
||||
app.GET("/ws", func(c *gin.Context) {
|
||||
queryMap := c.Request.URL.Query()
|
||||
query := ""
|
||||
if val, ok := queryMap["q"]; ok {
|
||||
query = val[0]
|
||||
}
|
||||
query := c.DefaultQuery("q", "")
|
||||
websocketHandlerUI(c.Writer, c.Request, eventHandlers, false, query)
|
||||
})
|
||||
app.GET("/wsTapper", func(c *gin.Context) {
|
||||
|
@ -139,6 +139,10 @@ func GetEntry(c *gin.Context) {
|
||||
id, _ := strconv.Atoi(c.Param("entryId"))
|
||||
fmt.Printf("GetEntry id: %v\n", id)
|
||||
entry := api.Single(uint(id))
|
||||
var response map[string]interface{}
|
||||
if entry["response"] != nil {
|
||||
response = entry["response"].(map[string]interface{})
|
||||
}
|
||||
entryData := tapApi.MizuEntry{
|
||||
Protocol: tapApi.Protocol{
|
||||
Name: entry["proto"].(map[string]interface{})["name"].(string),
|
||||
@ -152,7 +156,7 @@ func GetEntry(c *gin.Context) {
|
||||
Priority: uint8(entry["proto"].(map[string]interface{})["priority"].(float64)),
|
||||
},
|
||||
Request: entry["request"].(map[string]interface{}),
|
||||
Response: entry["response"].(map[string]interface{}),
|
||||
Response: response,
|
||||
EntryId: entry["entryId"].(string),
|
||||
Entry: entry["entry"].(string),
|
||||
Url: entry["url"].(string),
|
||||
|
@ -269,7 +269,6 @@ func (d dissecting) Analyze(item *api.OutputChannelItem, entryId string, resolve
|
||||
return &api.MizuEntry{
|
||||
Protocol: protocol,
|
||||
Request: reqDetails,
|
||||
Response: item.Pair.Response.Payload.(map[string]interface{})["details"].(map[string]interface{}),
|
||||
EntryId: entryId,
|
||||
Entry: string(entryBytes),
|
||||
Url: fmt.Sprintf("%s%s", service, summary),
|
||||
|
Loading…
Reference in New Issue
Block a user