Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added travis-ci files and test example #7

Open
wants to merge 42 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
301f493
split up main, command line arg, and packet builds into separate files
Nov 17, 2018
a92b54c
Experimenting with travis CI
MuchtarSalimov Dec 3, 2018
086a226
setting up initial tests for travisCI
MuchtarSalimov Dec 3, 2018
7fc472d
remove only master branch getting travisCI
MuchtarSalimov Dec 3, 2018
90aab3a
Merge pull request #1 from MuchtarSalimov/Continuous-Integration-Start
MuchtarSalimov Dec 3, 2018
bac23c7
a
MuchtarSalimov Dec 3, 2018
64a011a
Update .travis.yaml
MuchtarSalimov Dec 3, 2018
7adf16e
Update .travis.yaml
MuchtarSalimov Dec 3, 2018
3b34567
Rename .travis.yaml to .travis.yml
MuchtarSalimov Dec 11, 2018
e2417e3
Update .travis.yml
MuchtarSalimov Dec 11, 2018
9fe7283
Update .travis.yml
MuchtarSalimov Dec 11, 2018
7a0845b
Update .travis.yml
MuchtarSalimov Dec 11, 2018
2e22260
Update .travis.yml
MuchtarSalimov Dec 11, 2018
4da8ef7
Update .travis.yml
MuchtarSalimov Dec 11, 2018
e56dfaa
Update .travis.yml
MuchtarSalimov Dec 11, 2018
fee0b3d
Update .travis.yml
MuchtarSalimov Dec 11, 2018
2be80f2
Update .travis.yml
MuchtarSalimov Dec 11, 2018
7c7c15e
Update .travis.yml
MuchtarSalimov Dec 11, 2018
272d458
Update .travis.yml
MuchtarSalimov Dec 11, 2018
de3eddd
Update .travis.yml
MuchtarSalimov Dec 11, 2018
1ff63ce
Update .travis.yml
MuchtarSalimov Dec 11, 2018
68a0478
Update .travis.yml
MuchtarSalimov Dec 11, 2018
cc7f2d3
Rename run_tests.py to test_test.py
MuchtarSalimov Dec 11, 2018
36937e5
Update test_test.py
MuchtarSalimov Dec 11, 2018
36a91fd
Update test_test.py
MuchtarSalimov Dec 11, 2018
862f7ea
Rename test_test.py to test_trial.py
MuchtarSalimov Dec 11, 2018
d082312
Update test_trial.py
MuchtarSalimov Dec 11, 2018
17c7d33
Update test_trial.py
MuchtarSalimov Dec 11, 2018
90c049c
Update test_trial.py
MuchtarSalimov Dec 11, 2018
305216d
Update test_trial.py
MuchtarSalimov Dec 11, 2018
b941d62
Create __init__.py
MuchtarSalimov Dec 11, 2018
f759c4a
Update test_trial.py
MuchtarSalimov Dec 11, 2018
552a77c
Rename tests/test_trial.py to test_trial.py
MuchtarSalimov Dec 11, 2018
568f11f
Update test_trial.py
MuchtarSalimov Dec 11, 2018
b35fbed
Update test_trial.py
MuchtarSalimov Dec 11, 2018
903d50f
Update test_trial.py
MuchtarSalimov Dec 11, 2018
970780c
Update ScappyTest.py
MuchtarSalimov Dec 11, 2018
4a79198
Update ScappyTest.py
MuchtarSalimov Dec 11, 2018
2b9cec8
Update ScappyTest.py
MuchtarSalimov Dec 11, 2018
305277d
Update test_trial.py
MuchtarSalimov Dec 11, 2018
c7d2013
Update .travis.yml
MuchtarSalimov Dec 11, 2018
919821d
Update test_trial.py
MuchtarSalimov Dec 11, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
language: python
python:
- "2.7"

os:
- linux

before_install:
- sudo apt-get install tcpdump
- sudo apt-get install graphviz
- sudo apt-get install imagemagick
- sudo apt-get install python-gnuplot
- sudo apt-get install build-essential libssl-dev libffi-dev python-dev
- pip install cryptography
- sudo apt-get install python-pyx
- sudo apt-get install wireshark
- pip install scapy
- sudo apt-get install aircrack-ng

script:
- pytest
10 changes: 1 addition & 9 deletions ScappyTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@


import sys
from scapy import all
from scapy.all import *


Expand All @@ -21,13 +22,4 @@ def build_packet(x, interface):
Dot11Elt(ID="TIM", info="\x00\x01\x00\x00"),
iface=interface, loop=1)
#sendp("I'm travelling on Ethernet", loop=1, inter=0.2)




build_packet("HellomynameisRyan","wlp2s0mon")





1 change: 1 addition & 0 deletions __init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

23 changes: 23 additions & 0 deletions args.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import argparse

def get_cargs():
argumentSet = argparse.ArgumentParser()

modeSet=argumentSet.add_mutually_exclusive_group()
modeSet.add_argument("-s", "--send", required = False,
help="string to send in packet")
modeSet.add_argument("-l", "--listen", action ="store_const",
default = None, const = "listen", required = False,
help="Mode in which to run the script")

args = vars(argumentSet.parse_args())
if args["send"]:
mode = "send"
message = args["send"]
elif args["listen"]:
mode = "listen"
message = None
else:
mode = "default"
message = None
return (mode, message)
File renamed without changes.
16 changes: 16 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import args
import sys
import ScappyTest


if __name__ == "__main__":
mode, message = args.get_cargs()
if mode == "send":
ScappyTest.build_packet(message, "wwlp2s0mon")
print "Packet Sent!"
elif mode == "listen":
print "Listen mode! Doesn't do anything yet"
elif mode == "default":
print "Default mode! Doesn't do anything yet"
else:
print "undefined????"
14 changes: 14 additions & 0 deletions test_trial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

import ScappyTest
import main

import unittest


class TestGeneral(unittest.TestCase):
def test_example(self):
self.assertEqual(3, 3)


if __name__ == '__main__':
unittest.main()