Convert Figma logo to code with AI

bartobri logono-more-secrets

A command line tool that recreates the famous data decryption effect seen in the 1992 movie Sneakers.

7,526
292
7,526
2

Top Related Projects

3,966

Terminal based "The Matrix" like implementation

Animated pipes terminal screensaver

21,911

🖼️ A command-line system information tool written in bash 3.2+

4,126

Cross-platform Audio Visualizer

Quick Overview

No More Secrets is a command-line tool and library that recreates the famous data decryption effect from the 1992 hacker movie "Sneakers". It provides a fun and nostalgic way to animate text on the terminal, making it appear as if it's being decrypted in real-time.

Pros

  • Adds a cool, retro-style visual effect to terminal output
  • Easy to integrate with existing command-line tools and scripts
  • Customizable animation speed and character set
  • Lightweight and portable C implementation

Cons

  • Limited practical use beyond visual aesthetics
  • May slow down terminal output for large amounts of text
  • Requires ncurses library, which might not be available on all systems
  • Could be distracting in professional or production environments

Code Examples

  1. Basic usage with a string:
#include "nms.h"

int main() {
    char *string = "No More Secrets";
    nms_exec(string);
    return 0;
}
  1. Using a custom character set:
#include "nms.h"

int main() {
    char *string = "Custom characters";
    NmsArgs args = INIT_NMSARGS;
    args.set_char_options = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
    nms_exec_with_options(string, &args);
    return 0;
}
  1. Reading from stdin:
#include "nms.h"
#include <stdio.h>

int main() {
    char buffer[1024];
    size_t bytes_read = fread(buffer, 1, sizeof(buffer), stdin);
    buffer[bytes_read] = '\0';
    nms_exec(buffer);
    return 0;
}

Getting Started

To use No More Secrets in your project:

  1. Clone the repository:

    git clone https://github.com/bartobri/no-more-secrets.git
    
  2. Build and install:

    cd no-more-secrets
    make
    sudo make install
    
  3. Include the header in your C file:

    #include <nms.h>
    
  4. Compile your program with the nms library:

    gcc your_program.c -lnms -o your_program
    

Competitor Comparisons

3,966

Terminal based "The Matrix" like implementation

Pros of cmatrix

  • More visually appealing with customizable colors and characters
  • Offers additional display options like scrolling speed and async mode
  • Actively maintained with recent updates and improvements

Cons of cmatrix

  • Limited to a single visual effect (Matrix-style rain)
  • Requires ncurses library, which may not be available on all systems
  • Larger codebase, potentially more complex to modify or extend

Code Comparison

cmatrix:

void matrix(int force_update)
{
    static int pause = 0;
    int i, y, z, count;
    static int first = 1;
    // ... (additional code)
}

no-more-secrets:

void nms_exec(char *string)
{
    nms_set_foreground_color(NMS_COLOR_GREEN);
    nms_set_return_opts("Press ENTER to continue");
    nms_exec_string(string);
}

cmatrix focuses on creating a dynamic visual effect, while no-more-secrets emphasizes text decryption animation. cmatrix offers more customization options for its specific effect, whereas no-more-secrets provides a simpler API for applying its effect to any text input.

Animated pipes terminal screensaver

Pros of pipes.sh

  • More visually dynamic with animated pipes
  • Customizable appearance with various options
  • Lightweight and easy to install

Cons of pipes.sh

  • Less practical for real-world applications
  • Limited to terminal-based visual effects

Code Comparison

pipes.sh:

#!/usr/bin/env bash
# Example of pipes.sh usage
pipes.sh -t 0 -f 60 -R

no-more-secrets:

// Example of no-more-secrets usage
#include "nms.h"
nms_set_foreground_color(COLOR_GREEN);
nms_exec("Hello, World!");

Key Differences

  • pipes.sh focuses on creating visually appealing animations in the terminal
  • no-more-secrets simulates the decryption effect from the movie "Sneakers"
  • pipes.sh is written in Bash, while no-more-secrets is primarily in C
  • no-more-secrets can be integrated into other applications as a library

Use Cases

  • pipes.sh: Terminal screensaver, visual entertainment
  • no-more-secrets: Adding cinematic effects to text output, creating immersive CLI experiences

Community and Maintenance

  • Both projects are open-source and available on GitHub
  • pipes.sh has more recent updates and active community contributions
  • no-more-secrets has a larger number of stars and forks on GitHub
21,911

🖼️ A command-line system information tool written in bash 3.2+

Pros of neofetch

  • More feature-rich, providing comprehensive system information
  • Highly customizable with various display options
  • Actively maintained with frequent updates

Cons of neofetch

  • Larger codebase, potentially more complex to understand
  • May provide more information than needed for some users
  • Requires more system resources to run

Code Comparison

neofetch (bash):

get_distro() {
    [[ -f /etc/os-release || -f /usr/lib/os-release ]] && {
        # shellcheck source=/dev/null
        . /etc/os-release 2>/dev/null || . /usr/lib/os-release 2>/dev/null
        distro="${NAME:-${PRETTY_NAME}}"
    }
}

no-more-secrets (C):

