первый вставляется в макаку --> открываешь страницу в гитхабе --> нажимаешь --> ??? --> ключи со страницы в файле второй // ==UserScript== // @name GitHub Extractor // @namespace http://tampermonkey.net/ // @version 1.3 // @description Извлекает строки, начинающиеся с "xai-" и содержащие 80 символов, ключи Anthropic, GPT, Deepseek, nvapi и сохраняет их в файл // @author Вы // @match https://github.com/* // @grant none // ==/UserScript== (function () { 'use strict'; // Функция для сохранения данных в файл function saveToFile(filename, data) { const blob = new Blob([data], { type: 'text/plain' }); const link = document.createElement('a'); link.href = URL.createObjectURL(blob); link.download = filename; link.click(); } // Функция для извлечения строк function extractStrings() { // Регулярные выражения для поиска строк const patternXAI = /xai-[a-zA-Z0-9]{80}/g; const patternAnthropic = /sk-ant-api[a-zA-Z0-9-_]{98}/g; const patternGPT = /sk-[a-zA-Z0-9]{48}/g; const patternDeepseek = /sk-[a-f0-9]{32}/g; const patternNvapi = /nvapi-\S{64}/g; // Новый формат ключей // Получение HTML-кода страницы const htmlContent = document.body[removed]; // Поиск совпадений const matchesXAI = htmlContent.match(patternXAI) || []; const matchesAnthropic = htmlContent.match(patternAnthropic) || []; const matchesGPT = htmlContent.match(patternGPT) || []; const matchesDeepseek = htmlContent.match(patternDeepseek) || []; const matchesNvapi = htmlContent.match(patternNvapi) || []; // Объединяем и удаляем дубликаты const allMatches = [...new Set([ ...matchesXAI, ...matchesAnthropic, ...matchesGPT, ...matchesDeepseek, ...matchesNvapi ])]; if (allMatches.length > 0) { // Сохранение в файл saveToFile('results.txt', allMatches.join('\n')); alert(`Найдено ${allMatches.length} строк. Они сохранены в файл results.txt.`); } else { alert('Совпадений не найдено.'); } } // Добавление кнопки на страницу для запуска скрипта const button = document.createElement('button'); button.textContent = 'Extract Strings'; button.style.position = 'fixed'; button.style.top = '10px'; button.style.right = '10px'; button.style.zIndex = 1000; button.style.padding = '10px'; button.style.backgroundColor = '#28a745'; button.style.color = 'white'; button.style.border = 'none'; button.style.borderRadius = '5px'; button.style.cursor = 'pointer'; button.addEventListener('click', extractStrings); document.body.appendChild(button); })();