Coder Social home page Coder Social logo

bartobri / no-more-secrets Goto Github PK

View Code? Open in Web Editor NEW
7.5K 129.0 292.0 201 KB

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

License: GNU General Public License v3.0

C 90.64% Makefile 3.81% Roff 5.56%
hacker movie effect sneakers matrix terminal

no-more-secrets's Introduction

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.

no-more-secrets's People

Contributors

anthonysterling avatar apjanke avatar bartobri avatar corazzi avatar dbaio avatar humm42 avatar jubalh avatar livz avatar maxwellgerber avatar pnappa avatar rpdelaney avatar stephpavlou avatar susnux avatar thedrake avatar thuffir avatar trha avatar zerochaos- avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

no-more-secrets's Issues

No transparency support?

running the application creates a custom background (black) and then runs the text manipulation. You show on your example that it can use transparent terminals - This doesn't seem to be the effect for me.

Terminal emulator - gnome

"make install" target broken on macOS in 0.3.1

==> make prefix=/usr/local/Cellar/no-more-secrets/0.3.1 install
install -d /usr/local/Cellar/no-more-secrets/0.3.1/share/man/man6
install -m644 -t /usr/local/Cellar/no-more-secrets/0.3.1/share/man/man6 nms.6 sneakers.6
install: illegal option -- t
usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
               [-o owner] file1 file2
       install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
               [-o owner] file1 ... fileN directory
       install -d [-v] [-g group] [-m mode] [-o owner] directory ...
make: *** [install] Error 64

This was not broken in 0.3.0.

Build log here: https://bot.brew.sh/job/Homebrew%20Core/16712/version=sierra/consoleText

Speed flag for auto-decrypt

Is there any way you can implement a speed flag for auto-decrypt? I'd like to be able to make the "decryption" faster.

New release

There have been some PRs merged since last release in 2017. Would it be possible to have a new release so downstream doesn't have to carry patches?

will not install on fedora.

here is the error messages.

[tomc@fedora ~]$ git clone https://github.com/bartobri/no-more-secrets.git
cd ./no-more-secrets
make nms
make sneakers             ## Optional
sudo make install
fatal: destination path 'no-more-secrets' already exists and is not an empty directory.
cc -Wextra -Wall -O2 -o obj/input.o -c src/input.c
make: cc: No such file or directory
make: *** [Makefile:37: obj/input.o] Error 127
cc -Wextra -Wall -O2 -o obj/nmscharset.o -c src/nmscharset.c
make: cc: No such file or directory
make: *** [Makefile:37: obj/nmscharset.o] Error 127
install -d /usr/local/share/man/man6
install -m644 nms.6 sneakers.6 /usr/local/share/man/man6 
install -d /usr/local/bin
cd bin && install * /usr/local/bin
/bin/sh: line 1: cd: bin: No such file or directory
make: *** [Makefile:53: install] Error 1
[tomc@fedora no-more-secrets]$ 

Foreign characters

Hey!
It seems that characters like the tilde or a ñ (from spanish), keep their character instead of being revealed.
noooo

Speed option

I would like to suggest a command line option for setting the speed of the effect. For example how many seconds the effect would take to finish.

create basic website

to be acceptable as a formula for homebrew no-more-secrets needs some kind of homepage, could you possible add a simple one? Just a simple gh-pages is enough.

musl builds failing

Attempting to cross-compile to any musl arch results in the following error:

src/nmstermio.c: In function 'nmstermio_set_terminal': src/nmstermio.c:299:9: error: assignment of read-only variable 'stdin' 299 | stdin = freopen("/dev/tty", "r", stdin); | ^ make: *** [Makefile:37: obj/nmstermio.o] Error 1 => ERROR: no-more-secrets-1.0.1_1: do_build: '${make_cmd} CC="$CC" CXX="$CXX" LD="$LD" AR="$AR" RANLIB="$RANLIB" CPP="$CPP" AS="$AS" OBJCOPY="$OBJCOPY" OBJDUMP="$OBJDUMP" CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS" ${makejobs} ${make_build_args} ${make_build_target}' exited with 2 => ERROR: in do_build() at common/build-style/gnu-makefile.sh:9

Segfaults when input is piped from non-existant program

When I call a command that does not exist and pipe it's non existant output into nms it will segfault. Sample output:

zsh/4 1002 [4] % nonexistant | nms
zsh: command not found: nonexistant
zsh: exit 127                          nonexistant | 
                                                     zsh: segmentation fault (core dumped)  nms
                                                                                               %

