utils

package
v0.0.0-...-7a1a4d6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AliveTask []models.TScanTasks

Functions

func CheckAlive

func CheckAlive(tasks []models.TScanTasks) []models.TScanTasks

func GenerateTask

func GenerateTask(tasks []models.TScanTasks, usernames []string, passwords []string) (targets []models.TargetsModel, targetNum int)

生成扫描任务,用 tasks、用户名、密码 初始化一个 models.TargetsModel 结构

func ReadPasswordDict

func ReadPasswordDict(passwordDict string) (passwords []string, err error)

传入密码字典的名字,返回装着所有用户的切片

func ReadTargetsList

func ReadTargetsList(fileName string) (tasks []models.TScanTasks)

将 targets_list.txt 中的目标加入任务组

func ReadUsernameDict

func ReadUsernameDict(usernameDict string) (usernames []string, err error)

传入用户名字典的名字,返回装着所有用户的切片

func RunTask

func RunTask(tasks []models.TargetsModel)

开始扫描任务

func SafeTask

func SafeTask(alive bool, task models.TScanTasks)

设置并发安全的互斥锁,保证同一时间只有一个 goroutine 可以访问共享资源

func Scan

func Scan(ctx *cli.Context) (err error)

util.Scan 是 Scan 对象的 Action,对命令行传入的参数进行处理 如果传入了具体的参数就把 config 包中定义的默认值替换掉

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL