mirror of
https://github.com/BishopFox/jsluice.git
synced 2026-11-10 17:08:26 -10:00
26 lines
404 B
Go
26 lines
404 B
Go
package main
|
|
|
|
import (
|
|
"encoding/json"
|
|
"fmt"
|
|
|
|
"github.com/BishopFox/jsluice"
|
|
)
|
|
|
|
func main() {
|
|
analyzer := jsluice.NewAnalyzer([]byte(`
|
|
const login = (redirect) => {
|
|
document.location = "/login?redirect=" + redirect + "&method=oauth"
|
|
}
|
|
`))
|
|
|
|
for _, url := range analyzer.GetURLs() {
|
|
j, err := json.MarshalIndent(url, "", " ")
|
|
if err != nil {
|
|
continue
|
|
}
|
|
|
|
fmt.Printf("%s\n", j)
|
|
}
|
|
}
|