Afterwards zsh behaves weirdly, indenting some output seemingly at random.

Some info:
x86_64
arch linux,
gcc 5.3.0,
zsh 5.2,
ncurses 6.0

Please refer to the docker image

Sad that you closed the pull request. I think, things should stick together.

Anyways, I moved the Dockerfile into a new github repository and pushed it to hub.docker.com here.

Would you mind to refer to it, so people can pick up on this, if they want to drive without installation or work around not supported OS like Windows?

Thanks, \C

'sneakers' command only works once

Executing the sneakers command works the first time, but running it a second time in the same iTerm session throws Abort trap: 6. Quitting and restarting iTerm allows it to be run one more time before throwing the same error.

This based on window size, I wasn't careful when attempting to reproduce.

Executing the sneakers command works with window width 242 but not 243 and throws Abort trap: 6. Number gathered from resizing my iTerm window and looking at the status bar. Height doesn't seem to matter.

Edit the second: It's not the absolute size, it seems to be the ratio between height and width that causes the error.

System:
macOS Sierra version 10.12.6

Switches -a and -f not working in El Capitan

OS: Mac OS X El Capitan.
Installation: brew

Switches -a and -f not working as described in documentation.

-a should automatically start effect
-f should change font color

How to reproduce:

  • Install no-more-secrets from brew, open a terminal, pick "Basic" from settings,
    type: brew install no-more-secrets
  • type: ls -lh /opt | nms -a (application will wait for a key press instead of automatically starts)
  • type: ls -lh /opt | nms -f green
    then press a key, wait for decryption effect, then you will notice that color doesn't change to green.

Video: https://youtu.be/QUNjFaupQeQ

libncurses regression on macOS

9d7ac87 has introduced a regression on macOS where the library is named libncurses not libncursesw:

gcc -Wextra -Wall -o obj/main.o -c src/main.c
gcc -Wextra -Wall -o bin/nms obj/nms.o obj/main.o -lncursesw
gcc -Wextra -Wall -o bin/sneakers obj/nms.o obj/sneakers.o -lncursesw
ld: library not found for -lncursesw
ld: library not found for -lncursesw
clang: error: linker command failed with exit code 1 (use -v to see invocation)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [sneakers] Error 1
make: *** Waiting for unfinished jobs....
make: *** [nms] Error 1

Feature Wish: Parameter to set "decryption" speed

It would be very nice to have an option to specify how long it should take. Maybe even two parameters: How long until the scrambled chars are written and then how long it takes to decrypt. With 0 being instantaneous.

Extra characters

Whenever I do anything involving the text decryption, it always adds a few extra characters on the end. The characters are both encrypted and decrypted. Usually the decrypted ones are all the same letter if they are on the same line. Though I have noticed that when using lolcat (changes a command's output to be rainbow) it seems to make it instead of change the same line, create a new line for each "frame". When this is done it works perfectly fine, though with 12 billion lines generated.

Doesn't handle non-ascii input characters?

Firstly, this is awesome 👍 :)

I cloned and compiled it fine on my MacBook Pro running OS X 10.10.5.

$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin14.5.0
Thread model: posix

Then I ran tree | bin/nms and it looked great, then I pressed "any key" and once it had finished "decoding" I got the following output:

screen shot 2016-04-28 at 13 34 24

I'm using zsh:

$ zsh --version
zsh 5.2 (x86_64-apple-darwin14.5.0)

And this version of tree:

$ tree --version
tree v1.7.0 (c) 1996 - 2014 by Steve Baker, Thomas Moore, Francesc Rocher, Florian Sesser, Kyosuke Tokoro

And this is my LANG env variable:

$ echo $LANG
en_GB.UTF-8

It just dawned on me that the output of tree might not be ASCII compliant? I know you're restricting the nms output to ASCII only, but it should revert those characters back to the original input right?

No an issue...

..but I just wanted to say that this is such a cool program..! lots of fun! thanks. #

No animation neither 'decryption' effect (openSUSE)

I followed the instructions to install no-more-secrets from source and from package. Same results for both. When you run sneakers or nms you get the 'encrypted' characters and nothing else, no animation and no decryption effect.
No compilation error (from source) neither any installation error (from package).

OS: openSUSE Tumbleweed.

Cannot be configured properly in OS X EI Capitan

After installing ncurses via brew install homebrew/dupes/ncurses, I ran 'make' in the working directory but it still turned out the following error

gcc -Wextra -Wall -o bin/nms obj/nms.o obj/main.o -lncursesw
ld: library not found for -lncursesw
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [nms] Error 1

