The program main usage is to install many software without users' interaction. In this way, the user can launch FAST program to install softwares while doing something else until the installation finished.
This documentation will explain how the program works and how you can add or update a script software.
Below you can find the tree structure to understand the program composition
├── README.md
├── FAST.py
├── Classes.py
├── Json.py
├── Launch_Windows.bat
├── Setup
│ ├── ubuntu.sh
│ ├── windows.bat
│ └── build_md.py
├── Documentation
│ ├── CheatSheet SANS
│ │ ├── cheatsheet.pdf
│ │ └── ...
│ ├── Ressources
│ │ ├── ressources.png
│ │ └── ...
│ ├── Troubleshooting
│ │ ├── troubleshooting.png
│ │ └── ...
│ └── Software
│ ├── Autopsy.md
│ ├── Cyberchef.md
│ ├── ...
│ ├── Ubuntu.md
│ └── Windows.md
├── Tutorial
│ ├── Setup_ubuntu.mp4
│ ├── Tutorial.mkv
│ └── ...
└── Softwares
├── Example.json
├── Autopsy
│ ├── installAutopsy.sh
│ ├── installAutopsy.bat
│ ├── updateAutopsy.bat
│ ├── removeAutopsy.bat
│ └── Autopsy.json
├── CyberChef
│ ├── Cyberchef.py
│ ├── requirements.txt
│ └── Cyberchef.json
└── ...
In the tree root, you have the main script wrote in Python:
FAST.py: the main programClasses.py: all the classes used (Setting, Software and Detail)Json.py: script search all JSON files in theSoftwaresdirectory and create a class to get all the scripts paths wrote in Json
A bash file called Launch_Windows.bat : the launching program for Windows.
In the setup directory, you have the following files :
ubuntu.sh: it install python and tkinter for ubuntuwindows.bat: it install Winget and Tkinter for windowsbuild_md.py: it will generate the documentation files in markdown for each software from the related JSON file, it generates a JSON files placed atDocumentation/Software
When the user launch the setup file for windows or ubuntu, it will copy all the SANS cheatsheet pdf file of this directory in the Desktop.
There are many pictures used for the readme.md file, and pictures used for troubleshooting part in each software documentation.
Here you will find a markdown file related to each software that you can install, but also two others files :
Ubuntu.md: a summary of all the software that can be install in ubuntu operating systemWindows.md: a summary of all the software that can be install in windows operating system
You can find short videos of how to setup and use the program for ubuntu and windows
In this directory you find a file called Example.json, i's explain the syntax of a json file.
You also have a directory for each software you can install.
In each software directory, there is:
JSON file (.json): it's one of the most important file, it's where you will specify what script to launch for each mode, and all the specificities of the installed softwareBash file (.sh or .bat) or Python file (.py): script file that the program will run to install, update or remove a software- [optional]
Requirements file (requirements.txt): text file that will list all the python libraries to install before launching the python script file
You will find more about these file in the next part How to add a software ?.
To create a software, you need to create a directory with the software name in the Softwares directory, and add a json file and script file (python or bash).
This file is very important because this is where you will specify all the features of the software.
You can find a template in Software > Example.json.
This file will be used by two script :
build_md.pyin theSetupdirectory to generate the software documentation inDocumentation/SoftwareJson.pythat create aSoftwareclass in python with all scripts paths related to this software
name: name that will be displayed on the graphical interfaceversion: version installed by the scriptlastUpdate(YYYY-MM-DD) : date of the last script changeactive(True / False) : True if the program should be in production, False if it should be not (for testing purposes)end(True / False) : if the software should be installed at the end (that could be useful if your program reboot system, in this way it will install other software before installing this one)usage: short description of the software usagedoc: link to the documentationpath: path to the software folder
For each operating system, you will find the same fields :
active(True / False) : if you can install this software on this operating systemusage: the way you launch or run the software for the user
For each operating system, you have the fields : install, update and remove. Each of them have also three fields:
active(True / False) : if you can install, update or remove this software on this operating systempath(.sh, bat, .sh) : the script filename to execute- [optional]
comment: a note explaining how to install, update or remove
Some software require other software being installed first. For example, you need to install WSL first, if you want to install remnux or sift in Windows. That's the purpose of this field, install another software before this one.
You will find two fields in dependancies fields :
active(True / False) : that indicate if the software have any dependanciessoftware(List of software names) : list of software name you need (the name has to be exactly the same as the name in general field)
In windows or ubuntu fields, you have a part called troubleshooting that identify problems that you encounter and that the user might too.
IThis troubleshooting field is composed of a dictionnary list of four fields:
title: troubleshooting titledescription: problem descriptionimages(list) : problem of solution screenshot (image source from the folder Documentation/Troubleshooting)link(list) : website link that solve or talk about the problem
You need to specify the python or bash script file in the json file.
Softwares
├── Example.json
├── mySoftware
│ ├── mySoftware.py
│ └── mySoftware.json
└── ...
You have a python script at the path Softwares/mySoftware/mySoftware.py that could :
installandupdatethe software inWindowsupdatethe software inLinux
You need to fill some fields in the file mySoftware.json :
name: mySoftwareactive: Truepath: Softwares/mySoftware
In Windows field :
windows > active: Truewindows > install > active: Truewindows > install > path: mySoftware.pywindows > update > active: Truewindows > update > path: mySoftware.pywindows > remove > active: False
In Ubuntu field :
ubuntu > active: Trueubuntu > install > active: Trueubuntu > install > path: mySoftware.pyubuntu > update > active: Falseubuntu > remove > active: False
Softwares
├── Example.json
├── MySoftware
│ ├── installMySoftware.sh
│ ├── installMySoftware.bat
│ ├── updateMySoftware.sh
│ └── MySoftware.json
└── ...
You have many bash script :
installinwindows:Softwares/mySoftware/installMySoftware.batinstallinubuntu:Softwares/mySoftware/installMySoftware.shupdateinubuntu:Softwares/mySoftware/installMySoftware.sh
You need to fill some fields in the file mySoftware.json
name: mySoftwareactive: Truepath: Softwares/mySoftware
In Windows field :
windows > active: Truewindows > install > active: Truewindows > install > path: installMySoftware.batwindows > update > active: Falsewindows > remove > active: False
In Ubuntu field :
ubuntu > active: Trueubuntu > install > active: Trueubuntu > install > path: installMySoftware.shubuntu > update > active: Trueubuntu > update > path: updateMySoftware.shubuntu > remove > active: False
First you need to specify the script in the JSON file, please read the part Structure of the JSON file and How to write the JSON file ? to understand the JSON file structure.
Softwares
├── Example.json
├── mySoftware
│ ├── mySoftware.py
│ ├── requirements.txy
│ └── mySoftware.json
└── ...
This file must be called requirements.txt. You will specify the python libraries that the program will install before executing the script.
Indeed, if you need requests and pandas libraries to execute your python script, you have to specifiy it in the requirements.txt file:
requests
pandas
The python script file will only be composed by a class with install, update and remove methods. The name of the class has to be the same as the script file, it's mySoftware in our case.
There is an example of a python script file in the Cyberchef software.
The init method will always be the same
class mySoftware(object):
def __init__(self, basic):
self.basic = basic
self.result = {
"error": False,
"errorMessage": []
}
...
The method isInstalled return True or False according to the software installation. If you didn't implement this functionality yet, you could just return False.
And then you have install, update, remove methods that respectively are the scripts to install, update and remove the software.
In the initialization, you have two items in the result attribute :
error(False) : you can change to True if you encounter an errorerrorMessage(List of message) : you can add a message depending the error in each methodinstall,update, andremove.
The message list in errorMessage will be printed in the graphical interface at the end of the installation.
First you need to specify the script in the JSON file, please read the part Structure of the JSON file and How to write the JSON file ? to understand the JSON file structure.
Softwares
├── Example.json
├── mySoftware
│ ├── installMySoftware.sh
│ └── mySoftware.json
└── ...
In the bash script file installMySoftware.sh, you can write anything you want in bash code. However, notice that bash code is different from ubuntu and windows that's why their extension are respectively .sh(ubuntu) and .bat(windows).
In ubuntu, if you need administrator right to execute a code, you need to call the command with sudo in this way :
echo $1 | sudo -S my_command
In fact, in order to deal with ubuntu administrator right, the program will called the script as bash Softwares/mySoftware/installMySoftware.sh adminPassword
From the JSON file in the software directory, you will check the file related to the script you want to update. The search filename will be on these fields :
ubuntu > install > pathubuntu > update > pathubuntu > remove > pathwindows > install > pathwindows > update > pathwindows > remove > path
Softwares
├── Example.json
├── mySoftware
│ ├── mySoftware.py
│ └── mySoftware.json
└── ...
For example, if the file you want to update is mySoftware.py, then you can update the method isIntalled, install, update and remove from the class object.
Softwares
├── Example.json
├── MySoftware
│ ├── installMySoftware.sh
│ ├── installMySoftware.bat
│ ├── updateMySoftware.sh
│ └── MySoftware.json
└── ...
For example, if the file you want to update is installMySoftware.sh, then you can update the script file.
However don't forget to use the syntax echo $1 | sudo -S my_command if you need administrator right.