Skip to content
KitploitKITPLOIT
ツールブログ
提出
ツールブログ
提出

ハッキング、侵入テスト、サイバーセキュリティツールをあなたのセキュリティアーセナルに!

Kitploitはハッキング、サイバーセキュリティ、ペネトレーションテストのツールディレクトリです。最新のプロジェクトアップデートを見つけて、脆弱性の発見、システム分析、テストの自動化、セキュリティの強化を行いましょう。

··フィード·お問い合わせ·プライバシー·© 2026 Kitploit

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
HingeSDK — 孤独で退屈したソフトウェアエンジニア向けのHingeデーティングアプリ用Python SDK | Kitploit
ツール/GitHubGitHub/reedgraff/hingesdk
OSINT (オープンソースインテリジェンス)スクリプトと自動化データ流出情報収集ソーシャルエンジニアリングユーティリティとフレームワーククローラー
GitHubreedgraff/hingesdk

HingeSDK

孤独で退屈したソフトウェアエンジニア向けのHingeデーティングアプリ用Python SDK

リポジトリを見る
113159ヶ月前Kitploit レビュー済み

人気

すべて見る →

コミュニティで最も使われているツールを見つけましょう。

すべてのツールを探索

ツールコレクションを閲覧

すべてのツールを見る →
共有

HingeSDK

Hinge APIの非公式Python SDK。プログラムでHingeと連携し、おすすめの取得、メッセージ送信、メディアのダウンロード、インタラクションの自動化を行います。

認証と環境設定

SDKを使用するには、有効な認証情報が必要です。これらの情報は.envファイルに保存するか、クライアントに直接渡すことができます。

必要な変数

  • BEARER_TOKEN: JWT認証トークン(例:L2euNWN...)。
  • SESSION_ID: 現在のセッションUUID。
  • USER_ID: あなたのユーザー/プレイヤーID。

認証情報の取得方法

方法1:ルート化された端末 / プロキシ(既存アカウント推奨)

既存のHingeアカウントを新しい端末でのログインによるフラグリスクなしで使用したい場合は、アプリのネットワークトラフィックからこれらの値を抽出する必要があります。

注意: 正しい変数を取得するためには、この操作は1回だけ行えば十分です。取得後は、将来のセッションにはSMSログイン方式を使用できます。

  1. Hingeは証明書ピニングを使用していないため、ルート化されたAndroid端末または標準のプロキシ設定(例:HTTP ToolkitやCharles Proxy)を使用します。
  2. prod-api.hingeaws.net または同様のHingeエンドポイントへのHTTPSリクエストを調査します。
  3. プロフィールエンドポイントのリクエストまたはレスポンスボディから以下のヘッダー/値を抽出します:
    • authorization(Bearerトークン)
    • x-session-id
    • x-device-id
    • x-install-id
    • User ID(レスポンスボディ内で subjectId などとしてよく見られます)

方法2:SMSログイン(試験的)

SDKを介してSMSでログインすることで新しい認証情報を生成できます。これは新しいログインフローを実行します。

root@kitploit:~
from hingesdk.client import HingeClient

# これらのIDはアカウントに関連付けられた実際の値と一致している必要があります。
# ランダムなUUIDは使用できません。アカウントの登録端末と一致している必要があります。
client = HingeClient.login_with_sms(
    phone_number="+15551234567", 
    device_id="your_device_id_uuid", 
    install_id="your_install_id_uuid" 
)

print(f"BEARER_TOKEN={client.auth_token}")
print(f"SESSION_ID={client.session_id}")
print(f"USER_ID={client.user_id}")

インストール

リポジトリをクローンしてパッケージをインストールします:

root@kitploit:~
git clone https://github.com/reedgraff/hingesdk
cd hingesdk
pip install .

クイックスタート

以下は認証してユーザーおすすめを取得する最小限の例です。

root@kitploit:~
import os
from hingesdk.api import HingeAPIClient

# 認証情報で初期化
client = HingeAPIClient(
    auth_token=os.getenv("BEARER_TOKEN"),
    session_id=os.getenv("SESSION_ID"),
    user_id=os.getenv("USER_ID")
)

# おすすめを取得
recs = client.get_recommendations()
print(f"Successfully fetched recommendations request.")

使用法と例

例:メッセージ送信
root@kitploit:~
from hingesdk.client import HingeAPIClient

auth_token = 'your_auth_token'
user_id = 'your_user_id'

