Facebook
From HU, 4 Months ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 138
  1. первый
  2. вставляется в макаку --> открываешь страницу в гитхабе --> нажимаешь --> ??? --> ключи со страницы в файле
  3.  
  4. второй
  5.  
  6.  
  7.  
  8. // ==UserScript==
  9. // @name         GitHub Extractor
  10. // @namespace    http://tampermonkey.net/
  11. // @version      1.3
  12. // @description  Извлекает строки, начинающиеся с "xai-" и содержащие 80 символов, ключи Anthropic, GPT, Deepseek, nvapi и сохраняет их в файл
  13. // @author       Вы
  14. // @match        https://github.com/*
  15. // @grant        none
  16. // ==/UserScript==
  17.  
  18. (function () {
  19.     'use strict';
  20.  
  21.     // Функция для сохранения данных в файл
  22.     function saveToFile(filename, data) {
  23.         const blob = new Blob([data], { type: 'text/plain' });
  24.         const link = document.createElement('a');
  25.         link.href = URL.createObjectURL(blob);
  26.         link.download = filename;
  27.         link.click();
  28.     }
  29.  
  30.     // Функция для извлечения строк
  31.     function extractStrings() {
  32.         // Регулярные выражения для поиска строк
  33.         const patternXAI = /xai-[a-zA-Z0-9]{80}/g;
  34.         const patternAnthropic = /sk-ant-api[a-zA-Z0-9-_]{98}/g;
  35.         const patternGPT = /sk-[a-zA-Z0-9]{48}/g;
  36.         const patternDeepseek = /sk-[a-f0-9]{32}/g;
  37.         const patternNvapi = /nvapi-\S{64}/g; // Новый формат ключей
  38.  
  39.         // Получение HTML-кода страницы
  40.         const htmlContent = document.body[removed];
  41.  
  42.         // Поиск совпадений
  43.         const matchesXAI = htmlContent.match(patternXAI) || [];
  44.         const matchesAnthropic = htmlContent.match(patternAnthropic) || [];
  45.         const matchesGPT = htmlContent.match(patternGPT) || [];
  46.         const matchesDeepseek = htmlContent.match(patternDeepseek) || [];
  47.         const matchesNvapi = htmlContent.match(patternNvapi) || [];
  48.  
  49.         // Объединяем и удаляем дубликаты
  50.         const allMatches = [...new Set([
  51.             ...matchesXAI,
  52.             ...matchesAnthropic,
  53.             ...matchesGPT,
  54.             ...matchesDeepseek,
  55.             ...matchesNvapi
  56.         ])];
  57.  
  58.         if (allMatches.length > 0) {
  59.             // Сохранение в файл
  60.             saveToFile('results.txt', allMatches.join('\n'));
  61.             alert(`Найдено ${allMatches.length} строк. Они сохранены в файл results.txt.`);
  62.         } else {
  63.             alert('Совпадений не найдено.');
  64.         }
  65.     }
  66.  
  67.     // Добавление кнопки на страницу для запуска скрипта
  68.     const button = document.createElement('button');
  69.     button.textContent = 'Extract Strings';
  70.     button.style.position = 'fixed';
  71.     button.style.top = '10px';
  72.     button.style.right = '10px';
  73.     button.style.zIndex = 1000;
  74.     button.style.padding = '10px';
  75.     button.style.backgroundColor = '#28a745';
  76.     button.style.color = 'white';
  77.     button.style.border = 'none';
  78.     button.style.borderRadius = '5px';
  79.     button.style.cursor = 'pointer';
  80.  
  81.     button.addEventListener('click', extractStrings);
  82.  
  83.     document.body.appendChild(button);
  84. })();
  85.  

Replies to Untitled rss

Title Name Language When
Re: Untitled Аноним text 4 Months ago.