File: urldecode.go

package info (click to toggle)
golang-github-ffuf-pencode 0.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 224 kB
  • sloc: makefile: 2; sh: 1
file content (23 lines) | stat: -rw-r--r-- 369 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package pencode

import (
	"net/url"
)

type URLDecoder struct{}

func (u URLDecoder) Encode(input []byte) ([]byte, error) {
	output, err := url.QueryUnescape(string(input))
	if err != nil {
		return []byte{}, err
	}
	return []byte(output), err
}

func (u URLDecoder) HelpText() string {
	return "URL decode"
}

func (u URLDecoder) Type() string {
	return "decoders"
}