void nms_set_foreground_color(char *color) {
    if (color && strlen(color) > 0) {
        strcpy(foreground_color, color);
    } else {
        strcpy(foreground_color, COLOR_FG);
    }
}

While neofetch focuses on system information retrieval and display, no-more-secrets is designed for text decryption animation. neofetch's code snippet shows OS detection, while no-more-secrets' code handles color settings. neofetch is more complex and feature-rich, while no-more-secrets is more focused on a specific visual effect.

4,126

Cross-platform Audio Visualizer

Pros of cava

  • Real-time audio visualization functionality
  • Customizable color schemes and visual styles
  • Supports various audio input sources (ALSA, pulseaudio, etc.)

Cons of cava

  • More complex setup and configuration required
  • Limited to audio visualization, less versatile than no-more-secrets
  • Requires audio input to function, not suitable for text-based data

Code comparison

cava (audio visualization):

for (i = 0; i < bars; i++) {
    if (f[i] > flast[i])
        f[i] = flast[i] * damping + f[i] * (1 - damping);
    flast[i] = f[i];
}

no-more-secrets (text decryption effect):

for (i = 0; i < nms->width; ++i) {
    if (nms->matrix[y][i].is_space) {
        continue;
    }
    nms->matrix[y][i].mask = 1;
}

Summary

cava is a specialized audio visualization tool with real-time capabilities and customizable visuals, while no-more-secrets focuses on creating a text decryption effect. cava offers more advanced audio-related features but requires audio input and more setup. no-more-secrets is simpler to use and more versatile for text-based applications but lacks audio functionality.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Version

Like this project? Consider tipping me: https://github.com/sponsors/bartobri

No More Secrets

This project provides a command line tool called nms that recreates the famous data decryption effect seen on screen in the 1992 hacker movie Sneakers. For reference, you can see this effect at 0:35 in this movie clip.

This command works on piped data. Pipe any ASCII or UTF-8 text to nms, and it will apply the Hollywood effect, initially showing encrypted data, then starting a decryption sequence to reveal the original plain-text characters.

Screenshot

Also included in this project is a program called sneakers that recreates what we see in the above movie clip. Note that this program requires the user to select one of the menu options before it terminates.

Screenshot

By default, this project has no dependencies, but it does rely on ANSI/VT100 terminal escape sequences to recreate the effect. Most modern terminal programs support these sequences so this should not be an issue for most users. If yours does not, this project also provides a ncurses implementation which supports non-ANSI terminals, but at the expense of losing the inline functionality (ncurses will always clear the screen prior to displaying output).

Table of Contents

  1. Download and Install
  2. Usage
  3. The NMS Library
  4. License

Download and Install

More and more Unix/Linux platforms are including this project in their package manager. You may wish to search your package manager to see if it is an installation option. If you install from a package manager, please check that you have the latest version (nms -v). If not, I suggest installing from source by following the instructions below.

To install this project from source, you will need to have the tools git, gcc, and make to download and build it. Install them from your package manager if they are not already installed.

Once you have the necessary tools installed, follow these instructions:

Install:

$ git clone https://github.com/bartobri/no-more-secrets.git
$ cd ./no-more-secrets
$ make nms
$ make sneakers             ## Optional
$ sudo make install

Uninstall:

$ sudo make uninstall

Install with Ncurses Support

If your terminal does not support ANSI/VT100 escape sequences, the effect may not render properly. This project provides a ncurses implementation for such cases. You will need the ncurses library installed. Install this library from your package manager. Next, follow these instructions:

$ git clone https://github.com/bartobri/no-more-secrets.git
$ cd ./no-more-secrets
$ make nms-ncurses
$ make sneakers-ncurses     ## Optional
$ sudo make install

Usage

nms works on piped data. Pipe any ASCII or UTF-8 characters to it and enjoy the magic. In the below examples, I use a simple directory listing.

$ ls -l | nms
$ ls -l | nms -a           // Set auto-decrypt flag
$ ls -l | nms -s           // Set flag to mask space characters
$ ls -l | nms -f green     // Set foreground color to green
$ ls -l | nms -c           // Clear screen
$ nms -v                   // Display version

Note that by default, after the initial encrypted characters are displayed, nms will wait for the user to press a key before initiating the decryption sequence. This is how the it is depicted in the movie.

Command Line Options

-a

Set the auto-decrypt flag. This will automatically start the decryption sequence without requiring a key press.

-s

Set a flag to mask space characters. This will only mask single blank space characters. Other space characters such as tabs and newlines will not be masked.

-f <color>

Set the foreground color of the decrypted text to the color specified. Valid options are white, yellow, black, magenta, blue, green, or red. This is blue by default.

-c

Clear the screen prior to printing any output. Specifically, it saves the state of the terminal (all current output), and restores it once the effect is completed. Note that when using this option, nms requires the user to press a key before restoring the terminal.

-v

Display version info.

The NMS Library

For those who would like to use this effect in their own projects, I have created a C library that provides simple interface and can easily be used for any program that runs from the command line.

See LibNMS for more info.

License

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License. See LICENSE for more details.