Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirection to mobile domain in the wild #53

Open
ibnesayeed opened this issue Oct 21, 2019 · 10 comments
Open

Redirection to mobile domain in the wild #53

ibnesayeed opened this issue Oct 21, 2019 · 10 comments
Labels
Assignment Extra credit assignments

Comments

@ibnesayeed
Copy link
Collaborator

Find up to three different "in the wild" redirection examples of the type example.com --> m.example.com using any mobile user-agent.

@ibnesayeed ibnesayeed added the Assignment Extra credit assignments label Oct 21, 2019
@ghost
Copy link

ghost commented Oct 21, 2019

IPHONE="Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148"                                       

Youtube:

curl -A "$IPHONE" -L -I https://youtube.com -s| grep location                                                                                                                           
location: https://www.youtube.com/
location: https://m.youtube.com/

Facebook:

curl -A "$IPHONE" -L -I https://facebook.com -s | grep location                                                                                            
location: https://m.facebook.com/

Imgur:

curl -A "$IPHONE" -s -L -I https://imgur.com | grep location                             
location: https://m.imgur.com/

@kritikagarg
Copy link
Contributor

kritikagarg commented Oct 22, 2019

echo $UA
Dalvik/2.1.0 (Linux; U; Android 9; Pixel 3 XL Build/PQ3A.190705.003)


curl -A "$UA" -IL www.soundcloud.com | grep -i location

Location: https://soundcloud.com/
location: https://m.soundcloud.com/


curl -A "$UA" -IL https://www.twitter.com/ | grep -i location

location: https://mobile.twitter.com/


curl -A "$UA" -IL https://www.sneakerhead.com | grep -i location

Location: https://m.sneakerhead.com/

@felixvelariusbos
Copy link
Contributor

export UA="Mozilla/5.0 (Linux; U; Android 2.2) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1"
curl -sIA "$UA" https://en.wikipedia.org/wiki/Main_Page

location header = https://en.m.wikipedia.org/wiki/Main_Page

@ibnesayeed
Copy link
Collaborator Author

@felixvelariusbos Wikipedia was already covered in the class, so that is not a valid submission here.

@himarshaj
Copy link
Contributor

himarshaj commented Oct 24, 2019

x="Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) "

  1. curl -A "$x" -L -I https://www.imdb.com/ -s| grep location
    location: https://m.imdb.com/

  2. curl -A "$x" -L -I https://www.yelp.com/ -s| grep location
    location: https://m.yelp.com/

  3. curl -A "$x" -L -I https://www.cricbuzz.com/ -s| grep location
    location: https://m.cricbuzz.com/

@bwmabe
Copy link
Contributor

bwmabe commented Oct 24, 2019

Wiktionary

curl -I -A "Android" https://en.wiktionary.org/wiki/Wiktionary:Main_page

HTTP/2 302 
date: Thu, 24 Oct 2019 21:08:31 GMT
content-length: 0
location: https://en.m.wiktionary.org/wiki/Wiktionary:Main_page
server: Varnish
x-varnish: 57029256
x-cache: cp1085 int
x-cache-status: int-front
server-timing: cache;desc="int-front"
strict-transport-security: max-age=106384710; includeSubDomains; preload
set-cookie: WMF-Last-Access=24-Oct-2019;Path=/;HttpOnly;secure;Expires=Mon, 25 Nov 2019 12:00:00 GMT
set-cookie: WMF-Last-Access-Global=24-Oct-2019;Path=/;Domain=.wiktionary.org;HttpOnly;secure;Expires=Mon, 25 Nov 2019 12:00:00 GMT
x-analytics: https=1;nocookies=1
x-client-ip: 128.82.19.2
access-control-allow-origin: *

Wikimedia Commons

curl -I -A "Android" https://commons.wikimedia.org/wiki/Main_Page


HTTP/2 302 
date: Thu, 24 Oct 2019 21:17:06 GMT
content-length: 0
location: https://commons.m.wikimedia.org/wiki/Main_Page
server: Varnish
x-varnish: 60768338
x-cache: cp1085 int
x-cache-status: int-front
server-timing: cache;desc="int-front"
strict-transport-security: max-age=106384710; includeSubDomains; preload
set-cookie: WMF-Last-Access=24-Oct-2019;Path=/;HttpOnly;secure;Expires=Mon, 25 Nov 2019 12:00:00 GMT
x-analytics: https=1;nocookies=1
x-client-ip: 128.82.19.2
access-control-allow-origin: *

Wikibooks

curl -I -A "Android" https://en.wikibooks.org/wiki/Main_Page

HTTP/2 302 
date: Thu, 24 Oct 2019 21:04:14 GMT
content-length: 0
location: https://en.m.wikibooks.org/wiki/Main_Page
server: Varnish
x-varnish: 54116669
x-cache: cp1085 int
x-cache-status: int-front
server-timing: cache;desc="int-front"
strict-transport-security: max-age=106384710; includeSubDomains; preload
set-cookie: WMF-Last-Access=24-Oct-2019;Path=/;HttpOnly;secure;Expires=Mon, 25 Nov 2019 12:00:00 GMT
set-cookie: WMF-Last-Access-Global=24-Oct-2019;Path=/;Domain=.wikibooks.org;HttpOnly;secure;Expires=Mon, 25 Nov 2019 12:00:00 GMT
x-analytics: https=1;nocookies=1
x-client-ip: 128.82.19.2
access-control-allow-origin: *

@ibnesayeed
Copy link
Collaborator Author

