diff --git a/README.md b/README.md index 85e4fb96..019b79a1 100644 --- a/README.md +++ b/README.md @@ -12,56 +12,68 @@ purple-hats is a customisable, automated accessibility testing tool that allows ## Installations purple-hats includes installer scripts which automates the installation of the required components used by purple-hats. Currently, it is supported on macOS and Linux (Red Hat, Centos, Ubuntu, OpenSuse/Suse). -> **NOTE: Please run the scripts with admin privileges.** +
+ Instructions for changing file permissions + + #### Commands to modify file permissions + In the event you cannot access the files due to running the installer scripts with elevated privileges previously, you can modify the file permissions to the appropriate owner and group. + +```shell +# Linux/Unix: The user id (uid) and group id (gid) by default should be the same +# MacOS: The uid and gid may differ, if the user group doesn't exist, set the group as staff + +# You can check the current user's uid and gid with the following command +id + +# Update permissions for files +# Can provide the name or numerical id +sudo chown + +# Update permissions for directories +sudo chown -R +``` +
+ ### MacOS As MacOS does not have a builtin package manager. Node Version Manager (NVM) will be used to install NodeJS. Please run the installer script *mac-installer.sh* -```console +```shell # Navigate into the directory, if not done so cd purple-hats/installers # Run the installer script for MacOS with admin privileges -sudo sh mac-installer.sh -```` +bash mac-installer.sh +``` -```console +```shell # If you cannot run the script due to insufficient permission, assign execute permission to the file chmod +x mac-installer.sh # Run the script again -sudo sh mac-isntaller.sh +bash mac-isntaller.sh ``` ### Linux Depending on the Linux Distro, the builtin package manager (YUM, APT or Zypper) will be used for the respective Linux Distro to install NodeJS. Please run the installer script *linux-installer.sh* -```console -# Navigate into the directory, if not done so -cd purple-hats/installers - -# Run the installer script for MacOS with admin privileges -sudo sh linux-installer.sh -```` - -```console +```shell # If you cannot run the script due to insufficient permission, assign execute permission to the file chmod +x linux-installer.sh # Run the script again -sudo sh linux-installer.sh +bash linux-installer.sh ``` - -## Features (stand-alone) +## Features purple-hats can perform the following functions to crawl the target URI. Results will be generated in JSON format before being compiled into a HTML file. To start using purple-hats, run the following command(s) -```console +```shell # Navigate into the directory, if not done so cd purple-hats # Execute run.sh with admin privileges to start using purple-hats -sudo sh run.sh +bash run.sh ``` > NOTE: An online test-site by Web Scraper is used to demonstrate purple-hats' features. @@ -71,13 +83,18 @@ sudo sh run.sh The crawler will then generate the results based on the links found **within the provided URL**. **Required inputs** -- A public URL where sitemap.xml file is hosted +- URL linking to the sitemap file +- Examples of valid sitemap format + - XML (Recommended): https://www.sitemaps.org/sitemap.xml + - RSS: https://itunes.apple.com/gb/rss/customerreviews/id=317212648/xml + - Text: https://www.xml-sitemaps.com/urllist.txt +- For more information on sitemap: https://www.sitemaps.org/protocol.html **Sample Output** ```console user@user-MacBook-Pro Desktop % cd purple-hats -user@user-MacBook-Pro purple-hats % sudo sh run.sh +user@user-MacBook-Pro purple-hats % bash run.sh Welcome to HAT's Accessibility Testing Tool! We recommend using Chrome browser for the best experience. @@ -85,7 +102,7 @@ What would you like to scan today? 1) sitemap.xml file containing links 2) public domain URL #? 1 -Please enter file link: https://www.google.com/sitemap.xml +Please enter file link: https://webscraper.io/test-sites/e-commerce/allinone Scanning website... #The crawler will then start scraping from the file link provided above. @@ -100,14 +117,14 @@ The crawler will recursively visit the links to generate the results from **all Under this feature, it will also take into consideration of the presence of a login page. -#### 2. Crawling of PublicDomain +#### 2. Crawling of PublicDomain w/o Login Page **Required inputs** -- A public domain URL +- A website URL -**Sample Output** +**Sample Output - Public Domain without Login Page** ```console user@user-MacBook-Pro Desktop % cd purple-hats -user@user-MacBook-Pro purple-hats % sudo sh run.sh +user@user-MacBook-Pro purple-hats % bash run.sh Welcome to HAT's Accessibility Testing Tool! We recommend using Chrome browser for the best experience. @@ -116,10 +133,11 @@ What would you like to scan today? 2) public domain URL #? 2 Please enter domain URL: https://webscraper.io/test-sites/e-commerce/allinone +Do you need to login to your domain? Y/N: N Scanning website... #The crawler will then start scraping from the file link provided above. #Console results user@user-MacBook-Pro purple-hats % -``` +``` \ No newline at end of file diff --git a/installers/linux-installer.sh b/installers/linux-installer.sh index f878abbc..2eeda6f8 100644 --- a/installers/linux-installer.sh +++ b/installers/linux-installer.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash #Linux in general diff --git a/installers/mac-installer.sh b/installers/mac-installer.sh index f4f9505b..f8e716bb 100644 --- a/installers/mac-installer.sh +++ b/installers/mac-installer.sh @@ -1,4 +1,4 @@ -#!/bin.sh +#!/bin/bash # Removing previous installation of /.nvm directory, node_modules and python pkgs if [ -d "node_modules" ]; then