client = HingeAPIClient(auth_token=auth_token, user_id=user_id)
response = client.send_message(
    subject_id='receiver_id',
    message='Hello, this is a test message!'
)
print(response)
例:ユーザーおすすめの取得
root@kitploit:~
from hingesdk.api import HingeAPIClient

client = HingeAPIClient(auth_token=auth_token, user_id=user_id)
recommendations = client.get_recommendations()
print(recommendations)
例:ユーザー画像のダウンロード
root@kitploit:~
from hingesdk.tools import HingeTools
from hingesdk.api import HingeAPIClient
from hingesdk.media import HingeMediaClient

api_client = HingeAPIClient(auth_token=auth_token, user_id=user_id)
media_client = HingeMediaClient(auth_token=auth_token)

tools = HingeTools(api_client, media_client)
tools.download_recommendation_content(output_path='path_to_save_images')
例:ユーザー情報の取得とプロフィールへのいいね
root@kitploit:~
import os
import json
from hingesdk.tools import HingeTools
from hingesdk.api import HingeAPIClient
from hingesdk.media import HingeMediaClient

auth_token = os.getenv("BEARER_TOKEN")
session_id = os.getenv("SESSION_ID")
user_id = os.getenv("USER_ID")

api_client = HingeAPIClient(
    auth_token=auth_token,
    session_id=session_id,
    user_id=user_id
)
media_client = HingeMediaClient(auth_token=auth_token)
tools = HingeTools(api_client, media_client)

# 例:ユーザー情報を取得
tools.create_profile_json(
    source=ProfileSource.STANDOUTS,
    output_file="standouts.json"
)

# 例:ユーザーにいいね
with open("standouts.json", "r") as f:
    profiles = json.load(f)

personData = profiles["35582109789..."]

# ユーザーの質問にいいね
questionIDToLike = "5c4a346828fd883a24..."
response = api_client.like_profile(
    subject_id=personData["interaction_data"]["subject_id"],
    rating_token=personData["interaction_data"]["rating_token"],
    prompt={
        "questionId": questionIDToLike,
        "response": "I've been in Miami for a year and still haven't gone (╥﹏╥)"
    }
)
print(response)

# ユーザーの写真にいいね
# photoIDToLike = "2c6411ac-66e4-4194-..."
# response = api_client.like_profile(
#     subject_id=personData["interaction_data"]["subject_id"],
#     rating_token=personData["interaction_data"]["rating_token"],
#     photo={
#         "contentId": photoIDToLike,
#         "comment": "So how many people have commented saying they've been here before?"
#     }
# )
# print(response)
実用的な例:大学検索(学歴によるマッチフィルタリング)

この例では、おすすめをスクレイピングし、特定の条件(例:トップ大学)に基づいてプロフィールをフィルタリングする方法を示します。

