mirror of
https://github.com/projectdiscovery/httpx.git
synced 2024-11-28 22:01:28 +03:00
21 lines
465 B
Go
21 lines
465 B
Go
package customlist
|
|
|
|
import "github.com/projectdiscovery/httpx/common/fileutil"
|
|
|
|
const maxRecursion = 10
|
|
|
|
// CustomList for fastdialer
|
|
type CustomList []string
|
|
|
|
// String returns just a label
|
|
func (c *CustomList) String() string {
|
|
return "Custom Global List"
|
|
}
|
|
|
|
// Set a new global header
|
|
func (c *CustomList) Set(value string) error {
|
|
values := fileutil.LoadCidrsFromSliceOrFileWithMaxRecursion(value, ",", maxRecursion)
|
|
*c = append(*c, values...)
|
|
return nil
|
|
}
|