added ipartners (McD-Hotspot PL)
This commit is contained in:
parent
ad0970c95c
commit
1d9ec7a7f5
|
@ -1,9 +1,11 @@
|
||||||
from ._dummy import DummyFxcker
|
from ._dummy import DummyFxcker
|
||||||
from .umwarszawa import UMWarszawaFxcker
|
from .umwarszawa import UMWarszawaFxcker
|
||||||
from .ledatel import LedatelFxcker
|
from .ledatel import LedatelFxcker
|
||||||
|
from .ipartners import IPartnersFxcker
|
||||||
|
|
||||||
fxckers_map = [
|
fxckers_map = [
|
||||||
([r"re:MZK Opole \d{3}(?: (?:2.4|5)GHz)?"], DummyFxcker),
|
([r"re:MZK Opole \d{3}(?: (?:2.4|5)GHz)?"], DummyFxcker),
|
||||||
(["UM-Warszawa"], UMWarszawaFxcker),
|
(["UM-Warszawa"], UMWarszawaFxcker),
|
||||||
(["Pendolino_WiFi"], LedatelFxcker),
|
(["Pendolino_WiFi"], LedatelFxcker),
|
||||||
|
(["McD-Hotspot"], IPartnersFxcker),
|
||||||
]
|
]
|
||||||
|
|
28
librefi/fxckers/ipartners.py
Normal file
28
librefi/fxckers/ipartners.py
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
from ._common import BaseFxcker
|
||||||
|
from ..utils import regex_search_string, dump_qs
|
||||||
|
|
||||||
|
|
||||||
|
class IPartnersFxcker(BaseFxcker):
|
||||||
|
# made for McD-Hotspot (PL)
|
||||||
|
def unfxck(self, location=None):
|
||||||
|
startpage = self.request("GET", location)
|
||||||
|
url = regex_search_string(
|
||||||
|
r'<form method="POST" action=\'([^\']+)\'', startpage.text)
|
||||||
|
username = regex_search_string(
|
||||||
|
r'<input type="hidden" name="username" value="([^"]+)"',
|
||||||
|
startpage.text)
|
||||||
|
password = regex_search_string(
|
||||||
|
r'<input type="hidden" name="password" value="([^"]+)"',
|
||||||
|
startpage.text)
|
||||||
|
success_url = regex_search_string(
|
||||||
|
r'<input type="hidden" name="success_url" value="([^"]+)"',
|
||||||
|
startpage.text)
|
||||||
|
self.request("POST", url, data=dump_qs({
|
||||||
|
"username": username,
|
||||||
|
"password": password,
|
||||||
|
"success_url": success_url,
|
||||||
|
}), headers={
|
||||||
|
"Content-Type": "application/x-www-form-urlencoded",
|
||||||
|
})
|
||||||
|
# should work (?)
|
||||||
|
return True
|
Loading…
Reference in a new issue