root@kitploit:~
def find_top_50_university_students(json_file_path, age_min=18, age_max=24):
    # マッチするプロフィールを格納するリスト
    matching_profiles = []
    
    # トップ50大学のパターン辞書(大文字小文字を区別しない)
    top_50_patterns = {
        "Princeton University": [r"princeton", r"\bpu\b", r"princeton\s+university"],
        "Massachusetts Institute of Technology": [r"mit", r"massachusetts\s+institute\s+of\s+technology", r"mass\s+tech"],
        "Harvard University": [r"harvard", r"\bhu\b", r"harvard\s+university"],
        "Stanford University": [r"stanford", r"\bsu\b", r"stanford\s+university"],
        "Yale University": [r"yale", r"\byu\b", r"yale\s+university"],
        "California Institute of Technology": [r"caltech", r"california\s+institute\s+of\s+technology"],
        "Duke University": [r"duke", r"\bdu\b", r"duke\s+university"],
        "Johns Hopkins University": [r"johns\s+hopkins", r"\bjhu\b", r"hopkins"],
        "Northwestern University": [r"northwestern", r"\bnu\b", r"northwestern\s+university"],
        "University of Pennsylvania": [r"upenn", r"penn", r"university\s+of\s+pennsylvania"],
        "Cornell University": [r"cornell", r"\bcu\b", r"cornell\s+university"],
        "University of Chicago": [r"uchicago", r"university\s+of\s+chicago", r"u\s+chicago"],
        "Brown University": [r"brown", r"\bbu\b", r"brown\s+university"],
        "Columbia University": [r"columbia", r"\bcu\b", r"columbia\s+university"],
        "Dartmouth College": [r"dartmouth", r"\bdc\b", r"dartmouth\s+college"],
        "University of California--Los Angeles": [r"ucla", r"university\s+of\s+california\s+los\s+angeles", r"uc\s+la"],
        "University of California, Berkeley": [r"uc\s+berkeley", r"berkeley", r"university\s+of\s+california\s+berkeley"],
        "Rice University": [r"rice", r"\bru\b", r"rice\s+university"],
        "University of Notre Dame": [r"notre\s+dame", r"\bnd\b", r"university\s+of\s+notre\s+dame"],
        "Vanderbilt University": [r"vanderbilt", r"\bvu\b", r"vandy"],
        "Carnegie Mellon University": [r"carnegie\s+mellon", r"\bcmu\b", r"cmu"],
        "University of Michigan--Ann Arbor": [r"umich", r"michigan", r"university\s+of\s+michigan"],
        "Washington University in St. Louis": [r"washu", r"washington\s+university", r"wu\s+stl"],
        "Emory University": [r"emory", r"\beu\b", r"emory\s+university"],
        "Georgetown University": [r"georgetown", r"\bgu\b", r"georgetown\s+university"],
        "University of Virginia": [r"uva", r"virginia", r"university\s+of\s+virginia"],
        "University of North Carolina--Chapel Hill": [r"unc", r"chapel\s+hill", r"university\s+of\s+north\s+carolina"],
        "University of Southern California": [r"usc", r"southern\s+california", r"university\s+of\s+southern\s+california"],
        "University of California, San Diego": [r"ucsd", r"uc\s+san\s+diego", r"university\s+of\s+california\s+san\s+diego"],
        "New York University": [r"nyu", r"new\s+york\s+university"],
        "University of Florida": [r"uf", r"florida", r"university\s+of\s+florida"],
        "The University of Texas--Austin": [r"ut\s+austin", r"utexas", r"university\s+of\s+texas"],
        "Georgia Institute of Technology": [r"gatech", r"georgia\s+tech", r"georgia\s+institute\s+of\s+technology"],
        "University of California, Davis": [r"uc\s+davis", r"ucd", r"university\s+of\s+california\s+davis"],
        "University of California--Irvine": [r"uci", r"uc\s+irvine", r"university\s+of\s+california\s+irvine"],
        "University of Illinois Urbana-Champaign": [r"uiuc", r"illinois", r"university\s+of\s+illinois"],
        "Boston College": [r"bc", r"boston\s+college"],
        "Tufts University": [r"tufts", r"\btu\b", r"tufts\s+university"],
        "University of California, Santa Barbara": [r"ucsb", r"uc\s+santa\s+barbara", r"university\s+of\s+california\s+santa\s+barbara"],
        "University of Wisconsin--Madison": [r"uw\s+madison", r"wisconsin", r"university\s+of\s+wisconsin"],
        "Boston University": [r"bu", r"boston\s+university"],
        "The Ohio State University": [r"ohio\s+state", r"osu", r"the\s+ohio\s+state\s+university"],
        "Rutgers University--New Brunswick": [r"rutgers", r"ru", r"rutgers\s+university"],
        "University of Maryland, College Park": [r"umd", r"maryland", r"university\s+of\s+maryland"],
        "University of Rochester": [r"rochester", r"\bur\b", r"university\s+of\s+rochester"],
        "Lehigh University": [r"lehigh", r"\blu\b", r"lehigh\s+university"],
        "Purdue University--Main Campus": [r"purdue", r"\bpu\b", r"purdue\s+university"],
        "University of Georgia": [r"uga", r"georgia", r"university\s+of\s+georgia"],
        "University of Washington": [r"uw", r"washington", r"university\s+of\s+washington"],
        "Wake Forest University": [r"wake\s+forest", r"\bwfu\b", r"wake"],
        "Case Western Reserve University": [r"case\s+western", r"\bcwru\b", r"case"],
        "Texas A&M University": [r"texas\s+a&m", r"tamu", r"a&m"],
        "Virginia Tech": [r"virginia\s+tech", r"vt", r"vtech"],
        "Florida State University": [r"fsu", r"florida\s+state", r"florida\s+state\s+university"],

        "University of Miami": [r'umiami', r'\bum\b', r'university\s+of\s+miami']
    }
    
    try:
        # JSONファイルを読み込む
        with open(json_file_path, 'r') as file:
            data = json.load(file)
            
        # 各ユーザープロフィールをイテレート
        for user_id, profile in data.items():
            profile_info = profile.get('profile_info', {})
            
            # 年齢範囲をチェック(デフォルトはmin/max設定可能)
            age = profile_info.get('age', 0)
            if not (age_min <= age <= age_max):
                continue
                
            # 学歴リストを取得(存在しない場合は空リスト)
            educations = profile_info.get('educations', [])
            
            # 各学歴文字列をトップ50大学の参照と照合
            found_match = False
            matched_university = None
            for edu in educations:
                if not isinstance(edu, str):
                    continue
                    
                # 小文字に変換して大文字小文字を区別しないマッチング
                edu_lower = edu.lower()
                
                # 各大学のパターンをチェック
                for university, patterns in top_50_patterns.items():
                    for pattern in patterns:
                        if re.search(pattern, edu_lower):
                            found_match = True
                            matched_university = university
                            break
                    if found_match:
                        break
                if found_match:
                    break
            
            # マッチが見つかった場合、結果にプロフィールを追加
            if found_match:
                # 画像リストを取得(存在しない場合は空リスト)
                images = profile.get('images', [])
                image_urls = [img.get('url', '') for img in images if img.get('url')]
                
                matching_profiles.append({
                    'user_id': user_id,
                    'age': age,
                    'firstName': profile_info.get('firstName', ''),
                    'educations': educations,
                    'matched_university': matched_university,
                    'location': profile_info.get('location', {}).get('name', ''),
                    'image_urls': image_urls
                })
                
        return matching_profiles
    
    except FileNotFoundError:
        print(f"Error: File {json_file_path} not found.")
        return []
    except json.JSONDecodeError:
        print(f"Error: Invalid JSON format in {json_file_path}.")
        return []
    except Exception as e:
        print(f"Unexpected error: {str(e)}")
        return []



