Skip to content
KitploitKITPLOIT
ツールエクスプロイトブログ
Log in
提出
ツールエクスプロイトブログ
提出

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

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

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

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
SwiftyInsta — Instagram Private API Swift | Kitploit
ツール/GitHubGitHub/them4hd1/swiftyinsta
OSINT (オープンソースインテリジェンス)スクリプトと自動化情報収集ソーシャルエンジニアリング
GitHubthem4hd1/swiftyinsta

SwiftyInsta

Instagram Private API Swift

リポジトリを見る
23049204年前Kitploit レビュー済み

人気

すべて見る →

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

すべてのツールを探索

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

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

SwiftyInsta(レガシー)

ご注意ください:SwiftyInsta は現在積極的にメンテナンスされていません。
詳細については #244 を参照してください。
最新の代替手段をお探しの場合は、Swiftagram をご確認ください。


CI Status Version License Platform

Instagram は開発者に2種類のAPIを提供しています。機能が非常に制限され廃止が近い Instagram API Platform と、Business および Creator アカウントのみの Instagram Graph API です。

しかし、Instagram アプリは3番目のタイプの API、いわゆる Private API または Unofficial API に依存しており、SwiftyInsta は完全に Swift で書かれた iOS、macOS、tvOS、watchOS クライアントです。

より良いInstagram体験をユーザーに提供したり、さまざまなタスクを自動化するボットを作成することができます。

これらの Private API は トークン や アプリ登録 を必要としませんが、外部での使用はInstagramによって 許可 されていません。

自己責任で使用してください。

インストール

Swift Package Manager (Xcode 11 以降)

  1. メニューから File/Swift Packages/Add Package Dependency… を選択します。
  2. https://github.com/TheM4hd1/SwiftyInsta.git を貼り付けます。
  3. 手順に従います。

CocoaPods

CocoaPods は Cocoa プロジェクトの依存関係マネージャーです。次のコマンドでインストールできます:

$ gem install cocoapods

CocoaPods を使用して SwiftyInsta を Xcode プロジェクトに統合するには、Podfile に次のように指定します:

use_frameworks!

target '<Your Target Name>' do
    pod 'SwiftyInsta', '~> 2.0'
end

その後、次のコマンドを実行します:

$ pod install

SwiftyInsta は CryptoSwift および keychain-swift に依存しています。

ログイン

Credentials

// these need to be strong references.
self.credentials = Credentials(username: /* username */, password: /* password */, verifyBy: .text)
self.handler = APIHandler()
handler.authenticate(with: .user(credentials)) {
    switch $0 {
    case .success(let response, _):
        print("Login successful.")
        // persist cache safely in the keychain for logging in again in the future.
        guard let key = response.persist() else { return print("`Authentication.Response` could not be persisted.") }
        // store the `key` wherever you want, so you can access the `Authentication.Response` later.
        // `UserDefaults` is just an example.
        UserDefaults.standard.set(key, forKey: "current.account")
        UserDefaults.standard.synchronize()
    case .failure(let error):
        if error.requiresInstagramCode {
            /* update interface to ask for code */
        } else {
            /* notify the user */
        }
    }
}

ユーザーが二要素認証コードまたはチャレンジコードを入力したら、単に次のようにします:

self.credentials.code = /* the code */

すると、先ほどの authenticate(with: completionHandler:) の completionHandler が自動的にレスポンスをキャッチします。

LoginWebViewController

let login = LoginWebViewController { controller, result in
    controller.dismiss(animated: true, completion: nil)
    // deal with authentication response.
    guard let (response, _) = try? result.get() else { return print("Login failed.") }
    print("Login successful.")
    // persist cache safely in the keychain for logging in again in the future.
    guard let key = response.persist() else { return print("`Authentication.Response` could not be persisted.") }
    // store the `key` wherever you want, so you can access the `Authentication.Response` later.
    // `UserDefaults` is just an example.
    UserDefaults.standard.set(key, forKey: "current.account")
    UserDefaults.standard.synchronize()
}
if #available(iOS 13, *) {
    present(login, animated: true, completion: nil) // just swipe down to dismiss.
} else {
    present(UINavigationController(rootViewController: login),  // already adds a `Cancel` button to dismiss it.
            animated: true,
            completion: nil)
}

または、LoginWebView を使用して独自のカスタム UIViewController を実装し、.webView(/* your login web view */) を使用して APIHandler の authenticate メソッドに渡します。

Authentication.Response

既にユーザーの Authentication.Response を永続化している場合:

// recover the `key` returned by `Authentication.Response.persist()`.
// in our example, we stored it in `UserDefaults`.
guard let key = UserDefaults.standard.string(forKey: "current.account") else { return print("`key` not found.") }
// recover the safely persisted `Authentication.Response`.
guard let cache = Authentication.Response.persisted(with: key) else { return print("`Authentication.Response` not found.") }
// log in.
let handler = APIHandler()
handler.authenticate(with: .cache(cache)) { _ in
    /* do something here */
}

使い方

すべてのエンドポイントは APIHandler インスタンスから簡単にアクセスできます。

let handler: APIHandler = /* a valid, authenticated handler */
// for instance you can…
// …fetch your inbox.
handler.messages.inbox(with: .init(maxPagesToLoad: .max),
                       updateHandler: nil,
                       completionHandler: { _, _ in /* do something */ })
// …fetch all your followers.
handler.users.following(user: .me,
                        with: .init(maxPagesToLoad: .max),
                        updateHandler: nil,
                        completionHandler: { _, _ in /* do something */ })

さらに、レスポンスは API によって返された JSON ファイルに含まれるすべての値を表示するようになりました。任意の ParsedResponse の rawResponse にアクセスしてブラウジングを開始するか、推奨されるアクセサリ(例:User の username、name など、および Media の aspectRatio、takenAt、content など)を使用してください。

コントリビューション

プルリクエスト と イシュー は大歓迎です。

著者

  • Mahdi Makhdumi (@TheM4hd1), 1.* メンテナー
  • Stefano Bertagno (@sbertix), 2.* メンテナー

現在、メンテナーを積極的に募集しています。
詳細については #244 を参照してください。

ライセンス

SwiftyInsta は MIT ライセンスの下でライセンスされています。詳細については LICENSE をご覧ください。

ツールをダウンロード