Cyber Detective💙💛 Profile picture
Every day I write about #osint (Open Source Intelligence) tools and techniques. Also little bit about forensics and cybersecurity in general. Work in @netlas_io

Mar 27, 2022, 14 tweets

How to read code written by other people

Examples of tools

(also good for code you wrote yourself more than a week ago)

🧵🧵🧵(0/9)

(1/9) Code beautifiers

Sometimes, simply putting the right indents, line breaks, and highlighting variables can go a long way toward making your code more readable.

#javascript beautifier.io
#php beautifytools.com/php-beautifier…
#python tutorialspoint.com/online_python_…

(2/9) Deobfuscators

Sometimes developers purposely make code unreadable with special tools - obfuscators (especially often in websites)

In such cases it is possible to use deobfuscators.

#javascript lelinhtinh.github.io/de4js/
#java javadeobfuscator.com

(3/9) Code explainers

This type of service simply translates code in a programming language into ordinary english language (in as much detail as possible)

Ex: explaincode.app

(4/9) "Code to flow chart"

Sometimes there are too many conditional statements in the code, so only a flowchart generator can help.

Ex: app.code2flow.com

(5/9) Code review tools

This type of tool will help identify the roughest code problems (like excessive complexity or large number of duplicates) to make it better as quickly as possible.

Ex (free for #opensource projects): codebeat.co deepsource.io

(6/9) "Code hint tools"

This type of tool just looks for syntax errors and various inconsistencies with technological standards in the code.

Ex: jshint.com
webhint.io

(5/9) Code review tools

This type of tool will help identify the roughest code problems (like excessive complexity or large number of duplicates) to make it better as quickly as possible.

Ex (free for #opensource projects): codebeat.co deepsource.io

(6/9) "Code hint tools"

This type of tool just looks for syntax errors and various inconsistencies with technological standards in the code.

Ex: jshint.com
webhint.io

(7/9) Online comments generators

These tools work much more crudely than Code Explanation or Code Hint, but they all help you quickly figure out which function/method is responsible for what.

#javascript smartcomments.github.io
#python pypi.org/project/docly/

(8/9) Compare two files

The automatic comparison comes in handy when you want to find differences between two different versions of code.

Files: w3docs.com/tools/code-dif…
Folders: devart.com/codecompare/

(9/9) Regular expression

If you need to find emails, nicknames or other "juicy" info in source code, you can use Regexp (there is no need to review their syntax, there are plenty of templates on the Internet)

Online: regexr.com
CLI: github.com/cipher387/grep…

In conclusion I would like to note once again that this article simply gives examples. All in all there are thousands of tools for automatic analysis of source code which combine various functions. Here is an example of such for #javascript:

Share this Scrolly Tale with your friends.

A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.

Keep scrolling