Skip to content

Commit

Permalink
bump neutron and parsers. fix #52
Browse files Browse the repository at this point in the history
  • Loading branch information
M09Ic committed Dec 21, 2023
1 parent 7531b4b commit 48567bd
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
6 changes: 3 additions & 3 deletions v2/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ go 1.10

require (
github.com/M09ic/go-ntlmssp v0.0.0-20230312133735-dcccd454dfe0
github.com/chainreactors/files v0.0.0-20230731174853-acee21c8c45a
github.com/chainreactors/files v0.0.0-20231123083421-cea5b4ad18a8
github.com/chainreactors/logs v0.0.0-20231027080134-7a11bb413460
github.com/chainreactors/neutron v0.0.0-20231218073152-a834dc247a4b
github.com/chainreactors/parsers v0.0.0-20231218072716-fb441aff745f
github.com/chainreactors/neutron v0.0.0-20231221064706-fd6aaac9c50b
github.com/chainreactors/parsers v0.0.0-20231220104848-3a0b5a5bd8dc
github.com/chainreactors/utils v0.0.0-20231031063336-9477f1b23886
github.com/jessevdk/go-flags v1.5.0
github.com/panjf2000/ants/v2 v2.5.0
Expand Down
6 changes: 6 additions & 0 deletions v2/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ github.com/M09ic/go-ntlmssp v0.0.0-20230312133735-dcccd454dfe0 h1:9Y+BdzDIHfpKy0
github.com/M09ic/go-ntlmssp v0.0.0-20230312133735-dcccd454dfe0/go.mod h1:yMNEF6ulbFipt3CakMhcmcNVACshPRG4Ap4l00V+mMs=
github.com/chainreactors/files v0.0.0-20230731174853-acee21c8c45a h1:NdYhUYzzqyfp15Qj1ONAPV+fcymCQ/XJ509Ia2iyzvk=
github.com/chainreactors/files v0.0.0-20230731174853-acee21c8c45a/go.mod h1:/Xa9YXhjBlaC33JTD6ZTJFig6pcplak2IDcovf42/6A=
github.com/chainreactors/files v0.0.0-20231123083421-cea5b4ad18a8 h1:8Plpi6haQbU8NzH+JtU6bkGDWF/OeC+GFj8DIDuY5yk=
github.com/chainreactors/files v0.0.0-20231123083421-cea5b4ad18a8/go.mod h1:/Xa9YXhjBlaC33JTD6ZTJFig6pcplak2IDcovf42/6A=
github.com/chainreactors/logs v0.0.0-20231027075331-6c5f5ec35435/go.mod h1:VZFqkFDGmp7/JOMeraW+YI7kTGcgz9fgc/HArVFnrGQ=
github.com/chainreactors/logs v0.0.0-20231027080134-7a11bb413460 h1:QYmvaEZHa0e3aQ9Aui9gkm3klPO+yHo5SoPTkoltr78=
github.com/chainreactors/logs v0.0.0-20231027080134-7a11bb413460/go.mod h1:VZFqkFDGmp7/JOMeraW+YI7kTGcgz9fgc/HArVFnrGQ=
Expand All @@ -11,10 +13,14 @@ github.com/chainreactors/neutron v0.0.0-20231212173609-fe673ddd94df h1:3F5TTxSP3
github.com/chainreactors/neutron v0.0.0-20231212173609-fe673ddd94df/go.mod h1:Dgz6zHfyicB4+qhf8rYxNF+XTYtv/iimogujCt5SYbQ=
github.com/chainreactors/neutron v0.0.0-20231218073152-a834dc247a4b h1:Dgq+JteRqEBsRtZP2Brenr6tVg+nk5F31H7YoVwwWWA=
github.com/chainreactors/neutron v0.0.0-20231218073152-a834dc247a4b/go.mod h1:Q6xCl+KaPtCDIziAHegFxdHOvg6DgpA6hcUWRnQKDPk=
github.com/chainreactors/neutron v0.0.0-20231221064706-fd6aaac9c50b h1:45zWsLmxlx5AeuzemVnUDC8Cp5zrgYJjRYZGHfWdHE8=
github.com/chainreactors/neutron v0.0.0-20231221064706-fd6aaac9c50b/go.mod h1:Q6xCl+KaPtCDIziAHegFxdHOvg6DgpA6hcUWRnQKDPk=
github.com/chainreactors/parsers v0.0.0-20231027075644-5d67f3a109d8 h1:7JBKzf7LMEQCRERJLbJjeGhdzODkoKaUsdPs0WYdv+o=
github.com/chainreactors/parsers v0.0.0-20231027075644-5d67f3a109d8/go.mod h1:e7iOa5oTseGGm3fLyJEIFfxAD6R483nT4DLPkLHurjo=
github.com/chainreactors/parsers v0.0.0-20231218072716-fb441aff745f h1:h8+iQKu//i6MsaqNeXO/LSY4ar0CvGFKroW2r9S/MXw=
github.com/chainreactors/parsers v0.0.0-20231218072716-fb441aff745f/go.mod h1:ZHEkgxKf9DXoley2LUjdJkiSw08MC3vcJTxfqwYt2LU=
github.com/chainreactors/parsers v0.0.0-20231220104848-3a0b5a5bd8dc h1:1fFtwafypR8qnoKsVRETM4vFqpgQ/PYCCWWjzwW1+2U=
github.com/chainreactors/parsers v0.0.0-20231220104848-3a0b5a5bd8dc/go.mod h1:V2w16sBSSiBlmsDR4A0Q9PIk9+TP/6coTXv6olvTI6M=
github.com/chainreactors/utils v0.0.0-20230928082055-ef5e1ae47f3e h1:N78CueJGO0wT5IU19LAV+7+g8kXNeghj1lRuWDHya5s=
github.com/chainreactors/utils v0.0.0-20230928082055-ef5e1ae47f3e/go.mod h1:NKSu1V6EC4wa8QHtPfiJHlH9VjGfUQOx5HADK0xry3Y=
github.com/chainreactors/utils v0.0.0-20231031063336-9477f1b23886 h1:lS2T/uE9tg1MNDPrb44wawbNlD24zBlWoG0H+ZdwDAk=
Expand Down
11 changes: 9 additions & 2 deletions v2/internal/core/output.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package core

import (
"encoding/json"
"fmt"
"io"
"net/http"
Expand Down Expand Up @@ -91,7 +92,7 @@ func FormatOutput(filename, outFilename, outf, filenamef string, filters []strin
fmt.Println("Output filename: " + outFilename)
defer fileHandle.Close()
outfunc = func(s string) {
fileHandle.Write(s)
fileHandle.WriteString(s)
}
} else {
outfunc = func(s string) {
Expand Down Expand Up @@ -136,7 +137,13 @@ func FormatOutput(filename, outFilename, outf, filenamef string, filters []strin
case "extract":
outfunc(rd.ToExtracteds())
case "zombie":
outfunc(rd.ToZombie())
zs := rd.ToZombie()
marshal, err := json.Marshal(zs)
if err != nil {
fmt.Println(err.Error())
return
}
outfunc(string(marshal))
default:
outfunc(rd.ToValues(outf))
}
Expand Down
2 changes: 0 additions & 2 deletions v2/pkg/result_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,7 @@ func (rd *ResultsData) ToCobaltStrike() string {
}

func parseResult(content []byte) (parsers.GOGOResults, error) {
// 自动修复未完成任务的json
var err error

var results parsers.GOGOResults
err = json.Unmarshal(content, &results)
if err != nil {
Expand Down

0 comments on commit 48567bd

Please sign in to comment.