Skip to content

varunull/ezscripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ezscripts

ezscripts is a compilation of various bash functions written to speed up the manual processes involved while working on Unix based systems. Functions will be regularly added for a diverse number of use cases ranging from file operation to penetration testing automation.

Currently supported shells

  • Bash

Setup

  1. Pull the repository using : git clone https://github.com/varunull/ezscripts.git
  2. Go the ezscripts directory, and run : export EZSCRIPT_PATH=$PWD; source setupEzscripts.sh
  3. Run the command showfunclist to confirm if the setup was successful.
  4. If all goes well in the first two steps without any errors, then in the ~/.bashrc file, add the following command : export EZSCRIPT_PATH=<YOUR_PROJECT_DIR>; source $EZSCRIPT_PATH/setupEzscripts.sh.

Usage

To see all available functions in a quick glance, run showfunclist after setup completes.

Screenshot from 2022-11-21 21-48-55-01

For detailed usage of a particular function, use :

showusage <function_name>

Screenshot from 2022-11-21 21-52-32

Examples

Using addcmdusage/findcmdusage functions

Scenario : Your day job requires you to run numerous command lines for different tools on a frequent basis. Some of these are so important that you need to retrieve them quickly and also have the ability to tweak them based on your needs. Many of these command lines have various flags indicating different usages, and remembering all of their details sometimes becomes tedious. However, it becomes easy if all these can be saved and retrieved easily, which is precisely why these functions were created.

Screencast.from.2022-11-21.22-07-08.webm

As we can see here, we now have a variety of usages of the grep command that can be easily retrieved later. This comes in handy for many other tools whose switches are difficult to memorize or retain.

Here is another good example of how we can store a diverse set of usages for a command, which is nmap in this case. When I run findcmdusage nmap on my local machine :

Screenshot from 2022-11-21 22-25-43

Misc Notes

I currently have many more functions like these which are yet to be cleaned up and pushed to the repository. These functions will be helpful for those solving CTF challenges, conducting penetration tests, and alike. Functions for generic usage (not specific to any usecase) will also be added, with the intention of helping all those working regularly on unix platforms.

About

ezscripts is a bash function library intended to automate repetitive commands as well as aid faster navigation in the terminal

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages