Giter Club home page Giter Club logo

sstrings's Introduction

sstrings: a strings(1) replacement

After reading that GNU binutils' strings(1) utility was affected by a buffer overflow vulnerability and finding out that a simple tool like that is more complex than it should be (at least in my opinion) I decided to brush up my C skills on UNIX-like systems and to write another implementation of strings(1). Enter sstrings(1).

sstrings(1) is a Simpler strings(1) (or Stupid strings) that does just what I suppose strings(1) should do: read chunks of binary data from a file or from stdin and output every sequence of 4 or more printable characters ending either with a '\0' or a '\n' to stdout.

I will follow the Open Group specifications as close as I can and you're free to nag me when something's wrong but I warn you: this tool is mostly written for my own amusement and it's not meant to be as good or as complete as GNU strings(1).

For istance it ignores the -a flag and ALWAYS scans the whole file. Since this behaviour is implementation dependent I think I'm allowed to do it.

I'm also not planning to make this utility universally portable, my aim is to have it run on a i386 personal computer running OpenBSD and then see if it runs on Linux too. Probably I will kindly ask you to test it on different UNIX-like operating systems, different architectures and different compilers and then send me some feedback about it but that's not mandatory.

The recommended compiler is GCC 4 and the following line should output no warnings:

gcc --std=c99 -Wall -Wextra -pedantic sstrings.c -o sstrings

The license is the MIT license and you can read it in LICENSE. It boils down to: do what you want with this as long as you give me credit for writing it in the first place and please don't sue me.

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.