Skip to content

Commit 2ede8d0

Browse files
committed
Yahoo hotspot: add hostname, set cookie
1 parent 7862e50 commit 2ede8d0

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ sudo python3 samsungserver.py
6060

6161
```
6262
192.168.1.23 gld.samsungosp.com www.samsungimaging.com www.ospserver.net snsgw.samsungmobile.com
63+
# For ST200F and WB850F also add this:
64+
192.168.1.23 www.yahoo.co.kr
65+
6366
```
6467

6568
## NX1/NX500

samsungserver.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ def autoindex(path='.'):
3838

3939
@app.route('/')
4040
def home():
41+
host = (request.headers.get('Host') or "")
42+
if host == "www.yahoo.co.kr":
43+
resp = make_response("YAHOO!", 200)
44+
resp.set_cookie('samsung', 'hotspot', domain='.yahoo.co.kr')
45+
return resp
4146
return render_template('index.html', useragent=request.user_agent)
4247

4348
SITES = [

0 commit comments

Comments
 (0)