def main():
    # 認証トークンでクライアントを初期化
    auth_token = os.getenv("BEARER_TOKEN")
    session_id = os.getenv("SESSION_ID")
    user_id = os.getenv("USER_ID")
    
    api_client = HingeAPIClient(
        auth_token=auth_token,
        session_id=session_id,
        user_id=user_id
    )
    media_client = HingeMediaClient(auth_token=auth_token)
    tools = HingeTools(api_client, media_client)

    # 例:一括スクレイピング
    # tools.scrape_recommendations_multiple(
    #     iterations=40, # 40 seems like the max before needing to skip people...
    #     min_sleep = 20,
    #     max_sleep = 60,
    # )
    json_file_path = 'all_recommendations.json'
    csv_file_path = 'university_matches.csv'
    results = find_top_50_university_students(json_file_path)

    print(f"Found {len(results)} matching profiles.")

    # CSVのヘッダーを定義(画像ごとに個別の列)
    headers = ['timestamp', 'user_id', 'name', 'age', 'location', 'education', 
            'image1', 'image2', 'image3', 'image4', 'image5', 'image6']

    # CSVファイルを追記モードで開く
    with open(csv_file_path, 'a', newline='', encoding='utf-8') as csvfile:
        writer = csv.DictWriter(csvfile, fieldnames=headers)
        
        # ファイルが空の場合、ヘッダーを書き込む
        if csvfile.tell() == 0:
            writer.writeheader()
        
        # 各プロフィールを行として書き込み
        for profile in results:
            # 行の辞書を作成
            row_data = {
                'timestamp': datetime.now().strftime('%Y-%m-%d %H:%M:%S'),
                'user_id': profile['user_id'],
                'name': profile['firstName'],
                'age': profile['age'],
                'location': profile['location'],
                'education': ', '.join(profile['educations'])
            }
            
            # 画像URLを個別の列に追加
            for i in range(6):
                image_key = f'image{i+1}'
                if profile['image_urls'] and i < len(profile['image_urls']):
                    row_data[image_key] = profile['image_urls'][i]
                else:
                    row_data[image_key] = ''
            
            writer.writerow(row_data)

    print(f"Results have been appended to {csv_file_path}")

プロジェクト構成

SDKは関心事を分離するために論理モジュールに整理されています。

root@kitploit:~
hingesdk/
├── __init__.py
├── client.py       # ベースHingeClient:HTTPリクエスト、ヘッダー、認証を処理
├── api.py          # HingeAPIClient:コアAPIメソッド(いいね、メッセージ、おすすめ取得)
├── media.py        # HingeMediaClient:画像のダウンロード/処理のヘルパー
├── tools.py        # HingeTools:高レベルワークフロー(一括スクレイピング、エクスポート)
├── models.py       # Pydanticモデルとデータ構造(該当する場合)
├── exceptions.py   # カスタム例外クラス(HingeAPIError、HingeAuthError)
└── assets/         # 静的リソース(例:プロンプト定義)

ライセンス

このプロジェクトはMITライセンスの下で提供されています。

ツールをダウンロード