shiro

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: MIT Imports: 16 Imported by: 3

README

shiro

Usage of the afrog calling library.

Examples

Single Target

package main

import (
	"fmt"
	"time"

	"github.com/zan8in/shiro"
)

func main() {
	s, err := shiro.NewShiro()
	if err != nil {
		panic(err)
	}

	result, err := s.Run(shiro.Options{
		Target:            "http://x.x.x.x:8090",
		RateLimitKey:      time.Duration(60),
		ConcurrencyKey:    25,
	})
	if err != nil {
		panic(err)
	}

	if result == nil {
		fmt.Println("result is nil")
		return
	}

	fmt.Printf("target: %s\n", result.Target)
	fmt.Printf("shiroKey: %s\n", result.ShiroKey)
	fmt.Printf("rememberMe: %s\n", result.RememberMe)

}

Multi Target

package main

import (
	"fmt"
	"time"

	"github.com/zan8in/shiro"
)

func main() {
	s, err := shiro.NewShiro()
	if err != nil {
		panic(err)
	}

	result, err := s.RunMulti(shiro.Options{
		TargetFile:        "./1.txt",
		ShiroKeysFile:     "./keys.txt",
		RateLimitKey:      time.Duration(60),
		RateLimitTarget:   time.Duration(5),
		ConcurrencyKey:    25,
		ConcurrencyTarget: 2,
	})
	if err != nil {
		panic(err)
	}

	for v := range result {
		fmt.Printf("target: %s\n", v.Target)
		fmt.Printf("shiroKey: %s\n", v.ShiroKey)
		fmt.Printf("rememberMe: %s\n", v.RememberMe)
		fmt.Println("-----------------------")
	}

}

Forked and adapted from

https://github.com/Peony2022/shiro_killer

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ShiroKeys = []string{
		"2AvVhdsgUs0FSA3SDFAdag==", "kPH+bIxk5D2deZiIxcaaaA==", "3AvVhmFLUs0KTA3Kprsdag==", "4AvVhmFLUs0KTA3Kprsdag==",
		"5aaC5qKm5oqA5pyvAAAAAA==", "6ZmI6I2j5Y+R5aSn5ZOlAA==", "bWljcm9zAAAAAAAAAAAAAA==", "wGiHplamyXlVB11UXWol8g==",
		"Z3VucwAAAAAAAAAAAAAAAA==", "MTIzNDU2Nzg5MGFiY2RlZg==", "zSyK5Kp6PZAAjlT+eeNMlg==", "U3ByaW5nQmxhZGUAAAAAAA==",
		"5AvVhmFLUs0KTA3Kprsdag==", "bXdrXl9eNjY2KjA3Z2otPQ==", "fCq+/xW488hMTCD+cmJ3aQ==", "1QWLxg+NYmxraMoxAXu/Iw==",
		"ZUdsaGJuSmxibVI2ZHc9PQ==", "L7RioUULEFhRyxM7a2R/Yg==", "r0e3c16IdVkouZgk1TKVMg==", "bWluZS1hc3NldC1rZXk6QQ=="}
	CheckContent = "" /* 152-byte string literal not displayed */
	UserAgent    = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.112 Safari/537.36"
	ShiroMethod  = "GET"
	PostContent  = ""
)

Functions

func AesCbcEncrypt

func AesCbcEncrypt(key []byte, Content []byte) (string, error)

func AesGcmEncrypt

func AesGcmEncrypt(key []byte, Content []byte) (string, error)

func Padding

func Padding(plainText []byte, blockSize int) []byte

Types

type Options

type Options struct {
	Target     string
	TargetFile string

	ShiroKeysFile string

	Proxy   string
	Timeout int
	Retries int

	RateLimitKey      int
	RateLimitTarget   int
	ConcurrencyKey    int
	ConcurrencyTarget int
}

type Result

type Result struct {
	Flag       bool
	Target     string
	ShiroKey   string
	RememberMe string
}

type Shiro

type Shiro struct {
	// contains filtered or unexported fields
}

func NewShiro

func NewShiro() (*Shiro, error)

func (*Shiro) FindTheKey

func (s *Shiro) FindTheKey(ctx context.Context, ShiroKey string, Content []byte, TargetUrl string) (bool, string, string)

return three result 1. result boolean 2. shirokey 3. rememberMe

func (*Shiro) HttpRequest

func (s *Shiro) HttpRequest(RememberMe string, TargetUrl string) (bool, error)

func (*Shiro) KeyCheck

func (s *Shiro) KeyCheck(TargetUrl string) (bool, string, string)

func (*Shiro) Run

func (s *Shiro) Run(options Options) (*Result, error)

func (*Shiro) RunMulti

func (s *Shiro) RunMulti(options Options) (chan *Result, error)

func (*Shiro) ShiroCheck

func (s *Shiro) ShiroCheck(TargetUrl string) bool

Directories

Path Synopsis
examples
pkg
req

Jump to

Keyboard shortcuts

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