mirror of
https://github.com/phishingclub/phishingclub.git
synced 2026-07-16 00:37:26 +02:00
07c8adaf76
Signed-off-by: Ronni Skansing <rskansing@gmail.com>
22 lines
630 B
Go
22 lines
630 B
Go
package socks5
|
|
|
|
// AuthenticationFunc Authentication interface is implemented
|
|
type AuthenticationFunc func(cmd Command, username, password string) bool
|
|
|
|
// Auth authentication processing
|
|
func (f AuthenticationFunc) Auth(cmd Command, username, password string) bool {
|
|
return f(cmd, username, password)
|
|
}
|
|
|
|
// Authentication proxy authentication
|
|
type Authentication interface {
|
|
Auth(cmd Command, username, password string) bool
|
|
}
|
|
|
|
// UserAuth basic authentication
|
|
func UserAuth(username, password string) Authentication {
|
|
return AuthenticationFunc(func(c Command, u, p string) bool {
|
|
return username == u && password == p
|
|
})
|
|
}
|