@1bubneb these are all Wikimedia subsidiaries and most likely sharing similar server setup, configuration, and management. I would prefer if you can find something other than Wikis.

@felixvelariusbos
Copy link
Contributor

felixvelariusbos commented Oct 25, 2019

Ebay (but only items in Ebay)

export UA="Mozilla/5.0 (Linux; U; Android 2.2) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1"
curl -sIA "$UA" https://www.ebay.com/itm/-/263471884411 | grep location
>>> location: https://m.ebay.com/itm/-/263471884411?_mwBanner=1&_rdt=1

Jaryal.com

curl -sIA "$UA" http://www.jaryal.com/ | grep location
>>> location: http://m.jaryal.com/

SFGate

curl -sIA "$UA" https://www.sfgate.com/ | grep --color location
>>>location: https://m.sfgate.com/
>>>set-cookie: location_data={"is_eu":false,"country_code":"US","postal_code":"1"}; path=/;

@bwmabe
Copy link
Contributor

bwmabe commented Oct 30, 2019

Twitch.tv

curl -ILs  -A "iPhone" https://www.twitch.tv

HTTP/1.1 302 Found
Server: Varnish
Retry-After: 0
Location: https://m.twitch.tv/?desktop-redirect=true

GSMArena

curl -ILs  -A "iPhone" https://www.gsmarena.com 

HTTP/1.1 302 Found
Date: Wed, 30 Oct 2019 21:18:01 GMT
Server: Apache/2.2.15 (CentOS)
X-Powered-By: PHP/5.5.38
location: https://m.gsmarena.com/
Vary: Accept-Encoding
Connection: close
Content-Type: text/html; charset=iso-8859-1

@Neyo-odu
Copy link
Contributor

set IPHONE="Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1 Mobile/15E148 Safari/604.1"

Hexun

curl -A %IPHONE% -ILs http://www.hexun.com/
HTTP/1.1 302 Moved Temporarily
Server: nginx
Date: Thu, 31 Oct 2019 23:06:15 GMT
Content-Type: text/html
Content-Length: 154
Connection: keep-alive
Location: http://m.hexun.com/

TaoBao

curl -A %IPHONE% -ILs https://www.taobao.com/
HTTP/1.1 302 Found
Server: Tengine
Content-Type: text/html
Content-Length: 258
Connection: keep-alive
Date: Thu, 31 Oct 2019 22:48:00 GMT
Location: http://m.taobao.com/?sprefer=sypc00
Set-Cookie: thw=ca; Path=/; Domain=.taobao.com; Expires=Fri, 30-Oct-20 22:48:00 GMT;
Strict-Transport-Security: max-age=31536000
Via: cache8.us9[586,0]
Timing-Allow-Origin: *
EagleId: 2ff6189c15725620796277807e

Barnes and Noble

curl -A %IPHONE% -ILs http://www.barnesandnoble.com/
HTTP/1.1 302 Moved Temporarily
Server: AkamaiGHost
Content-Length: 0
Location: http://m.barnesandnoble.com/
Date: Thu, 31 Oct 2019 23:03:50 GMT
Connection: keep-alive
Set-Cookie: isSkava=false; path=/; domain=.barnesandnoble.com
Set-Cookie: showSiteAs=Desktop; path=/; domain=.barnesandnoble.com
Set-Cookie: DeviceType=Desktop; path=/; domain=.barnesandnoble.com
Set-Cookie: client-profile=_; path=/; domain=.barnesandnoble.com
Set-Cookie: akacd_res-prod=1580339030~rv=1~id=6750ea8d4db0cc0f87f574be96733329; path=/; Expires=Wed, 29 Jan 2020 23:03:50 GMT
Set-Cookie: bm_sz=85D03B1542CD157B2B0A0AA7ADF24A77~YAAQFcZMaP4dhgVuAQAACJIPJAV5radEE6+rbhBRkrrGsl1IBpg2i/a8aYdPwWVFDjNb+gmc7PT6I9VetO7VYFDgzWmoyiMwHLUlcUnViLIMo0SBSMfUHL44RMvophWePUf3ajd/29/oHpNeI4DWlBPDEoCYTEVkRrDS9xLGXCQ3DnhHGLnHXqsaJa+Q0AIkUV2Rhkf84w==; Domain=.barnesandnoble.com; Path=/; Expires=Fri, 01 Nov 2019 03:03:50 GMT; Max-Age=14400; HttpOnly
Set-Cookie: _abck=CAAE0C6E7FB85DB7E94FF2B1B8D6D07A~-1~YAAQFcZMaP8dhgVuAQAACJIPJALkTZwZSp3WgFuxNyL+RbrgYUFhcx0kZSj5rmfmyv6qREXPeA0TXDkFoHZWmoG8XuIHDR8jOxtJchapk0fwzTQZtev8dbZmJVb+dtzhEPLLHkdLp/qf3rHtoBxMU+9F0c1NHyLwvSiEatA80M1Ax1H4ANBRLa2VsvQ3WGwEjQQmrnyGI2/Q78s1H5F17vbjSKefzaosFVD+DOM+YIsaDffuRUnzsOaijX+GkaV0ZT/hVALczafItdPtUk7L2GQM8G2yIq+xz1t1Ilc=~-1~-1~-1; Domain=.barnesandnoble.com; Path=/; Expires=Fri, 30 Oct 2020 23:03:50 GMT; Max-Age=31536000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Assignment Extra credit assignments
Projects
None yet
Development

No branches or pull requests

7 participants
@ibnesayeed @felixvelariusbos @bwmabe @kritikagarg @himarshaj @Neyo-odu and others