Code Monkey home page Code Monkey logo

spawar-demo's Introduction

Piper Internship SPAWAR Sniffer Project

Architecture

Setup

Create Database
  1. pull docker image

$ docker pull mysql
  1. run docker image

$ docker run -p 3306:3306 \
--name snifferdb \
-e MYSQL_USER=admin \
-e MYSQL_ROOT_PASSWORD=sniffered \
-e MYSQL_PASSWORD=pungent \
-d mysql
Restore database schemas
  1. install mysql client cli tools

$ yum install mysql
  1. Restore Empty DB

$ mysql --host=127.0.0.1 -u root -psniffered \
< database/snifferdb-schema.sql
  1. Restore DB with data

mysql --host=127.0.0.1 -u root -psniffered \
< snifferdb-schema-with-data.sql
Raspberry Pi setup
  1. install packages

    $ sudo apt-get install mysql-server git vim -y
    Note
    you’ll have to set a root password
  2. Enable MySql Service

    $ systemctl enable mysql
  3. Enable MySql to bind to anyIP

  4. Start MySql Server

  5. Add db User

    $ mysql -u root -p
    mysql> CREATE USER 'user'@'localhost' IDENTIFIED BY 'password';
    mysql>
    mysql>
  6. Download git project

    Note
    Assuming ssh-key was setup already and added to the repo
  7. rename hostname

    $ sudo hostnamectl set-hostname sensordb.sd.spawar.navy.mil
  8. update hosts file on each machine

    # echo '127.0.0.1 sensordb.sd.spawar.navy.mil' >> /etc/hosts
  9. Create user

    $ sudo useradd -G adm,dialout,cdrom,sudo,audio,video,plugdev,games,users,input,netdev,spi,i2c,gpio jmarley
  10. Generate ssh keys

    $ ssh-keygen -t rsa -f /Users/jasonmarley/projects/SPAWAR-Demo/keys/id_rsa_pi
  11. Copy ssh keys

    $ ssh-copy-id -i keys/id_rsa_pi.pub [email protected]
  12. Restrict ssh to keys only

    $ sudo vim /etc/ssh/sshd_config
       PermitRootLogin no
       PasswordAuthentication no
    $ sudo service ssh restart
PHP webapplication

php stuff

Python packages

sudo pip install nmap sudo pip install requests

Bluetooth Sniffer

Bluetooth-discovery2.py code allows a Raspberry Pi 3 to detect devices with Bluetooth enabled. Devices will only be detected if they are on the Bluetooth screen.

Wifi Sniffer

Wifi-discovery.py code allows a Raspberry Pi 3 to detect a large number of devices through Wifi.

spawar-demo's People

Contributors

piperlw avatar

Watchers

J. Marley avatar

Forkers

212aaron212

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.