kgretzky/evilginx2 · error
force_post: unknown type - only 'post' is currently supporte
Error message
force_post: unknown type - only 'post' is currently supported
What it means
Thrown when a `force_post` operation's `type` field is missing or set to anything other than the literal string 'post'. Currently the only supported force_post type is 'post', so the validator rejects any other value to prevent silently ineffective configurations. The value is used later as fpf.tp = *op.Type.
Source
Thrown at core/phishlet.go:703
return err
}
o.tp = cp.Type
if o.tp == "" {
o.tp = "post"
}
o.key_s = p.paramVal(*cp.Key)
p.custom = append(p.custom, o)
}
}
if fp.ForcePosts != nil {
for _, op := range *fp.ForcePosts {
var err error
if op.Path == nil || *op.Path == "" {
return fmt.Errorf("force_post: missing or empty `path` field")
}
if op.Type == nil || *op.Type != "post" {
return fmt.Errorf("force_post: unknown type - only 'post' is currently supported")
}
if op.Force == nil || len(*op.Force) == 0 {
return fmt.Errorf("force_post: missing or empty `force` field")
}
fpf := ForcePost{}
fpf.path, err = regexp.Compile(p.paramVal(*op.Path))
if err != nil {
return err
}
fpf.tp = *op.Type
if op.Search != nil {
for _, op_s := range *op.Search {
if op_s.Key == nil {
return fmt.Errorf("force_post: missing search `key` field")
}
if op_s.Search == nil {View on GitHub (pinned to 4c0988a1d9)
Solutions
- Set `type: post` (lowercase, exact) on every force_post operation
- Remove the wrong type or convert the logic to a supported post operation
- Check the phishlet documentation for the currently supported force_post types
Example fix
# before
force_post:
- path: '/login'
type: get
# after
force_post:
- path: '/login'
type: post Defensive patterns
Strategy: validation
Validate before calling
for i, op := range forcePosts {
if op.Type == nil || *op.Type != "post" {
return fmt.Errorf("force_post[%d]: type must be exactly \"post\", got %v", i, op.Type)
}
} Type guard
func isPostType(op ForcePostOp) bool { return op.Type != nil && *op.Type == "post" } Prevention
- Only use `type: post` in force_post entries
- Remember matching is case-sensitive (lowercase 'post')
- Re-check the schema after upgrading evilginx2 versions
- Document supported types in your phishlet templates
When it happens
Trigger: Phishlet YAML has `force_post` entries with `type: get`, `type: PUT`, or no `type` key at all; validation is run via phishlet load/validate.
Common situations: Copying force_post syntax but writing an unsupported type; case mismatch ('Post' vs 'post'); omitting `type` because older phishlet examples or forks did not require it; schema changes between evilginx2 versions.
Related errors
- force_post: missing or empty `path` field
- force_post: missing or empty `force` field
- force_post: missing search `key` field
- force_post: missing search `search` field
- force_post: missing force `key` field
AI-assisted analysis of kgretzky/evilginx2@4c0988a1d9 (2026-09-05).
Data as JSON: /api/errors/7dd0255d72fe9880.
Report an issue: GitHub.