and there is no ncursesw as the installation guide pointed out. B.T.W. I've already install this successfully and enjoyed it quite much; but right now I just want to compile it again in my own environment.

Wrong phrase

The correct phrase from the Sneakers movie is:

Setec Astronomy -> Too many secrets

(and not "No more secrets") :)

A global buffer overflow has been found when using address sanitizer

=================================================================
==23200==ERROR: AddressSanitizer: global-buffer-overflow on address 0x00000040b5c5 at pc 0x7f9f5fb686a5 bp 0x7ffc2f6451f0 sp 0x7ffc2f644998
READ of size 8 at 0x00000040b5c5 thread T0
#0 0x7f9f5fb686a4 (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x446a4)
#1 0x4039e9 in nmstermio_get_cursor_row src/nmstermio.c:267
#2 0x405c44 in nmseffect_exec src/nmseffect.c:92
#3 0x401e4d in main src/nms.c:70
#4 0x7f9f5f77a82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
#5 0x401fc8 in _start (/home/ubuntu/mfc_fuzz/new_program/no-more-secrets/bin/nms+0x401fc8)

0x00000040b5c5 is located 0 bytes to the right of global variable '.LC40' defined in 'src/nmstermio.c' (0x40b5c0) of size 5
'
.LC40' is ascii string ''
SUMMARY: AddressSanitizer: global-buffer-overflow ??:0 ??
Shadow bytes around the buggy address:
0x000080079660: 03 f9 f9 f9 f9 f9 f9 f9 05 f9 f9 f9 f9 f9 f9 f9
0x000080079670: 07 f9 f9 f9 f9 f9 f9 f9 05 f9 f9 f9 f9 f9 f9 f9
0x000080079680: 06 f9 f9 f9 f9 f9 f9 f9 07 f9 f9 f9 f9 f9 f9 f9
0x000080079690: 06 f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9
0x0000800796a0: 05 f9 f9 f9 f9 f9 f9 f9 06 f9 f9 f9 f9 f9 f9 f9
=>0x0000800796b0: 05 f9 f9 f9 f9 f9 f9 f9[05]f9 f9 f9 f9 f9 f9 f9
0x0000800796c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0000800796d0: 00 00 06 f9 f9 f9 f9 f9 02 f9 f9 f9 f9 f9 f9 f9
0x0000800796e0: 00 01 f9 f9 f9 f9 f9 f9 00 00 00 00 00 05 f9 f9
0x0000800796f0: f9 f9 f9 f9 01 f9 f9 f9 f9 f9 f9 f9 05 f9 f9 f9
0x000080079700: f9 f9 f9 f9 00 00 00 00 00 02 f9 f9 f9 f9 f9 f9
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Heap right redzone: fb
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack partial redzone: f4
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
==23200==ABORTING
I got this information when I type :'ls -l | ./nms' in command line. The program was compiled by afl-gcc and with address sanitizer.

Please indicate GPL version

Everything states this is "under the terms of the GPL License", but it does not state a version. The LICENSE is GPLv3, but it is not clearly stated whether the code is under "v3" or "v3 or later".

Time/speed option

Thanks for making this!

This is more of a feature request than an issue.

I would love the ability to speed up the decryption by way of an option like -t or something.
This way we can enjoy more no-more-secrets!

Using it for the MOTD banner

So I thought it would be cool to invoke this upon shh login. It works kinda, the problem I have is it doesn't like my banner for some reason and I don't like the blue text. Maybe in the future you can make an option to let it keep the terminal fg colors?


