diff --git a/forms/rulerforms.go b/forms/rulerforms.go index b3b9674..d2580b2 100644 --- a/forms/rulerforms.go +++ b/forms/rulerforms.go @@ -237,7 +237,7 @@ func DeleteForm(suffix string, folderid []byte) ([]byte, error) { ruleid := v.RuleID err = mapi.ExecuteMailRuleDelete(ruleid) if err != nil { - utils.Error.Printf("Failed to delete rule") + utils.Error.Println("Failed to delete rule") return nil, err } utils.Info.Println("Rule deleted successfully") diff --git a/mapi/datastructs.go b/mapi/datastructs.go index 825f4d7..1f4f767 100644 --- a/mapi/datastructs.go +++ b/mapi/datastructs.go @@ -73,7 +73,7 @@ type ExecuteResponse struct { AuxilliaryBuf []byte } -//ConnectResponse strcut +//ConnectResponse struct type ConnectResponse struct { StatusCode uint32 //if 0x00000 --> failure and we only have AuzilliaryBufferSize and AuxilliaryBuffer ErrorCode uint32 @@ -826,7 +826,7 @@ type RopReadStreamRequest struct { MaximumByteCount uint32 } -//RopRestrictRequest strcut +//RopRestrictRequest struct type RopRestrictRequest struct { RopID uint8 //0x14 LogonID uint8 @@ -836,7 +836,7 @@ type RopRestrictRequest struct { RestrictionData []byte } -//RopRestrictResponse strcut +//RopRestrictResponse struct type RopRestrictResponse struct { RopID uint8 //0x14 InputHandleIndex uint8 @@ -929,7 +929,7 @@ type RopModifyRulesResponse struct { ReturnValue uint32 } -//RopGetRulesTableResponse strcut +//RopGetRulesTableResponse struct type RopGetRulesTableResponse struct { RopID uint8 OutputHandleIndex uint8 diff --git a/mapi/mapi.go b/mapi/mapi.go index 866470f..6425753 100644 --- a/mapi/mapi.go +++ b/mapi/mapi.go @@ -342,7 +342,7 @@ func readResponse(headers http.Header, body []byte) ([]byte, error) { return body[start+4:], nil } -//Authenticate is used to create the MAPI session, get's session cookie ect +//Authenticate is used to create the MAPI session, get's session cookie etc func Authenticate() (*RopLogonResponse, error) { if AuthSession.Transport == RPC { return AuthenticateRPC() @@ -386,7 +386,7 @@ func AuthenticateRPC() (*RopLogonResponse, error) { return nil, &TransportError{fmt.Errorf("An error occurred setting up RPC. %s", err)} } - utils.Trace.Println("User DN: ", string(connRequest.UserDN)) + utils.Trace.Printf("User DN: %s", string(connRequest.UserDN)) utils.Trace.Println("Got Context, Doing ROPLogin") AuthSession.UserDN = append([]byte(AuthSession.LID), []byte{0x00}...) @@ -419,7 +419,7 @@ func AuthenticateHTTP() (*RopLogonResponse, error) { connResponse.Unmarshal(responseBody) if connResponse.StatusCode == 0 { - utils.Trace.Println("User DN: ", string(connRequest.UserDN)) + utils.Trace.Printf("User DN: %s", string(connRequest.UserDN)) utils.Trace.Println("Got Context, Doing ROPLogin") AuthSession.UserDN = connRequest.UserDN @@ -2038,7 +2038,7 @@ func FastTransferFetchStep(handles []byte) ([]byte, error) { pprops := RopFastTransferSourceGetBufferResponse{} rops := []RopResponse{&pprops} bufPtr, e := UnmarshalRops(execResponse.RopBuffer.Body, rops) - utils.Trace.Printf("Large transfer in progress. Status: %d ", pprops.TransferStatus) + utils.Trace.Printf("Large transfer in progress. Status: %d", pprops.TransferStatus) if pprops.TransferStatus == 0x0001 { buff, err := FastTransferFetchStep(execResponse.RopBuffer.Body[bufPtr:]) diff --git a/rpc-http/packets.go b/rpc-http/packets.go index 400066c..62a8549 100644 --- a/rpc-http/packets.go +++ b/rpc-http/packets.go @@ -480,8 +480,6 @@ func (response *RPCResponse) Unmarshal(raw []byte) (int, error) { return pos, nil } response.SecTrailer, pos = utils.ReadBytes(pos, int(response.Header.AuthLen), raw) - } else { - } } return pos, nil diff --git a/ruler.go b/ruler.go index 992551c..f038313 100644 --- a/ruler.go +++ b/ruler.go @@ -228,7 +228,7 @@ func deleteRule(c *cli.Context) error { ruleid = v.RuleID err = mapi.ExecuteMailRuleDelete(ruleid) if err != nil { - utils.Error.Printf("Failed to delete rule") + utils.Error.Println("Failed to delete rule") } } } @@ -243,7 +243,7 @@ func deleteRule(c *cli.Context) error { } err = mapi.ExecuteMailRuleDelete(ruleid) if err != nil { - utils.Error.Printf("Failed to delete rule") + utils.Error.Println("Failed to delete rule") } } diff --git a/utils/datatypes.go b/utils/datatypes.go index 7da41cf..ca94de9 100644 --- a/utils/datatypes.go +++ b/utils/datatypes.go @@ -21,7 +21,7 @@ type Config struct { UserAgent string } -//Session stores authentication cookies ect +//Session stores authentication cookies etc type Session struct { User string Pass string