vulncheck-oss / go-exploit

A Go-based Exploit Framework
https://pkg.go.dev/github.com/vulncheck-oss/go-exploit
Apache License 2.0
304 stars 29 forks source link

Add simple regex capture group wrapper #214

Open terrorbyte opened 3 months ago

terrorbyte commented 3 months ago

There's a couple of really simple functions that we have used to a pretty extreme degree that might save a decent amount of time to just wrap in a simple function just to increase ergonomics. One of the very first ones is just a simple regex capture group single match such as:

matches := regexp.MustCompile(`'settings':'([0-9a-zA-Z+/=]+)','dialogTriggerIDList'`).FindStringSubmatch(body)
if len(matches) != 2 {
        return "", false
}

return matches[1], true

Might be worth just dropping this into a single function.

mahadzaryab1 commented 3 months ago

@terrorbyte are you looking for someone to work on this? I'm looking to start contributing to open source projects and would like to work on this if it's up for grabs!

terrorbyte commented 3 months ago

@mahadzaryab1 absolutely! We always welcome any contribution and this would be a great one to start getting familiar with go-exploit. :)