repl.it
@pieromqwerty/

Automatic FCS Wifi Signup

Python

No description

fork
loading
Files
  • main.py
  • poetry.lock
  • pyproject.toml
  • requirements.txt
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import requests

cookies = {
    'GSID': 'fb76dfe1ff0d3c1df820438d57dccc2c',
    '_ga': 'GA1.2.2054359337.1571157289',
    '_gid': 'GA1.2.1796959279.1571157289',
}

headers = {
    'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0',
    'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
    'Accept-Language': 'en-US,en;q=0.5',
    'Content-Type': 'application/x-www-form-urlencoded',
    'Connection': 'keep-alive',
    'Referer': 'https://clearpass.fultonschools.org/guest/self_registration.php?_browser=1',
    'Upgrade-Insecure-Requests': '1',
}

params = (
    ('_browser', '1'),
)

data = {
  'url': 'http://piemadd.com/',
  'ip': '10.219.115.116',
  'cmd': 'login',
  'visitor_name': 'Piero Maddaleni',
  'visitor_company': '',
  'email': '[email protected]',
  'visitor_phone': '+16783582271',
  'visitor_phone_intl': '(678) 358-2271',
  'visitor_carrier': 'Sprint (PCS)',
  'expire_after': '24',
  'role_id': '2',
  'mac': '84:fd:d1:e1:ee:d9',
  'remote_addr': '10.219.115.116',
  'essid': 'FCS-Guests',
  'apgroup': 'fcs-riverwood-hs',
  'apname': 'RvwHS-FL1-AP05',
  'vcname': '',
  'auto_update_account': '1',
  'creator_accept_terms': '1'
}

response = requests.post('https://clearpass.fultonschools.org/guest/self_registration.php', headers=headers, params=params, cookies=cookies, data=data)

print(response)

#NB. Original query string below. It seems impossible to parse and
#reproduce query strings 100% accurately so the one below is given
#in case the reproduced version is not "correct".
# response = requests.post('https://clearpass.fultonschools.org/guest/self_registration.php?_browser=1', headers=headers, cookies=cookies, data=data)