Skip to content
This repository has been archived by the owner on Sep 10, 2023. It is now read-only.

Facebook の OAuth 認証のパス #1

Open
tk42 opened this issue Sep 30, 2017 · 15 comments
Open

Facebook の OAuth 認証のパス #1

tk42 opened this issue Sep 30, 2017 · 15 comments
Labels

Comments

@tk42
Copy link
Owner

tk42 commented Sep 30, 2017

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

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

@tk42
Copy link
Owner Author

tk42 commented Oct 13, 2017

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

@tk42
Copy link
Owner Author

tk42 commented Oct 24, 2017

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

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

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

@tk42
Copy link
Owner Author

tk42 commented Nov 18, 2017

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

@tk42
Copy link
Owner Author

tk42 commented Nov 18, 2017

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

@tk42
Copy link
Owner Author

tk42 commented Dec 25, 2017

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

@tk42
Copy link
Owner Author

tk42 commented Mar 4, 2018

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
Copy link
Owner Author

tk42 commented Mar 4, 2018

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

https://github.com/charliewolf/pynder/issues/99
  • テストを追加する

@tk42
Copy link
Owner Author

tk42 commented Mar 4, 2018

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

@tk42 tk42 closed this as completed Mar 4, 2018
@tk42 tk42 reopened this Jul 3, 2018
@tk42
Copy link
Owner Author

tk42 commented Jul 3, 2018

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

@tk42
Copy link
Owner Author

tk42 commented Jul 3, 2018

[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
Copy link
Owner Author

tk42 commented Jul 3, 2018

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

@tk42
Copy link
Owner Author

tk42 commented Jul 3, 2018

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

@tk42
Copy link
Owner Author

tk42 commented Jul 3, 2018

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

@tk42 tk42 added the bug label Jul 3, 2018
@tk42
Copy link
Owner Author

tk42 commented Jul 3, 2018

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

@tk42 tk42 closed this as completed Jul 3, 2018
@tk42
Copy link
Owner Author

tk42 commented Jul 5, 2018

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

@tk42 tk42 reopened this Jul 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant