mirror of
https://github.com/cloudflare/redoctober.git
synced 2026-01-04 20:24:23 +00:00
ro owner command should be robust with base64 encoded RedOctober encryption.
- We would avoid sending double base64 encoded request to server, triggering cryptic error message
This commit is contained in:
@@ -343,6 +343,12 @@ func runOwner() {
|
||||
inBytes, err := ioutil.ReadFile(inPath)
|
||||
processError(err)
|
||||
|
||||
// attempt to base64 decode the input file
|
||||
base64decoded, err := base64.StdEncoding.DecodeString(string(inBytes))
|
||||
if err == nil {
|
||||
inBytes = base64decoded
|
||||
}
|
||||
|
||||
req := core.OwnersRequest{
|
||||
Data: inBytes,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user