Skip to content
This repository was archived by the owner on Feb 28, 2019. It is now read-only.

Commit bf04993

Browse files
committed
fixed documentation and travis-ci problems #version=0.1.3
1 parent ff88153 commit bf04993

File tree

11 files changed

+101
-17
lines changed

11 files changed

+101
-17
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# APTDetector Changelog
22

3-
Since February 7, 2016 there have been 0 releases and 8 commits for
3+
Since February 11, 2016 there have been 0 releases and 8 commits for
44

55
an average of zero 0-commit release every 0 weeks.
66

aptdetector/network/parser/__init__.py

Whitespace-only changes.

aptdetector/network/parser/httpparser.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
"""couple of functions that was required to parse and reassemble
1+
"""http_parser implementation
2+
3+
couple of functions that was required to parse and reassemble
24
http requests and responses
35
"""
46
from collections import defaultdict
@@ -69,13 +71,14 @@ def __init__(self):
6971
def send(self, http_type, data):
7072
"""append http request or reponses
7173
74+
if the connection is not initiated yet then start the connection
75+
and if it's still the current connection then append the packet
76+
7277
Args:
7378
http_type (HttpType): type of packet
7479
data (str): data of unparsed packet
7580
Returns:
7681
None
77-
if the connection is not initiated yet then start the connection
78-
and if it's still the current connection then append the packet
7982
"""
8083
pkt = None
8184
if not self.inited:

aptdetector/network/parser/parse_pcap.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
parsing a pcap file so that later we would be able to use
44
the urls that was found to check for any harmfull activity
55
6-
PROTIP:
7-
not completed yet, under heavy developement
8-
96
>>> from aptdetector.network.parser.parse_pcap import parse_pcap_file
107
>>> parse_pcap_file()
118
Traceback (most recent call last):
@@ -70,6 +67,7 @@ def append_packet(self, packet):
7067
if the packet is after last ack sequence then
7168
it's a new packet so add it to buffer , and we
7269
will deal with it later
70+
7371
Args:
7472
packet (TcpPack): packet that need to be appended
7573
"""
@@ -81,6 +79,7 @@ def retrieve_packet(self, ack_seq):
8179
8280
read all packets till now and reassmble a packet
8381
based on it's ack sequence number
82+
8483
Args:
8584
ack_seq (int): ack sequence number
8685
Returns:
@@ -135,6 +134,7 @@ def on_packet(self, packet):
135134
"""parse a :class:`TcpPack` object.
136135
137136
change attributes(ack, sin, fin , ...) of a :class:`TcpPack` object
137+
138138
Args:
139139
packet (TcpPack): packet that need to be appended
140140
Returns:
@@ -188,6 +188,7 @@ def parse_pcap_file(file_path):
188188
"""pcap parser.
189189
190190
parse a pcap file to get a list :class:`TcpPacket` objects
191+
191192
Args:
192193
file_path (str): address of the Pcap file that is ready to be parsed
193194
Returns:

aptdetector/network/sniffer.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
"""``sniffer`` contains base network sniffer implemntation, but if you
1+
"""``sniffer`` contains base network sniffer implemntation
2+
3+
but if you
24
want to use it, Currently there are two implementation to choose from:
3-
* :class:`URLSniffer` - Sniff urls that are moving around in network
4-
* :class:`FileSniffer` - Sniff files that are in the network
5+
* :class:`URLSniffer` - Sniff urls that are moving around in network
6+
* :class:`FileSniffer` - Sniff files that are in the network
57
Both classes are :class:`BaseSniffer` subtypes
68
"""
79
# TODO(implement a test scenrario)
@@ -10,8 +12,6 @@
1012
from aptdetector.utils.exception import FileParsingException
1113
from aptdetector.utils.typecheck import params, returns
1214

13-
__all__ = ('BaseSniffer')
14-
1515

1616
class BaseSniffer(object):
1717
"""The ``BaseSniffer`` is an implementation of a bare minimum network sniffer.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
aptdetector.network.parser package
2+
==================================
3+
4+
aptdetector.network.parser.httpparser module
5+
--------------------------------------------------------------
6+
7+
.. automodule:: aptdetector.network.parser.httpparser
8+
:members:
9+
:undoc-members:
10+
:show-inheritance:
11+
12+
aptdetector.network.parser.parse_pcap module
13+
---------------------------------------------------
14+
15+
.. automodule:: aptdetector.network.parser.parse_pcap
16+
:members:
17+
:undoc-members:
18+
:show-inheritance:
19+
20+
Module contents
21+
---------------
22+
23+
.. automodule:: aptdetector.network.parser
24+
:members:
25+
:undoc-members:
26+
:show-inheritance:

docs/aptdetector.network.rst

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
aptdetector.network package
2+
===========================
3+
4+
Subpackages
5+
-----------
6+
7+
.. toctree::
8+
aptdetector.network.parser
9+
10+
aptdetector.network.sniffer module
11+
-------------------------------------------
12+
13+
.. automodule:: aptdetector.network.sniffer
14+
:members:
15+
:undoc-members:
16+
:show-inheritance:
17+
18+
aptdetector.network.packet module
19+
-------------------------------------------
20+
21+
.. automodule:: aptdetector.network.packet
22+
:members:
23+
:undoc-members:
24+
:show-inheritance:
25+
26+
Module contents
27+
---------------
28+
29+
.. automodule:: aptdetector.network
30+
:members:
31+
:undoc-members:
32+
:show-inheritance:

docs/aptdetector.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
aptdetector package
2+
===================
3+
4+
Subpackages
5+
-----------
6+
7+
.. toctree::
8+
9+
aptdetector.network
10+
11+
Module contents
12+
---------------
13+
14+
.. automodule:: aptdetector
15+
:members:
16+
:undoc-members:
17+
:show-inheritance:

docs/index.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,14 @@ Section listing
8282
---------------
8383

8484
.. toctree::
85-
:maxdepth: 2
85+
:maxdepth: 4
8686

8787
architecture
88-
network
88+
aptdetector
89+
90+
Indices and tables
91+
------------------
92+
93+
* :ref:`genindex`
94+
* :ref:`modindex`
95+
* :ref:`search`

docs/network.rst

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)