sherlock-project / sherlock

Hunt down social media accounts by username across social networks
https://sherlockproject.xyz
MIT License
58.05k stars 6.7k forks source link

Adding Strava and StravaClub #413

Closed Thomas-Smyth closed 4 years ago

Thomas-Smyth commented 4 years ago

I have been looking into adding Strava, a social media site for runners, cyclists, rowers, etc., to the site lists, however, the current detection methods seem to be insufficient and therefore if the addition is to be made then a further discussion on how it can be implemented is required.

Strava has vanity URLs that can be used to find users, for example, mine is https://www.strava.com/athletes/thomassmyth3141. However, when a vanity URL is used a 301 redirect is used to redirect to my non-vanity URL, in my case https://www.strava.com/athletes/37350156, which has a 200 status code.

When an invalid vanity URL is used, for example, https://www.strava.com/athletes/thomassmyth3142, a 302 redirect is used to redirect to the Strava home page https://www.strava.com/, which also has a 200 status code.

Note the behaviour differs when you're logged in, so if you're testing this make sure you logout first!

Similar behaviour exists for Strava Clubs.

Using the current detection methods:

I think the best solution would be to implement into the Response URL detection method to allow the data.json file to specify specific status codes to look for in order to deem the page valid or not and hence whether the username exists.

What are other's thoughts on the matter?

pmaxhogan commented 4 years ago

The string By signing up for Strava, you agree to the <a href='/legal/terms'>Terms of Service</a>. seems to work as an error message.

$ curl -s -L https://www.strava.com/athletes/noonewouldeverusethis7 | grep "By signing up for Strava, you agree to the <a href='/legal/terms'>Terms of Service</a>."
By signing up for Strava, you agree to the <a href='/legal/terms'>Terms of Service</a>.
$ curl -s -L https://www.strava.com/athletes/thomassmyth3141 | grep "By signing up for Strava, you agree to the <a href='/legal/terms'>Terms of Service</a>."
roopeshvs commented 4 years ago

@sdushantha Think we should close this. StravaClub seems to be working with Strava usernames only.