Skip to content

DavidCPorter/malware

Repository files navigation

malware

malware project for CS594-VDS

Steps to setup codebase.

  1. Install NodeJS V10 or higher. Use the link https://nodejs.org/en/download/package-manager/ for installation instructions.
  2. This will automatically install npm. Verify the installations and the versions. In Linux/MacOS, npm -v and node -v should do the trick.
  3. Navigate to the project repository folder.
  4. Make sure that the latest version is pulled
  5. Execute 'npm install' - This will install the necessary package files.
  6. Execute 'npm start' to start the server. By default the server will run at http://localhost:3000/
  7. If some other application need the port, this could be edited in bin/www file of the repository
  8. If the web page is visible on http://localhost:3000/ or whatever port you have selected with the title of the project and work in progress message, well done!, the codebase has been successfully setup.

Steps to Setup Database:

  1. Install PostGreSQL version 10. In Linux,

     sudo apt update    
     sudo apt install postgresql postgresql-contrib
    

    should install the latest version. In Mac, brew can be used and Windows will have an installer available.

  2. Once installed,

    sudo -u postgres createuser --interactive
    

    can be used to create a new user. I suggest giving the user the same username as the OS user.

  3. After the user have been created, we need to create the Database

    sudo -u postgres createdb malware
    

    will create a database called Malware. For more detailed instructions, Please refer to the Digital Ocean Blog

  4. Once the Database has been created,

    psql -U username dbname < dbexport.pgsql 
    

    can be used to import the data. Make sure to replace the username, dbname and the .pgsql file path. The .pgsql file contains the exported data that was shared. More detailed instructions on importing/exporting postgreSQL data is available here

  5. Current file contains the data from the sample JSON file that was shared. On the larger data file, use the below instructions to import data. You need to create database and username for this to work.

Steps to import Data from JSON file

  1. This needs PostgreSQL to be setup and running with a database called malware. Refer to the previous section for instructions.
  2. Make sure that Python 3 and psycopyd are installed and available.
  3. Navigate to the project util folder.
  4. Run the json2csv.py to generate the CSV file of the corresponding JSON
  5. Run the importData.py file. Supply the path of the output file of 3 and the path of the Virus Matched File that has been shared. This code requires the PostGRESQL username and password.
  6. Once the scripts run successfully, the data will be imported

About

malware project for CS594-VDS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •