Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save naveenadi/185f024db1fb2fae995461437ccebb90 to your computer and use it in GitHub Desktop.
Save naveenadi/185f024db1fb2fae995461437ccebb90 to your computer and use it in GitHub Desktop.

Revisions

  1. @dannote dannote revised this gist Nov 21, 2024. 1 changed file with 20 additions and 2 deletions.
    22 changes: 20 additions & 2 deletions final-cut-pro-trial-reset.swift
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,26 @@
    #!/usr/bin/swift

    // DISCLAIMER

    // This script modifies an unencrypted file associated with the trial version of Final Cut Pro.
    // Under the DMCA (17 U.S.C. § 1201), this modification does not qualify as circumvention of a technological
    // protection measure (TPM), as it does not involve bypassing encryption, authentication, or similar protections.
    // Distributing this code is therefore legal under the DMCA.

    // This script is intended for educational and research purposes, such as exploring trial-related file structures,
    // or for system troubleshooting in controlled environments with explicit permissions. It is not intended to be used
    // in a manner that violates Apple's software license agreement.

    // WARNING

    // Using this script to reset or extend the trial period of Final Cut Pro without Apple's authorization likely violates
    // the software license agreement. Such actions may lead to legal consequences. The responsibility for compliance with
    // all applicable laws and agreements lies solely with the user. The author of this script assumes no liability for misuse
    // or any resulting consequences.

    import Foundation

    let path = URL(fileURLWithPath: NSString(string: "~/Library/Application Support/.ffuserdata").expandingTildeInPath)
    let path = URL(fileURLWithPath: NSString(string: "~/Library/Containers/com.apple.FinalCutTrial/Data/Library/Application Support/.ffuserdata").expandingTildeInPath)
    let data = try! NSData(contentsOf: path) as Data
    let dictionary = try! NSKeyedUnarchiver.unarchiveTopLevelObjectWithData(data) as! NSDictionary
    let mutableDictionary = dictionary.mutableCopy() as! NSMutableDictionary
    @@ -15,4 +33,4 @@ for (key, value) in mutableDictionary {

    try! NSKeyedArchiver.archivedData(withRootObject: mutableDictionary, requiringSecureCoding: false).write(to: path)

    print("You'd better buy it")
    print("You'd better buy it")
  2. @dannote dannote revised this gist Jan 8, 2019. 1 changed file with 7 additions and 6 deletions.
    13 changes: 7 additions & 6 deletions final-cut-pro-trial-reset.swift
    Original file line number Diff line number Diff line change
    @@ -2,16 +2,17 @@

    import Foundation

    let path = NSString(string: "~/Library/Application Support/.ffuserdata").expandingTildeInPath
    let data = NSKeyedUnarchiver.unarchiveObject(withFile: path) as! NSDictionary
    let mutableData = data.mutableCopy() as! NSMutableDictionary
    let path = URL(fileURLWithPath: NSString(string: "~/Library/Application Support/.ffuserdata").expandingTildeInPath)
    let data = try! NSData(contentsOf: path) as Data
    let dictionary = try! NSKeyedUnarchiver.unarchiveTopLevelObjectWithData(data) as! NSDictionary
    let mutableDictionary = dictionary.mutableCopy() as! NSMutableDictionary

    for (key, value) in mutableData {
    for (key, value) in mutableDictionary {
    if value is NSDate {
    mutableData[key] = Date()
    mutableDictionary[key] = Date()
    }
    }

    NSKeyedArchiver.archiveRootObject(mutableData, toFile: path)
    try! NSKeyedArchiver.archivedData(withRootObject: mutableDictionary, requiringSecureCoding: false).write(to: path)

    print("You'd better buy it")
  3. @dannote dannote created this gist Dec 8, 2017.
    17 changes: 17 additions & 0 deletions final-cut-pro-trial-reset.swift
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    #!/usr/bin/swift

    import Foundation

    let path = NSString(string: "~/Library/Application Support/.ffuserdata").expandingTildeInPath
    let data = NSKeyedUnarchiver.unarchiveObject(withFile: path) as! NSDictionary
    let mutableData = data.mutableCopy() as! NSMutableDictionary

    for (key, value) in mutableData {
    if value is NSDate {
    mutableData[key] = Date()
    }
    }

    NSKeyedArchiver.archiveRootObject(mutableData, toFile: path)

    print("You'd better buy it")