echo -e "\e[32m                                         \e[97m       __         \e[39m"
echo -e "\e[32m                                                \e[97m      /_/\        \e[39m"
echo -e "\e[32m  ____  _               _                       \e[97m     / /\ \       \e[39m"
echo -e "\e[32m / ___|| |__   __ _  __| |_   _  ___ _   _ ____ \e[97m    / / /\ \      \e[39m"
echo -e "\e[32m \___ \| |_ \ / _  |/ _| | | | |/ __| | | |_  / \e[97m   / / /\ \ \     \e[39m"
echo -e "\e[32m  ___) | | | | (_| | (_| | |_| | (__| |_| |/ /  \e[97m  / /_/__\ \ \    \e[39m"
echo -e "\e[32m |____/|_| |_|\__,_|\__,_|\__, |\___|\__,_/___| \e[97m /_/______\_\/\   \e[39m"
echo -e "\e[32m                          |___/                 \e[97m \_\_________\/   \e[39m \n"
echo -e "\e[92mHostname....:\e[39m \e[34m`hostname`\e[39m"
echo -e "\e[92mOS..........:\e[39m \e[34m${OSSTR}\e[39m\e[31m ${MOTD_KERNEL}\e[39m"
echo -e "\e[92mIPv4........:${MOTD_MYIPADDR}"
echo -e "\e[92mDate........:\e[39m \e[34m`date`\e[39m"
echo -e "\e[92mLoad........:\e[39m \e[34m${MOTD_LOADAVG}\e[39m"
echo -e "\e[92mMemory......:\e[39m \e[34m${MOTD_MEMPERC}\e[39m \e[92mpercent used\e[39m"
echo -e "\e[92mNet Use.....:\e[39m \e[34m${MOTD_NETMONTH}\e[39m\e[31m ${MOTD_NETMONTHS} \e[39m\e[92mused this month\e[39m"
echo -e "\e[92mUptime......:\e[39m \e[34m${MOTD_UPTIME}\e[39m \e[92mdays\e[39m"
echo -e "${MOTD_WHO}"
echo -e "${MOTD_LASTLOGIN}"

I only see the bottom text and they have huge spaces in between the lines where there shouldn't be. Hold the phone, I got it work, had to make the terminal bigger. but I see it exactly as I see it above with all the formating like [92m . Be nice if we could find a way to make it work. landscape-sysinfo works great. I guess for now I might just take all the colors I use out.

Thanks for the cool thingy.

fails to build with clang 8

I tried to build this program on my phone and got the following error:

