Skip to content
KitploitKITPLOIT
उपकरणब्लॉग
जमा करें
उपकरणब्लॉग
जमा करें

हैकिंग, पेनटेस्ट और साइबर सुरक्षा उपकरण आपके सुरक्षा शस्त्रागार के लिए!

Kitploit हैकिंग, साइबर सुरक्षा और पेंटेस्टिंग टूल्स की एक निर्देशिका है। कमजोरियों को खोजने, सिस्टम का विश्लेषण करने, परीक्षण को स्वचालित करने और अपनी सुरक्षा को मजबूत करने के लिए नवीनतम प्रोजेक्ट अपडेट खोजें।

··फ़ीड·संपर्क·गोपनीयता·© 2026 Kitploit

टूल निर्देशिका

श्रेणियाँ

सभी श्रेणियाँ देखें
Loading categories
उपकरण/GitHubGitHub/them4hd1/swiftyinsta
OSINT (खुला स्रोत खुफिया)स्क्रिप्टिंग और स्वचालनजानकारी एकत्र करनासामाजिक इंजीनियरिंग
GitHubthem4hd1/swiftyinsta

SwiftyInsta

Instagram Private API Swift

रिपॉजिटरी देखें
230494 साल पहलेKitploit द्वारा समीक्षित

सबसे लोकप्रिय

सभी देखें →

हमारे समुदाय द्वारा सबसे अधिक उपयोग किए जाने वाले उपकरण खोजें।

सभी उपकरण खोजें

हमारे उपकरणों का संग्रह ब्राउज़ करें

सभी उपकरण देखें →
साझा करें
SwiftyInsta — Instagram Private API Swift | Kitploit

SwiftyInsta (पुराना)

कृपया ध्यान दें SwiftyInsta अब सक्रिय रूप से अनुरक्षित नहीं है।
अधिक जानकारी के लिए #244 देखें।
यदि आप अद्यतन विकल्पों की तलाश में हैं तो Swiftagram देखें।


CI स्थिति संस्करण लाइसेंस प्लेटफ़ॉर्म

Instagram डेवलपर्स के लिए दो प्रकार के API प्रदान करता है। Instagram API Platform (कार्यक्षमता में अत्यंत सीमित और बंद होने के करीब), और Instagram Graph API केवल Business और Creator खातों के लिए।

हालाँकि, Instagram ऐप्स एक तीसरे प्रकार के API पर निर्भर करते हैं, जिसे Private API या Unofficial API कहा जाता है, और SwiftyInsta उनके लिए एक iOS, macOS, tvOS और watchOS क्लाइंट है, जो पूरी तरह से Swift में लिखा गया है। आप अपने उपयोगकर्ताओं के लिए बेहतर 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 परियोजनाओं के लिए एक निर्भरता प्रबंधक है। आप इसे निम्नलिखित कमांड से स्थापित कर सकते हैं:

root@kitploit:~
$ gem install cocoapods

अपने Xcode प्रोजेक्ट में SwiftyInsta को CocoaPods का उपयोग करके एकीकृत करने के लिए, इसे अपने Podfile में निर्दिष्ट करें:

root@kitploit:~
use_frameworks!

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

फिर, निम्नलिखित कमांड चलाएँ:

root@kitploit:~
$ pod install

SwiftyInsta CryptoSwift और keychain-swift पर निर्भर करता है।

लॉगिन

Credentials

root@kitploit:~
// 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 */
        }
    }
}

एक बार जब उपयोगकर्ता दो-कारक प्रमाणीकरण कोड या चुनौती कोड टाइप कर लेता है, तो आप बस यह करें:

root@kitploit:~
self.credentials.code = /* the code */

और पिछले authenticate(with: completionHandler:) में completionHandler स्वचालित रूप से प्रतिक्रिया को पकड़ लेगा।

LoginWebViewController

root@kitploit:~
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 बनाए रखा है:

root@kitploit:~
// 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 इंस्टेंस से आसानी से सुलभ हैं।

root@kitploit:~
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, आदि) के साथ रहें।

योगदान

Pull requests और issues का स्वागत है।

लेखक

  • Mahdi Makhdumi (@TheM4hd1), 1.* अनुरक्षक
  • Stefano Bertagno (@sbertix), 2.* अनुरक्षक

हम सक्रिय रूप से अनुरक्षकों की तलाश कर रहे हैं।
अधिक जानकारी के लिए #244 देखें।

लाइसेंस

SwiftyInsta MIT लाइसेंस के तहत लाइसेंस प्राप्त है। अधिक जानकारी के लिए LICENSE देखें।

टूल डाउनलोड करें