这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- New
- Added a CLI flag to disable the interactive mode
- Changed
- Do not read the last newline in the end of the raw request file when using -request
- Fixed an issue with storing the matches for recursion jobs
- Fixed the way the "size" is calculated, it should match content-length now
- Fixed an issue with header canonicalization when a keyword was just a part of the header name
Expand Down
6 changes: 6 additions & 0 deletions pkg/ffuf/optionsparser.go
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,12 @@ func parseRawRequest(parseOpts *ConfigOptions, conf *Config) error {
}
conf.Data = string(b)

// Remove newline (typically added by the editor) at the end of the file
if strings.HasSuffix(conf.Data, "\r\n") {
conf.Data = conf.Data[:len(conf.Data)-2]
} else if strings.HasSuffix(conf.Data, "\n") {
conf.Data = conf.Data[:len(conf.Data)-1]
}
return nil
}

Expand Down