Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Unicode Text Obfuscator</title>
- <style>
- * {
- margin: 0;
- padding: 0;
- box-sizing: border-box;
- }
- body {
- font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
- min-height: 100vh;
- padding: 20px;
- }
- .container {
- max-width: 1200px;
- margin: 0 auto;
- background: white;
- border-radius: 15px;
- box-shadow: 0 20px 40px rgba(0,0,0,0.1);
- overflow: hidden;
- }
- .header {
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
- color: white;
- padding: 30px;
- text-align: center;
- }
- .header h1 {
- font-size: 2.5em;
- margin-bottom: 10px;
- text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
- }
- .header p {
- opacity: 0.9;
- font-size: 1.1em;
- }
- .main-content {
- padding: 30px;
- }
- .section {
- margin-bottom: 30px;
- padding: 20px;
- border-radius: 10px;
- background: #f8f9fa;
- border-left: 4px solid #667eea;
- }
- .section h2 {
- color: #333;
- margin-bottom: 15px;
- font-size: 1.3em;
- }
- .input-group {
- margin-bottom: 20px;
- }
- .input-group label {
- display: block;
- margin-bottom: 5px;
- font-weight: 600;
- color: #555;
- }
- textarea {
- width: 100%;
- min-height: 120px;
- padding: 15px;
- border: 2px solid #ddd;
- border-radius: 8px;
- font-family: 'Courier New', monospace;
- font-size: 14px;
- resize: vertical;
- transition: border-color 0.3s;
- }
- textarea:focus {
- outline: none;
- border-color: #667eea;
- }
- .controls-grid {
- display: grid;
- grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
- gap: 20px;
- margin-bottom: 20px;
- }
- .checkbox-group {
- display: grid;
- grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
- gap: 10px;
- }
- .checkbox-item {
- display: flex;
- align-items: center;
- padding: 10px;
- background: white;
- border-radius: 6px;
- border: 1px solid #ddd;
- transition: all 0.3s;
- cursor: pointer;
- user-select: none;
- }
- .checkbox-item:hover {
- background: #f0f0f0;
- border-color: #667eea;
- }
- .checkbox-item input[type="checkbox"] {
- margin-right: 10px;
- transform: scale(1.2);
- pointer-events: none;
- }
- .checkbox-item label {
- margin: 0;
- cursor: pointer;
- flex: 1;
- }
- .slider-container {
- margin: 20px 0;
- }
- .slider {
- width: 100%;
- height: 8px;
- border-radius: 4px;
- background: #ddd;
- outline: none;
- -webkit-appearance: none;
- }
- .slider::-webkit-slider-thumb {
- -webkit-appearance: none;
- appearance: none;
- width: 20px;
- height: 20px;
- border-radius: 50%;
- background: #667eea;
- cursor: pointer;
- }
- .slider::-moz-range-thumb {
- width: 20px;
- height: 20px;
- border-radius: 50%;
- background: #667eea;
- cursor: pointer;
- border: none;
- }
- .slider-value {
- text-align: center;
- font-weight: bold;
- color: #667eea;
- margin-top: 10px;
- }
- .button-group {
- display: flex;
- gap: 15px;
- flex-wrap: wrap;
- justify-content: center;
- margin: 20px 0;
- }
- button {
- padding: 12px 25px;
- border: none;
- border-radius: 8px;
- font-size: 16px;
- font-weight: 600;
- cursor: pointer;
- transition: all 0.3s;
- text-transform: uppercase;
- letter-spacing: 1px;
- }
- .btn-primary {
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
- color: white;
- }
- .btn-primary:hover {
- transform: translateY(-2px);
- box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
- }
- .btn-secondary {
- background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
- color: #333;
- }
- .btn-secondary:hover {
- transform: translateY(-2px);
- box-shadow: 0 5px 15px rgba(252, 182, 159, 0.4);
- }
- .seed-display {
- text-align: center;
- padding: 15px;
- background: #fff3cd;
- border-radius: 8px;
- margin: 20px 0;
- border: 1px solid #ffeaa7;
- }
- .seed-display strong {
- color: #856404;
- }
- .json-section {
- margin-top: 30px;
- padding: 20px;
- background: #f1f3f4;
- border-radius: 10px;
- }
- .json-input {
- width: 100%;
- min-height: 100px;
- padding: 15px;
- border: 2px solid #ddd;
- border-radius: 8px;
- font-family: 'Courier New', monospace;
- font-size: 14px;
- background: white;
- }
- .stats {
- display: grid;
- grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
- gap: 15px;
- margin: 20px 0;
- }
- .stat-item {
- text-align: center;
- padding: 15px;
- background: white;
- border-radius: 8px;
- border: 1px solid #ddd;
- }
- .stat-value {
- font-size: 1.5em;
- font-weight: bold;
- color: #667eea;
- }
- .stat-label {
- color: #666;
- font-size: 0.9em;
- }
- .mode-section {
- display: grid;
- grid-template-columns: 1fr 1fr;
- gap: 20px;
- }
- @media (max-width: 768px) {
- .mode-section {
- grid-template-columns: 1fr;
- }
- .controls-grid {
- grid-template-columns: 1fr;
- }
- }
- </style>
- </head>
- <body>
- <div class="container">
- <div class="header">
- <h1>🔀 Unicode Text Obfuscator</h1>
- <p>Transform text with Unicode look-alikes and special characters</p>
- </div>
- <div class="main-content">
- <div class="section">
- <h2>📝 Input Text</h2>
- <div class="input-group">
- <label for="inputText">Enter your text:</label>
- <textarea id="inputText" placeholder="Type or paste your text here...">Hello World! This is a test text with numbers 12345 and symbols.</textarea>
- </div>
- </div>
- <div class="section">
- <h2>⚙️ Obfuscation Settings</h2>
- <div class="controls-grid">
- <div class="mode-section">
- <div>
- <h3>Character Types</h3>
- <div class="checkbox-group">
- <div class="checkbox-item" onclick="toggleCheckbox('exactLookalikes')">
- <input type="checkbox" id="exactLookalikes" checked>
- <label for="exactLookalikes">Exact Look-alikes</label>
- </div>
- <div class="checkbox-item" onclick="toggleCheckbox('similarLookalikes')">
- <input type="checkbox" id="similarLookalikes" checked>
- <label for="similarLookalikes">Similar Look-alikes</label>
- </div>
- <div class="checkbox-item" onclick="toggleCheckbox('spaces')">
- <input type="checkbox" id="spaces" checked>
- <label for="spaces">Spaces & Whitespace</label>
- </div>
- <div class="checkbox-item" onclick="toggleCheckbox('dots')">
- <input type="checkbox" id="dots" checked>
- <label for="dots">Dots & Punctuation</label>
- </div>
- <div class="checkbox-item" onclick="toggleCheckbox('numbers')">
- <input type="checkbox" id="numbers" checked>
- <label for="numbers">Numbers</label>
- </div>
- <div class="checkbox-item" onclick="toggleCheckbox('accented')">
- <input type="checkbox" id="accented" checked>
- <label for="accented">Accented Letters</label>
- </div>
- </div>
- </div>
- <div>
- <h3>Random Mode</h3>
- <div class="checkbox-group">
- <div class="checkbox-item" onclick="toggleCheckbox('randomMode')">
- <input type="checkbox" id="randomMode">
- <label for="randomMode">Enable Random Mode</label>
- </div>
- <div class="checkbox-item" onclick="toggleCheckbox('randomTypes')">
- <input type="checkbox" id="randomTypes">
- <label for="randomTypes">Random Character Types</label>
- </div>
- <div class="checkbox-item" onclick="toggleCheckbox('randomPositions')">
- <input type="checkbox" id="randomPositions">
- <label for="randomPositions">Random Positions</label>
- </div>
- <div class="checkbox-item" onclick="toggleCheckbox('randomIntensity')">
- <input type="checkbox" id="randomIntensity">
- <label for="randomIntensity">Random Intensity</label>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="slider-container">
- <label for="intensitySlider">Obfuscation Intensity:</label>
- <input type="range" id="intensitySlider" class="slider" min="0" max="100" value="50">
- <div class="slider-value" id="intensityValue">50%</div>
- </div>
- </div>
- <div class="seed-display">
- <strong>Current Seed:</strong> <span id="currentSeed">ABCD123456</span>
- <small>(Updates every 10 minutes)</small>
- </div>
- <div class="button-group">
- <button class="btn-primary" onclick="obfuscateText()">🔀 Obfuscate Text</button>
- <button class="btn-secondary" onclick="generateNewSeed()">🎲 New Seed</button>
- <button class="btn-secondary" onclick="copyOutput()">📋 Copy Output</button>
- <button class="btn-secondary" onclick="exportCurrentAsJSON()">💾 Export JSON</button>
- <button class="btn-secondary" onclick="clearAll()">🗑️ Clear All</button>
- </div>
- <div class="stats" id="stats" style="display: none;">
- <div class="stat-item">
- <div class="stat-value" id="originalLength">0</div>
- <div class="stat-label">Original Length</div>
- </div>
- <div class="stat-item">
- <div class="stat-value" id="changedChars">0</div>
- <div class="stat-label">Changed Characters</div>
- </div>
- <div class="stat-item">
- <div class="stat-value" id="changePercent">0%</div>
- <div class="stat-label">Actual Change %</div>
- </div>
- </div>
- <div class="section">
- <h2>📤 Output</h2>
- <div class="input-group">
- <label for="outputText">Obfuscated text:</label>
- <textarea id="outputText" readonly placeholder="Your obfuscated text will appear here..."></textarea>
- </div>
- </div>
- <div class="json-section">
- <h2>🔧 JSON API Mode</h2>
- <p>Use this format for programmatic access:</p>
- <div class="input-group">
- <label for="jsonInput">JSON Input:</label>
- <textarea id="jsonInput" class="json-input" placeholder='{"input": "Your text here", "exactLookalikes": true, "intensity": 50, "seed": "ABCD123456"}'></textarea>
- </div>
- <div class="button-group">
- <button class="btn-primary" onclick="processJSON()">⚡ Process JSON</button>
- <button class="btn-secondary" onclick="generateJSONTemplate()">📋 Generate Template</button>
- </div>
- <div class="input-group">
- <label for="jsonOutput">JSON Output:</label>
- <textarea id="jsonOutput" class="json-input" readonly placeholder="JSON output will appear here..."></textarea>
- </div>
- </div>
- </div>
- </div>
- <script>
- // Unicode look-alike mappings
- const unicodeMappings = {
- exactLookalikes: {
- 'A': ['А', 'Α'], 'a': ['а', 'α'],
- 'B': ['В', 'Β'], 'b': ['в', 'β'],
- 'C': ['С'], 'c': ['с'],
- 'E': ['Е', 'Ε'], 'e': ['е', 'ε'],
- 'H': ['Н', 'Η'], 'h': ['н', 'η'],
- 'I': ['І', 'Ι', 'Ⅰ'], 'i': ['і', 'ι', 'ⅰ'],
- 'J': ['ϳ'],
- 'K': ['К', 'Κ'], 'k': ['к', 'κ'],
- 'L': ['ⅼ'],
- 'M': ['М', 'Μ'], 'm': ['м'],
- 'N': ['Ν'], 'n': ['ν'],
- 'O': ['О', 'Ο'], 'o': ['о', 'ο', '০', '०'],
- 'P': ['Р', 'Ρ'], 'p': ['р', 'ρ'],
- 'S': ['Ѕ'], 's': ['ѕ'],
- 'T': ['Т', 'Τ'], 't': ['т', 'τ'],
- 'U': ['Υ'], 'u': ['υ', 'µ'],
- 'V': ['Ѵ'], 'v': ['ѵ', 'ν'],
- 'X': ['Х', 'Χ'], 'x': ['х', 'χ'],
- 'Y': ['У'], 'y': ['у'],
- 'Z': ['Ζ'], 'z': ['ζ'],
- '0': ['O', 'О', 'Ο', '০', '०'],
- '1': ['l', 'I', 'І'],
- '2': ['Z', 'Ζ'],
- '5': ['S', 'Ѕ'],
- '6': ['б'],
- '7': ['Τ', 'τ']
- },
- spaces: {
- ' ': ['\u00A0', '\u2000', '\u2001', '\u2002', '\u2003', '\u2004', '\u2005', '\u2006', '\u2007', '\u2008', '\u2009', '\u200A', '\u202F', '\u205F', '\u3000']
- },
- dots: {
- '.': ['·', '‧', '․', '܁', '⋅'],
- '-': ['‐', '‑', '‒', '–', '—', '―', '−']
- },
- accented: {
- 'A': ['À', 'Á', 'Â', 'Ã', 'Ä', 'Å', 'Ā', 'Ă', 'Ą', 'Ǎ'],
- 'a': ['à', 'á', 'â', 'ã', 'ä', 'å', 'ā', 'ă', 'ą', 'ǎ'],
- 'C': ['Ć', 'Ĉ', 'Ċ', 'Č', 'Ç', 'Ƈ'],
- 'c': ['ć', 'ĉ', 'ċ', 'č', 'ç', 'ƈ'],
- 'E': ['È', 'É', 'Ê', 'Ë', 'Ē', 'Ĕ', 'Ė', 'Ę', 'Ě'],
- 'e': ['è', 'é', 'ê', 'ë', 'ē', 'ĕ', 'ė', 'ę', 'ě'],
- 'I': ['Ì', 'Í', 'Î', 'Ï', 'Ĩ', 'Ī', 'Ĭ', 'Į', 'İ'],
- 'i': ['ì', 'í', 'î', 'ï', 'ĩ', 'ī', 'ĭ', 'į', 'ı'],
- 'N': ['Ñ', 'Ń', 'Ņ', 'Ň', 'Ŋ'],
- 'n': ['ñ', 'ń', 'ņ', 'ň', 'ŋ'],
- 'O': ['Ò', 'Ó', 'Ô', 'Õ', 'Ö', 'Ø', 'Ō', 'Ŏ', 'Ő', 'Ơ'],
- 'o': ['ò', 'ó', 'ô', 'õ', 'ö', 'ø', 'ō', 'ŏ', 'ő', 'ơ'],
- 'S': ['Ś', 'Ŝ', 'Ş', 'Š', 'Ș'],
- 's': ['ś', 'ŝ', 'ş', 'š', 'ș'],
- 'U': ['Ù', 'Ú', 'Û', 'Ü', 'Ũ', 'Ū', 'Ŭ', 'Ů', 'Ű', 'Ų', 'Ư'],
- 'u': ['ù', 'ú', 'û', 'ü', 'ũ', 'ū', 'ŭ', 'ů', 'ű', 'ų', 'ư'],
- 'Y': ['Ý', 'Ŷ', 'Ÿ', 'Ȳ', 'Ẏ'],
- 'y': ['ý', 'ŷ', 'ÿ', 'ȳ', 'ẏ'],
- 'Z': ['Ź', 'Ż', 'Ž'],
- 'z': ['ź', 'ż', 'ž']
- },
- similarLookalikes: {
- 'a': ['ª'], 'o': ['º'], 'l': ['ℓ'], 'e': ['℮'], 'h': ['ℎ', 'ℏ'],
- '2': ['²'], '3': ['³'], '1': ['¹'], '0': ['₀']
- }
- };
- let currentSeed = generateSeed();
- let seedTimer;
- // Initialize
- document.addEventListener('DOMContentLoaded', function() {
- updateSeedDisplay();
- startSeedTimer();
- // Update intensity display
- document.getElementById('intensitySlider').addEventListener('input', function() {
- document.getElementById('intensityValue').textContent = this.value + '%';
- });
- });
- function generateSeed() {
- const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
- let result = '';
- for (let i = 0; i < 10; i++) {
- result += chars.charAt(Math.floor(Math.random() * chars.length));
- }
- return result;
- }
- function updateSeedDisplay() {
- document.getElementById('currentSeed').textContent = currentSeed;
- }
- function startSeedTimer() {
- clearInterval(seedTimer);
- seedTimer = setInterval(() => {
- currentSeed = generateSeed();
- updateSeedDisplay();
- }, 10 * 60 * 1000); // 10 minutes
- }
- function generateNewSeed() {
- currentSeed = generateSeed();
- updateSeedDisplay();
- }
- function toggleCheckbox(id) {
- const checkbox = document.getElementById(id);
- checkbox.checked = !checkbox.checked;
- }
- function seedRandom(seed) {
- let hash = 0;
- for (let i = 0; i < seed.length; i++) {
- const char = seed.charCodeAt(i);
- hash = ((hash << 5) - hash) + char;
- hash = hash & hash; // Convert to 32-bit integer
- }
- return function() {
- hash = ((hash * 1103515245) + 12345) & 0x7fffffff;
- return hash / 0x7fffffff;
- };
- }
- function getActiveSettings() {
- return {
- exactLookalikes: document.getElementById('exactLookalikes').checked,
- similarLookalikes: document.getElementById('similarLookalikes').checked,
- spaces: document.getElementById('spaces').checked,
- dots: document.getElementById('dots').checked,
- numbers: document.getElementById('numbers').checked,
- accented: document.getElementById('accented').checked,
- randomMode: document.getElementById('randomMode').checked,
- randomTypes: document.getElementById('randomTypes').checked,
- randomPositions: document.getElementById('randomPositions').checked,
- randomIntensity: document.getElementById('randomIntensity').checked,
- intensity: parseInt(document.getElementById('intensitySlider').value),
- seed: currentSeed
- };
- }
- function obfuscateText(customSettings = null) {
- const settings = customSettings || getActiveSettings();
- const inputText = customSettings ? customSettings.input : document.getElementById('inputText').value;
- // Force new random seed for each obfuscation if not using custom settings
- if (!customSettings) {
- settings.seed = currentSeed + Date.now(); // Add timestamp for uniqueness
- }
- const rng = seedRandom(settings.seed);
- if (!inputText) {
- alert('Please enter some text to obfuscate.');
- return;
- }
- let result = inputText;
- let changedCount = 0;
- const originalLength = inputText.length;
- // Apply random mode modifications
- if (settings.randomMode) {
- if (settings.randomTypes) {
- const types = ['exactLookalikes', 'similarLookalikes', 'spaces', 'dots', 'numbers', 'accented'];
- types.forEach(type => {
- settings[type] = rng() > 0.5;
- });
- }
- if (settings.randomIntensity) {
- settings.intensity = Math.floor(rng() * 100);
- }
- }
- // Build active mappings
- const activeMappings = {};
- Object.keys(unicodeMappings).forEach(category => {
- if (settings[category]) {
- Object.assign(activeMappings, unicodeMappings[category]);
- }
- });
- // Apply obfuscation, THIS WAS MADE BY AA17,DM25
- result = result.split('').map((char, index) => {
- if (activeMappings[char] && rng() * 100 < settings.intensity) {
- const alternatives = activeMappings[char];
- const chosen = alternatives[Math.floor(rng() * alternatives.length)];
- if (chosen !== char) changedCount++;
- return chosen;
- }
- return char;
- }).join('');
- // Update UI
- if (!customSettings) {
- document.getElementById('outputText').value = result;
- updateStats(originalLength, changedCount);
- }
- return {
- input: inputText,
- output: result,
- settings: settings,
- stats: {
- originalLength: originalLength,
- changedCharacters: changedCount,
- changePercentage: originalLength > 0 ? ((changedCount / originalLength) * 100).toFixed(1) : 0
- }
- };
- }
- function updateStats(originalLength, changedCount) {
- document.getElementById('originalLength').textContent = originalLength;
- document.getElementById('changedChars').textContent = changedCount;
- document.getElementById('changePercent').textContent =
- originalLength > 0 ? ((changedCount / originalLength) * 100).toFixed(1) + '%' : '0%';
- document.getElementById('stats').style.display = 'grid';
- }
- function copyOutput() {
- const outputText = document.getElementById('outputText');
- outputText.select();
- document.execCommand('copy');
- const button = event.target;
- const originalText = button.textContent;
- button.textContent = '✅ Copied!';
- button.style.background = 'linear-gradient(135deg, #00b894 0%, #00a085 100%)';
- setTimeout(() => {
- button.textContent = originalText;
- button.style.background = 'linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%)';
- }, 2000);
- }
- function clearAll() {
- document.getElementById('inputText').value = '';
- document.getElementById('outputText').value = '';
- document.getElementById('jsonInput').value = '';
- document.getElementById('jsonOutput').value = '';
- document.getElementById('stats').style.display = 'none';
- }
- function exportCurrentAsJSON() {
- const inputText = document.getElementById('inputText').value;
- if (!inputText) {
- alert('Please enter some text first.');
- return;
- }
- const result = obfuscateText();
- if (result) {
- const exportData = {
- timestamp: new Date().toISOString(),
- ...result
- };
- const dataStr = JSON.stringify(exportData, null, 2);
- const dataBlob = new Blob([dataStr], {type: 'application/json'});
- const link = document.createElement('a');
- link.href = URL.createObjectURL(dataBlob);
- link.download = `obfuscated_text_${new Date().toISOString().split('T')[0]}.json`;
- link.click();
- // Clean up
- URL.revokeObjectURL(link.href);
- // Show feedback
- const button = event.target;
- const originalText = button.textContent;
- button.textContent = '✅ Exported!';
- button.style.background = 'linear-gradient(135deg, #00b894 0%, #00a085 100%)';
- setTimeout(() => {
- button.textContent = originalText;
- button.style.background = 'linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%)';
- }, 2000);
- }
- }
- function generateJSONTemplate() {
- const template = {
- input: "Your text here",
- exactLookalikes: true,
- similarLookalikes: true,
- spaces: true,
- dots: true,
- numbers: true,
- accented: true,
- randomMode: false,
- randomTypes: false,
- randomPositions: false,
- randomIntensity: false,
- intensity: 50,
- seed: currentSeed
- };
- document.getElementById('jsonInput').value = JSON.stringify(template, null, 2);
- }
- function processJSON() {
- try {
- const jsonInput = document.getElementById('jsonInput').value;
- const settings = JSON.parse(jsonInput);
- if (!settings.input) {
- throw new Error('Input text is required');
- }
- const result = obfuscateText(settings);
- document.getElementById('jsonOutput').value = JSON.stringify(result, null, 2);
- } catch (error) {
- alert('Invalid JSON format: ' + error.message);
- document.getElementById('jsonOutput').value = JSON.stringify({
- error: error.message,
- timestamp: new Date().toISOString()
- }, null, 2);
- }
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment