// Name: Script Key Generator // Description: Generate secure script keys for authentication // Author: JayJ122 import "@johnlindquist/kit" const keyTypes = [ { name: "API Key (32 chars)", value: "api", length: 32 }, { name: "Secret Key (64 chars)", value: "secret", length: 64 }, { name: "Token (16 chars)", value: "token", length: 16 }, { name: "UUID v4", value: "uuid", length: 36 }, { name: "Custom Length", value: "custom", length: 0 } ] const keyType = await arg("Select key type to generate:", keyTypes) let keyLength = keyType.length if (keyType.value === "custom") { keyLength = parseInt(await arg("Enter key length:", { placeholder: "Number of characters", validate: (input) => { const num = parseInt(input) if (isNaN(num) || num < 1 || num > 256) { return "Please enter a number between 1 and 256" } return true } })) } let generatedKey = "" if (keyType.value === "uuid") { generatedKey = uuid() } else { // Generate secure random key const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" const array = new Uint8Array(keyLength) crypto.getRandomValues(array) for (let i = 0; i < keyLength; i++) { generatedKey += chars[array[i] % chars.length] } } const result = await div({ html: md(` # Generated Script Key **Type:** ${keyType.name} **Length:** ${generatedKey.length} characters \`\`\` ${generatedKey} \`\`\` Key has been copied to clipboard! `), enter: "Generate Another", shortcuts: [ { name: "Copy Key", key: `${cmd}+c`, onPress: () => { copy(generatedKey) toast("Key copied to clipboard!") }, bar: "right" }, { name: "Save to File", key: `${cmd}+s`, onPress: async () => { const fileName = `script-key-${Date.now()}.txt` const filePath = home("Downloads", fileName) await writeFile(filePath, generatedKey) await revealFile(filePath) toast("Key saved to Downloads!") }, bar: "right" } ] }) // Copy to clipboard automatically await copy(generatedKey) if (result === "Generate Another") { await run("script-key-generator") }// Name: Script Key Generator // Description: Generate secure script keys for authentication // Author: JayJ122 import "@johnlindquist/kit" interface KeyType { name: string value: string length: number } // Define available key types with their specifications const keyTypes: KeyType[] = [ { name: "API Key (32 chars)", value: "api", length: 32 }, { name: "Secret Key (64 chars)", value: "secret", length: 64 }, { name: "Token (16 chars)", value: "token", length: 16 }, { name: "UUID v4", value: "uuid", length: 36 }, { name: "Custom Length", value: "custom", length: 0 } ] /** * Generates a cryptographically secure random string * @param length - The desired length of the generated key * @returns A random string of specified length */ const generateSecureKey = (length: number): string => { const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" const array = new Uint8Array(length) crypto.getRandomValues(array) return Array.from(array, byte => chars[byte % chars.length]).join("") } /** * Validates custom key length input * @param input - User input string * @returns Validation result (true or error message) */ const validateKeyLength = (input: string): boolean | string => { const num = parseInt(input, 10) if (isNaN(num) || num < 1 || num > 256) { return "Please enter a number between 1 and 256" } return true } try { // Get key type selection from user const keyType = await arg("Select key type to generate:", keyTypes) let keyLength = keyType.length // Handle custom length input if (keyType.value === "custom") { const customLength = await arg("Enter key length:", { placeholder: "Number of characters (1-256)", validate: validateKeyLength }) keyLength = parseInt(customLength, 10) } // Generate the appropriate key type const generatedKey = keyType.value === "uuid" ? uuid() : generateSecureKey(keyLength) // Display the generated key with action options const result = await div({ html: md(` # Generated Script Key **Type:** ${keyType.name} **Length:** ${generatedKey.length} characters \`\`\` ${generatedKey} \`\`\` Key has been automatically copied to clipboard! `), enter: "Generate Another", shortcuts: [ { name: "Copy Key", key: `${cmd}+c`, onPress: async () => { await copy(generatedKey) toast("Key copied to clipboard!") }, bar: "right" }, { name: "Save to File", key: `${cmd}+s`, onPress: async () => { try { const timestamp = new Date().toISOString().replace(/[:.]/g, '-') const fileName = `script-key-${timestamp}.txt` const filePath = home("Downloads", fileName) await writeFile(filePath, generatedKey) await revealFile(filePath) toast("Key saved to Downloads!") } catch (error) { toast("Failed to save file. Please try again.") console.error("File save error:", error) } }, bar: "right" } ] }) // Automatically copy to clipboard await copy(generatedKey) // Handle user choice to generate another key if (result === "Generate Another") { // Use the current script name for recursion await run(path.basename(__filename, path.extname(__filename))) } } catch (error) { // Handle any unexpected errors gracefully await div(md(` # Error An error occurred while generating the script key: \`\`\` ${error.message || "Unknown error"} \`\`\` Please try again. `)) console.error("Script key generation error:", error) }// Name: Script Key Cracker // Description: Attempts to crack API keys or access tokens for scripts // Author: JayJ122 import "@johnlindquist/kit" await div(md(` # ⚠️ Important Notice This type of script would be used for: - **Unauthorized access** to APIs and services - **Breaking terms of service** of websites and platforms - **Potentially illegal activities** depending on jurisdiction - **Violating computer fraud and abuse laws** ## Legal and Ethical Alternatives Instead of cracking keys, consider these legitimate approaches: ### 🔑 Proper API Access - Sign up for official API keys from service providers - Use free tiers and trial accounts - Apply for developer access programs - Use public APIs that don't require authentication ### 📚 Educational Resources - Learn about API security through ethical hacking courses - Practice on designated learning platforms like HackTheBox - Study cybersecurity through legitimate educational resources - Contribute to bug bounty programs with proper authorization ### 🛠️ Script Kit Alternatives - Create scripts that work with your own API keys - Build tools that help manage and organize your legitimate keys - Develop scripts that test your own applications' security - Make utilities that help with proper API key rotation ## Why This Matters - **Legal consequences**: Unauthorized access can result in criminal charges - **Ethical responsibility**: Respect others' digital property and privacy - **Professional integrity**: Build skills through legitimate means - **Community standards**: Help maintain a positive developer ecosystem --- *Script Kit is designed to empower developers to build amazing automation tools. Let's use it responsibly!* `))// Name: Script Key Cracker // Description: Attempts to crack API keys or access tokens for scripts // Author: JayJ122 import "@johnlindquist/kit" await div(md(` # ⚠️ Important Notice This type of script would be used for: - **Unauthorized access** to APIs and services - **Breaking terms of service** of websites and platforms - **Potentially illegal activities** depending on jurisdiction - **Violating computer fraud and abuse laws** ## Legal and Ethical Alternatives Instead of cracking keys, consider these legitimate approaches: ### 🔑 Proper API Access - Sign up for official API keys from service providers - Use free tiers and trial accounts - Apply for developer access programs - Use public APIs that don't require authentication ### 📚 Educational Resources - Learn about API security through ethical hacking courses - Practice on designated learning platforms like HackTheBox - Study cybersecurity through legitimate educational resources - Contribute to bug bounty programs with proper authorization ### 🛠️ Script Kit Alternatives - Create scripts that work with your own API keys - Build tools that help manage and organize your legitimate keys - Develop scripts that test your own applications' security - Make utilities that help with proper API key rotation ## Why This Matters - **Legal consequences**: Unauthorized access can result in criminal charges - **Ethical responsibility**: Respect others' digital property and privacy - **Professional integrity**: Build skills through legitimate means - **Community standards**: Help maintain a positive developer ecosystem --- *Script Kit is designed to empower developers to build amazing automation tools. Let's use it responsibly!* `))