Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Ruby utility that shows syntax highlighted code in your browser
Synful is a command line utility that will render syntax highlighted source code in your browser. Simply indicate the file or directory path names with optional file extensions to include or exclude. Synful will generate a nice index and an entry for each file and it will serve up the content and launch you web browser to view it. Once the request has been served, the server will close down and exit. If you'd like to keep the server running so that you can make changes and hit refresh, there is an option to do that also. All syntax highlighting is made possible by the amazing Rouge library.
$ synful winr/bin/winr censive/lib/censive.rb
A more complicated example is:
synful -f -x spec,ru lib test /tmp/example.rb -- -test/boring-results.txt
This will keep synful
in the foreground (the -f
option) and will
exclude all files with the .spec
or .ru
extensions. It will also
include files from the lib/
and test/
directories as well as the
/tmp/example.rb
file. Even though the test/boring-results.txt
file
should be rendered, we have disabled it via the -
(minus sign or dash)
in front of its filename. Note that to use this type of negation, we
need to precede it with a "double-dash" --
to tell synful
that we
are done with the normal command options.
Install via rubygems
with:
gem install synful
$ synful -h
usage: synful [options] <paths ...> [--] <-paths_to_skip ...>
-b, --bypass Bypass (skip over) top comments (begin with "#") in files
-f, --foreground Stay in the foreground, allows more requests
-h, --help Show help and command usage
-i, --include <exts> Comma list of extensions to include (incompatible with -x)
-x, --exclude <exts> Comma list of extensions to exclude (incompatible with -i)
This software is licensed under terms of the MIT License.
FAQs
Unknown package
We found that synful demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.