Skip to content
KitploitKITPLOIT
도구블로그
제출
도구블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

··피드·문의·개인정보·© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
SwiftyInsta — Instagram 비공개 API Swift | Kitploit
도구/GitHubGitHub/them4hd1/swiftyinsta
OSINT (Open Source Intelligence)Scripting & AutomationInformation GatheringSocial Engineering
GitHubthem4hd1/swiftyinsta

SwiftyInsta

Instagram 비공개 API Swift

저장소 보기
2304974년 전Kitploit 검토 완료

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

SwiftyInsta (레거시)

SwiftyInsta는 더 이상 활발히 유지 관리되지 않습니다.
자세한 내용은 #244를 참조하세요.
최신 대안을 찾고 계신다면 Swiftagram을 확인해보세요.


CI Status Version License Platform

Instagram은 개발자에게 두 종류의 API를 제공합니다. Instagram API Platform (기능이 매우 제한적이며 곧 중단될 예정)과, 비즈니스 및 크리에이터 계정 전용인 Instagram Graph API입니다.

그러나 Instagram 앱은 세 번째 유형의 API, 소위 Private API 또는 _비공식 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

CocoaPods를 사용하여 SwiftyInsta를 Xcode 프로젝트에 통합하려면 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 */
        }
    }
}

사용자가 2단계 인증 코드 또는 챌린지 코드를 입력하면 다음과 같이 하면 됩니다.

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를 참조하세요.

도구 다운로드