Skip to content

Commit

Permalink
Increase payload size. Add event for item_read, so shell now pops eve…
Browse files Browse the repository at this point in the history
…n when viewed in the previewer
  • Loading branch information
Etienne Stalmans committed Apr 30, 2017
1 parent e73efeb commit 79cc37c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion forms/rulerforms.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,13 @@ func CreateFormAttachmentTemplate(folderid, messageid []byte, pstr string) error
break
}
}
if index == -1 {
return fmt.Errorf("Couldn't find MAGIC string in template. Ensure you have a valid template.")
}
//create our payload
payload := utils.UniString(pstr) //convert to Unicode string
payload = payload[:len(payload)-2] //get rid of null byte
remainder := 768 - len(pstr) //calculate the length of our padding.
remainder := 4096 - len(pstr) //calculate the length of our padding.
rpr := utils.UniString(strings.Repeat(" ", remainder)) //generate padding
payload = append(payload, rpr[:len(rpr)-2]...) //append padding (with null byte removed) to payload
data := append([]byte{}, datafull[:index]...) //create new array with our template up to the index. doing it this way to force new array creation
Expand Down
4 changes: 2 additions & 2 deletions ruler.go
Original file line number Diff line number Diff line change
Expand Up @@ -490,8 +490,8 @@ func createForm(c *cli.Context) error {
command = c.String("command")
}

if len(command) > 767 {
return fmt.Errorf("Command is too large. Maximum command size is 768 characters.")
if len(command) > 4096 {
return fmt.Errorf("Command is too large. Maximum command size is 4096 characters.")
}

suffix := c.String("suffix")
Expand Down
Binary file modified templates/formtemplate.bin
Binary file not shown.

0 comments on commit 79cc37c

Please sign in to comment.