tk42 / hacking_tinder

Auto sending likes on tinder
4 stars 1 forks source link

Facebook の OAuth 認証のパス #1

Open tk42 opened 7 years ago

tk42 commented 7 years ago

https://qiita.com/mima_ita/items/439da39b3361fba67a1f

アプリケーションの登録が必要?

tk42 commented 6 years ago

手動でtokenを奪うことに成功.自動パケットフィルタリングを行う方針で実装中

tk42 commented 6 years ago

MacでSniffするのが無理っぽい(AF_PACKET).Linuxを想定しているような

最終的にVPS上で動かすことを考えれば, CentOS上で,scapyでパケットキャプチャを動かしながら,ブラウザ立ち上げて,パケットフィルタの検証 ⇨自動化をしなくてはならないよね!?

検証ができたら,後はDockerfileでも作って,Token取得後の挙動を環境に依存せず開発・テストすれば良い.

tk42 commented 6 years ago

pynderで解決か https://github.com/charliewolf/pynder

tk42 commented 6 years ago

facebookのトークン取得を自動化する

tk42 commented 6 years ago

手動設定は,Tinderface の Get started にある

tk42 commented 6 years ago

access_token の長さが調べられるサイト https://developers.facebook.com/tools/debug/accesstoken/

Facebook API: 有効期限の長い Access Token を取得する https://gist.github.com/xl1/fe779a817a9d4938193d

手動設定で得られるのは,短い期限のUser Access Token 長い期間にしようとするとAPP SECRET KEYが必要だから無理っぽい

tk42 commented 6 years ago

iPhoneアプリだと無期限認証となる方法を突いたスクリプトが公開されていた.期限はNeverを確認

https://github.com/charliewolf/pynder/issues/99
tk42 commented 6 years ago

Added access_token.py to get access_token that is never expired. #6

tk42 commented 6 years ago

FBの認証時にパスワード変更を促されるようになったため,この方法は不可

tk42 commented 6 years ago
[root hacking_tinder]# make test
python3 ./hacking_tinder/test/test_access_token.py XXX XXX
Traceback (most recent call last):
  File "./hacking_tinder/test/test_access_token.py", line 38, in <module>
    at = AccessToken(email, password)
  File "/root/hacking_tinder/hacking_tinder/main/access_token.py", line 12, in __init__
    self.access_token = self.logic(email, password)
  File "/root/hacking_tinder/hacking_tinder/main/access_token.py", line 24, in logic
    s.submit_form(f, submit=f.submit_fields['__CONFIRM__'])
  File "/usr/lib/python3.5/site-packages/Werkzeug-0.14.1-py3.5.egg/werkzeug/datastructures.py", line 784, in __getitem__
    raise exceptions.BadRequestKeyError(key)
werkzeug.exceptions.BadRequestKeyError: 400 Bad Request: The browser (or proxy) sent a request that this server could not understand.
make: *** [test] Error 1
tk42 commented 6 years ago

USER_AGENT をiPhoneXのに変えると,ロック後のパスワード変更は促されなくなった.

tk42 commented 6 years ago

いい加減に面倒なのでfacebookアカウントを別に一つ作ることを検討

tk42 commented 6 years ago

access_token.py のテストを通過させて,CI導入すること

tk42 commented 6 years ago

facebookアカウントを新たに作ると治った.

tk42 commented 6 years ago

新しく専用に作ったFacebookアカウントが凍結された