A multi-platform cybersecurity quiz application available both as a terminal interface and modern web application. This app helps users test and improve their cybersecurity knowledge through randomized questions and an advanced scoring system.
- 15 Comprehensive Questions: SQL Injection, Network Security, Attack Vectors, Security Tools
- Randomized Quizzes: Different questions every session
- Flexible Length: Choose 1-15 questions per quiz
- Multiple Choice: A, B, C, D format questions
- Immediate Feedback: Correct/Wrong answers with detailed explanations
- ANSI Colorful Interface: Attractive colors in terminal
- Text-based Animations: Loading bars and progress indicators
- Cross-platform: Windows, macOS, Linux support
- Lightweight: Minimal resource usage
- Modern UI Design: Glass-morphism and gradient backgrounds
- Advanced Animations:
- Smooth screen transitions
- Floating particle effects
- Pulse/shake answer feedback
- Bouncing result badges
- Interactive Elements:
- Range slider for question selection
- Click-based answer selection
- Animated progress bar with moving stripes
- Responsive Design: Mobile and desktop friendly
- Instant Learning: Detailed explanation for every question
- Score Tracking: Real-time performance monitoring
- Repeat Practice: Play again option for continuous learning
Terminal Version:
- Python 3.x installed on your system
- Terminal/Command Prompt access
Web Version:
- Modern web browser (Chrome, Firefox, Safari, Edge)
- No installation required!
-
Download the application:
git clone <repository-url> cd security-quiz-pro
-
Run the Python quiz:
python security_quiz_gui.py
-
Follow the prompts:
- Choose number of questions (1-15)
- Answer each question (A/B/C/D)
- Review your score and explanations
- Play again or exit
-
Simply open the file:
- Double-click
index.htmlfile - Or drag and drop into your browser
- Or run:
start index.html(Windows) /open index.html(macOS)
- Double-click
-
Enjoy the modern interface:
- Use the slider to select questions (1-15)
- Click "Start Quiz π" to begin
- Click on your answers (A/B/C/D)
- Watch animated feedback and explanations
- Get your final score with performance grade
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β π SECURITY QUIZ PRO π β
β Test Your Cybersecurity Knowledge! β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
How many questions? (1β15) : 5
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Question 1/5
What does 'SQL Injection' allow an attacker to do?
A) Crash the web server
B) Execute arbitrary SQL commands on the database
C) Intercept network traffic
D) Crack password hashes
Your answer (A/B/C/D): B
π QUIZ COMPLETE!
Score: 4 / 5 (80.0%)
π₯ Excellent! Strong security knowledge.
| Topic | Examples |
|---|---|
| Web Security | SQL Injection, HTTPS vs HTTP |
| Network Security | SFTP, Firewalls, Network Analysis |
| Attack Vectors | Phishing, DoS, Man-in-the-Middle |
| Malware | Ransomware, Zero-Day vulnerabilities |
| Security Practices | MFA, Least Privilege, CIA Triad |
| Tools & Commands | Wireshark, netstat, Linux security |
| Cryptography | Hash algorithms, Encryption practices |
| Score Range | Grade | Description |
|---|---|---|
| 100% | π Perfect Score | Security Expert! |
| 80-99% | π₯ Excellent | Strong security knowledge |
| 60-79% | π₯ Good | Keep studying |
| 40-59% | π₯ Fair | Review the basics |
| <40% | π Needs Improvement | Keep learning! |
Dual Platform Design:
- Terminal Version: Self-contained Python application
- Web Version: Single HTML file with embedded CSS/JS
- No External Dependencies: Pure vanilla implementations
- Cross-Platform: Works across all major platforms
- Memory Efficient: Lightweight with minimal resource usage
security_quiz_gui.py
βββ Question Bank (15 questions with explanations)
βββ Color Management (ANSI color codes)
βββ UI Helpers (animations, formatting)
βββ Quiz Logic (question flow, scoring)
βββ Main Application (user interaction)
index.html
βββ HTML Structure (semantic markup)
βββ CSS Styling (animations, responsive design)
βββ JavaScript Logic (quiz functionality)
βββ Question Bank (same 15 questions)
βββ Animation System (particles, transitions)
βββ Interactive UI (sliders, buttons, feedback)
- QUESTIONS: Dictionary containing all quiz questions, options, answers, explanations
- Color Class: ANSI color codes for terminal styling
- Quiz Functions: Question presentation, answer validation, scoring
- UI Functions: Banner, loading bars, result display
- HTML Structure: Semantic layout with multiple screens
- CSS Animations: Keyframes for smooth transitions and effects
- JavaScript State Management: Quiz flow and user interaction
- Responsive Design: Mobile-first approach with media queries
- Visual Effects: Particle system, gradient backgrounds, hover states
Through this quiz app, users will learn:
- Fundamental Security Concepts: CIA Triad, Zero-Day vulnerabilities
- Attack Methods: SQL Injection, Phishing, DoS attacks
- Security Protocols: HTTPS, SFTP, SSL/TLS
- Security Tools: Firewalls, Wireshark, Linux commands
- Best Practices: MFA, Least Privilege, Secure coding
- Threat Landscape: Ransomware, Man-in-the-Middle attacks
{
"question": "Your new security question?",
"options": [
"A) First option",
"B) Second option",
"C) Third option",
"D) Fourth option"
],
"answer": "B",
"explanation": "Detailed explanation of why B is correct."
}{
question: "Your new security question?",
options: [
"First option",
"Second option",
"Third option",
"Fourth option"
],
correct: 1, // Index of correct answer (0-based)
explanation: "Detailed explanation of why the second option is correct."
}class Color:
RESET = "\033[0m"
RED = "\033[91m"
GREEN = "\033[92m"
# Add your custom colors hereContributions are welcome to improve this project:
- Fork the repository
- Create a feature branch (
git checkout -b feature/new-questions) - Add your questions or improvements
- Commit changes (
git commit -am 'Add new security questions') - Push to branch (
git push origin feature/new-questions) - Create a Pull Request
- Add more cybersecurity questions
- Implement difficulty levels
- Add timer functionality
- Create question categories
- Improve visual design
- Add progress tracking
- Multi-language support
- Dark/Light theme toggle
- Python Version: 3.6 or higher
- Terminal: ANSI color support preferred
- OS: Windows, macOS, Linux compatible
- Memory: Minimal requirements (< 10MB)
- Browser: Modern web browsers (Chrome 60+, Firefox 60+, Safari 12+, Edge 79+)
- JavaScript: ES6+ support required
- Storage: < 1MB file size
- Network: No internet connection required
- Terminal must support ANSI colors for best experience
- Single session only (no persistent score storage)
- Questions are hardcoded (no external file loading)
- Requires JavaScript enabled
- No server-side storage (client-side only)
- Performance depends on browser capabilities
If you encounter any issues or have suggestions:
- Create an issue in the GitHub repository
- Check existing documentation
- Review the code comments for understanding
- Submit feature requests through GitHub Issues
This educational tool:
- Contains no sensitive data collection
- Runs entirely offline (no network requests)
- Uses no external dependencies that could pose security risks
- Follows secure coding practices for educational purposes
This project is open source and available under the MIT License. Feel free to use, modify, and distribute for educational purposes.
- Cybersecurity Community: For knowledge sharing and educational resources
- Python Community: For excellent documentation and best practices
- Web Standards: For modern browser capabilities enabling rich interactive experiences
- Educational Institutions: For promoting cybersecurity awareness
- Question Bank: 15 carefully curated questions
- Code Quality: Well-documented, modular design
- Accessibility: Cross-platform compatibility
- Learning Focus: Practical cybersecurity knowledge
- User Experience: Both terminal and web interfaces
Happy Learning! Stay Secure! π
Made with β€οΈ for the cybersecurity community
- Add more questions (target: 50+ questions)
- Implement difficulty levels (Beginner, Intermediate, Advanced)
- Add timer mode for timed challenges
- Question categories for focused learning
- Multi-language support
- Progress tracking and analytics
- Online leaderboard
- Custom quiz creation
- Mobile app version