gophish / gophish

Open-Source Phishing Toolkit
https://getgophish.com
Other
11.22k stars 2.17k forks source link

URL Shortner #718

Closed anantshri closed 7 years ago

anantshri commented 7 years ago

Any chance we can include URL shortning services in the mix.

something like github.com/zpnk/go-bitly would be as simple as

func main() {
b := bitly.New("TOKEN")
shortURL, err := b.Links.Shorten("https://golang.org/")
fmt.Printf("%v", shortURL.URL)
if err != nil { } 
}
jordan-wright commented 7 years ago

Thanks for the suggestion!

I can see why people might want to use this, but I really don't like the idea of integrating with services that require additional setup- especially for features not too many people would likely use. One of the greatest things about Gophish is how quick it is to setup, and this introduces another barrier to that.

This leads to more support cases (e.g. "How do I setup bit.ly integration?" and "Trouble with bit.ly integration") where people will inevitably forget to setup and register for the bit.ly api.

This would also be tricky for the UX. This would probably go in some kind of "Advanced Settings" field when building the campaign, but we don't have a section for this in the campaign modal right now. We'd also have to figure out how to store the bit.ly api token. IMO, this isn't important enough to warrant a config.json change so we'd have to figure out somewhere else.

I'm afraid all that said, I'm not convinced it'd be worth the hassle to introduce this into Gophish so I won't be adding this anytime soon. If the community strongly rallies around wanting this and helps give ideas for implementation, I'd be more than happy to reconsider.

In the meantime, if you want to add this yourself, you should be able to add a similar block above right around here since this is where we create the URL used in emails.

Thanks for the suggestion! Keep them coming. 😄

Genesiss2 commented 8 months ago

Any chance we can include URL shortning services in the mix.

something like github.com/zpnk/go-bitly would be as simple as

func main() {
b := bitly.New("TOKEN")
shortURL, err := b.Links.Shorten("https://golang.org/")
fmt.Printf("%v", shortURL.URL)
if err != nil { } 
}

@anantshri Hi. Have you managed to do this, could you please tell me how you did it?