$ clang --version
clang version 8.0.0 (tags/RELEASE_800/final)
Target: arm-unknown-linux-android
Thread model: posix
InstalledDir: /data/data/com.termux/files/usr/bin
$ make
cc -Wextra -Wall -O2 -o obj/nmstermio.o -c src/nmstermio.c
src/nmstermio.c:299:9: error: expression is not
      assignable
                stdin = freopen("/dev/tty", "r"...
                ~~~~~ ^
1 error generated.
make: *** [Makefile:37: obj/nmstermio.o] Error 1

It worked on my laptop:

$ gcc --version
gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ make
mkdir obj
cc -Wextra -Wall -O2 -o obj/input.o -c src/input.c
cc -Wextra -Wall -O2 -o obj/error.o -c src/error.c
cc -Wextra -Wall -O2 -o obj/nmscharset.o -c src/nmscharset.c
cc -Wextra -Wall -O2 -o obj/nmstermio.o -c src/nmstermio.c
cc -Wextra -Wall -O2 -o obj/nmseffect.o -c src/nmseffect.c
cc -Wextra -Wall -O2 -o obj/nms.o -c src/nms.c
mkdir bin
cc -Wextra -Wall -O2 -o bin/nms obj/input.o obj/error.o obj/nmscharset.o obj/nmstermio.o obj/nmseffect.o obj/nms.o

So, I tried using clang there:

$ clang --version
clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
$ make CC=clang
mkdir obj
clang -Wextra -Wall -O2 -o obj/input.o -c src/input.c
clang -Wextra -Wall -O2 -o obj/error.o -c src/error.c
clang -Wextra -Wall -O2 -o obj/nmscharset.o -c src/nmscharset.c
clang -Wextra -Wall -O2 -o obj/nmstermio.o -c src/nmstermio.c
clang -Wextra -Wall -O2 -o obj/nmseffect.o -c src/nmseffect.c
clang -Wextra -Wall -O2 -o obj/nms.o -c src/nms.c
mkdir bin
clang -Wextra -Wall -O2 -o bin/nms obj/input.o obj/error.o obj/nmscharset.o obj/nmstermio.o obj/nmseffect.o obj/nms.o

So, I think the difference here is the version of clang.

Initial screen freeze and hang

Compiling it was a breeze, but when runnings ls -l | bin/nms it gets stuck after printing the initial screen line by line.

Somehow github can't attach a .png so I'll paste the contents of the frozen screen below.

wE!36 3w
no!,YwitB= y |88 !YA &}{.S &I$ @+ @xA>Q {<uTKWx
E0_&++-v3e o ^^t 1&M   )dl Jj] aV [:RaB 1|OFtE1\
(RWx"3Ztg? h aj: 6Wl  +(8> dZH FA xYsb- tZZ,%32Zg
2*u\qI6oR< u FM+ OR,  bYpZ .?V n& #;cL] Ty%
1?1Q02ppza C )22 -+|  7EoI V(z oG @U@Yw Xcc
2u68[2r6g] G <8A ,&"  G]hf :ql f% {o%[R H%H

Background Color

Create option to set background color using the bkgd() function of curses.

support for ANSI-colored input

Hi,

it would be great if nms would detect when input comes with ANSI color sequences, and would keep the original colors in that case. An example would be ls -al --color=yes

Piping an echo command into nms causes a segmentation fault (Core dumped).

I recently installed Arch Linux. This is not my first time doing so, but I am facing a problem when piping stdin into nms. When I run nms and then type input, the program works as expected. However, when I try echo "test" | nms, my terminal prints "Segmentation fault (core dumped)". My terminal then has the text 1R despite my not typing it. Sometimes it have a semicolon instead: ;1R

Can't install on Kali2 machine..

Hey man,
i've trying to install on my Kali2 machine and looks like i need to downgrade my 2.19-18+deb8u3 to libc6-dev=2.19-18 in order to compile your program..

did u know another solution?

this is the output..

intrd@host:~/appz/no-more-secrets$ sudo apt-get install lib32ncurses5-dev lib32ncursesw5-dev
Reading package lists... Done
Building dependency tree      
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
 lib32ncurses5-dev : Depends: lib32tinfo5 (= 5.9+20140913-1+b1) but it is not going to be installed
                    Depends: lib32ncurses5 (= 5.9+20140913-1+b1) but it is not going to be installed
                    Depends: lib32tinfo-dev (= 5.9+20140913-1+b1) but it is not going to be installed
                    Depends: lib32c-dev
 lib32ncursesw5-dev : Depends: lib32tinfo5 (= 5.9+20140913-1+b1) but it is not going to be installed
                     Depends: lib32ncursesw5 (= 5.9+20140913-1+b1) but it is not going to be installed
                     Depends: lib32tinfo-dev (= 5.9+20140913-1+b1) but it is not going to be installed
                     Depends: lib32c-dev
E: Unable to correct problems, you have held broken packages.

intrd@host:~/appz/no-more-secrets$ sudo apt-get install lib32c-dev
Reading package lists... Done
Building dependency tree      
Reading state information... Done
Note, selecting 'libc6-dev-i386' instead of 'lib32c-dev'
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
 libc6-dev-i386 : Depends: libc6-i386 (= 2.19-18) but it is not going to be installed
                 Depends: libc6-dev (= 2.19-18) but 2.19-18+deb8u3 is to be installed
                 Recommends: gcc-multilib but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Switches -a and -f failing in El Capitan

I followed the instructions to install no-more-secrets from source and from package (brew). Same results for both. When you run nms you get the 'encrypted' characters and nothing else, no animation and no decryption effect even when -a switch is provided.
switch "-f colour" is also failing, no colour changing in fonts, it keeps default blue.
I tried both options in different terminal settings, including homebrew, basic and backlight. I noticed that it changes background to black only when I used "basic" settings.

Same source code works fine in linux.
No compilation error (from source) neither any installation error (from package).

OS: Mac OSX El Capitan.

Extra character(s) for 1 and 2 character lines

If you have an output line consisting of

.:

the nms tool will add an extra "r" character on the line. During the animation the "r" will remain constant. It will not disappear after the "decryption".

Try it using

echo ".:" | ./bin/nms

PS: Quick testing reveals that I get this error for all lines consisting of two characters. For lines that only contain one character, I get two bogus "r" characters.

I'm on Ubuntu 16.04.

Error while "make sneakers"

I can't seem to get the make sneakers command to work.

I am using your instructions

Here's the output of the command:
[taavi@laptop no-more-secrets]$ make sneakers cc -Wextra -Wall -O2 -o obj/sneakers.o -c src/sneakers.c src/sneakers.c: In function ‘main’: src/sneakers.c:183:25: warning: pointer targets in passing argument 1 of ‘nmseffect_exec’ differ in signedness [-Wpointer-sign] input = nmseffect_exec(display); ^~~~~~~ In file included from src/sneakers.c:12: src/nmseffect.h:12:6: note: expected ‘unsigned char *’ but argument is of type ‘char *’ char nmseffect_exec(unsigned char *, int string_len); ^~~~~~~~~~~~~~ src/sneakers.c:183:10: error: too few arguments to function ‘nmseffect_exec’ input = nmseffect_exec(display); ^~~~~~~~~~~~~~ In file included from src/sneakers.c:12: src/nmseffect.h:12:6: note: declared here char nmseffect_exec(unsigned char *, int string_len); ^~~~~~~~~~~~~~ make: *** [Makefile:37: obj/sneakers.o] Error 1
What's wrong?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.