Skip to content

Commit

Permalink
0.1.0 Initial Production Release
Browse files Browse the repository at this point in the history
  • Loading branch information
wraith-wireless committed Jun 2, 2016
1 parent 4fef466 commit 33a1d36
Show file tree
Hide file tree
Showing 38 changed files with 404 additions and 216 deletions.
22 changes: 22 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
# modified from https://github.com/github/gitignore/blob/master/Python.gitignore
#Copyright (c) 2016 GitHub, Inc.
#
#Permission is hereby granted, free of charge, to any person obtaining a
#copy of this software and associated documentation files (the "Software"),
#to deal in the Software without restriction, including without limitation
#the rights to use, copy, modify, merge, publish, distribute, sublicense,
#and/or sell copies of the Software, and to permit persons to whom the
#Software is furnished to do so, subject to the following conditions:
#
#The above copyright notice and this permission notice shall be included in
#all copies or substantial portions of the Software.
#
#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
#FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
#
#DEALINGS IN THE SOFTWARE.

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ software in furtherance of or with intent to commit any fraudulent or other ille
activities, or otherwise in violation of any applicable law, regulation or legal
agreement.

See <http://www.gnu.org/licenses/> for a copy of the GNU General Public License.
See <http://www.gnu.org/licenses/> for a copy of the GNU General Public License.
13 changes: 8 additions & 5 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Include license, README, channels, device, pyw and user guide
include LICENSE README.md __init__.py channels.py device.py pyw.py PyRIC.pdf TODO RFI
# Include license, README, channels, device, rfkill, pyw and user guide
include LICENSE README.md __init__.py channels.py device.py rfkill.py pyw.py PyRIC.pdf TODO RFI

# Include subdirectories
# NOTE: we do not include test folder in installation
recursive-include lib net examples docs
recursive-include docs *.help
# device_details.py was not being included without the below recursive include
recursive-include lib net examples docs tests guide
recursive-include examples *.py
recursive-include docs *.help
recursive-include tests *.py
recursive-include guide *.tex *.bib *.png
Binary file modified PyRIC.pdf
Binary file not shown.
38 changes: 17 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ uses netlink (or ioctl) sockets to communicate directly with the kernel.
about iw updates and rewriting your parsers.
* Easy: If you can use iw, you can use PyRIC

Python is primarliy and originally a port of a subset of iw but has evolved in
PyRIC is primarliy and originally a port of a subset of iw but has evolved in
an attempt to meet the needs of wireless pentesting as it relates to wireless
network cards. In addition to providing iw related functions, PyRIC implements:
* ifconfig functionality such as mac address, ip address, netmask and broadcast
Expand Down Expand Up @@ -61,8 +61,7 @@ commands although an understanding of libnl(.py) is helpful especially, if for
example, the code is to be extended to handle multicast or callbacks.

### b. Additions to iw
In addition to providing some ifconfig functionality, I have also added several
"extensions" to iw:
Several "extensions" have been added to iw:
* Persistent sockets: pyw provides the caller with functions & ability to pass
their own netlink (or ioctl socket) to pyw functions;
* One-time request for the nl80211 family id: pyw stores the family id in a
Expand All @@ -71,7 +70,7 @@ global variable
(Cards are tuples t=(dev,phy #,ifindex)

These are minimal changes but they can improve the performance of any progams
that need to access the wireless nic repeatedly as shown in the table below.
that needs to access the wireless nic repeatedly as shown in the table below.

| chset | Total | Avg | Longest | Shortest |
|------------|----------|--------|-----------|----------|
Expand All @@ -88,8 +87,8 @@ persistent netlink sockets are used with the total time and average hop time nea
halved.

### c. Current State
ATT, PyRIC accomplish my core needs but it is still a work in progress. It provides
the following:
ATT, PyRIC accomplishes my core needs but it is still a work in progress. It
currently provides the following:
* enumerate interfaces and wireless interfaces
* identify a cards chipset and driver
* get/set hardware address
Expand All @@ -104,7 +103,7 @@ the following:
* get/set mode
* add/delete interfaces
* enumerate ISM and UNII channels
* block/unblock rfkill devices (still working on it)
* block/unblock rfkill devices

It also provides limited help functionality concerning nl80211 commands/attributes
(for those who wish to add additional commands). However, it pulls directly from
Expand All @@ -116,10 +115,10 @@ To avoid confusion, PyRIC is the system as a whole, including all header files
and "libraries" that are required to communicate with the kernel. pyw is a
interface to these libraries providing specific funtions.

What it does - defines programmatic access to a small subset of iw and ifconfig.

What it does not do - handle multicast messages, callbacks or dumps or non nl80211
funtionality.
What it does - defines programmatic access to a subset of iw, ifconfig and iwconfig.
In short, PyRIC provides Python wireless pentesters the ability to work with
wireless cards directly from Python without having to use command line tools
through Popen.

## 2. INSTALLING/USING:

Expand All @@ -130,16 +129,13 @@ installation.

### a. Requirements
PyRIC has only two requirements: Linux and Python. There has been very little
testing (on my side) on kernel 4.x and Python 3 but working out the small bugs
continues on Python 2.7 and kernel 3.13.x.
testing (on my side) on kernel 4.x and Python 3 but unit testing confirms
functionality on Python 2.7 and kernel 3.13.x.

### b. Install from Package Manager
Obviously, the easiest way to install PyRIC is through PyPI:

sudo pip install --pre PyRIC

Note the use of the '--pre' flag. Without it, pip will not install PyRIC since
it is still in the developmental stage.
sudo pip install PyRIC

### c. Install from Source
The PyRIC source (tarball) can be downloaded from https://pypi.python.org/pypi/PyRIC
Expand Down Expand Up @@ -366,6 +362,9 @@ Extending PyRIC is fun and easy too, see the user guide PyRIC.pdf.
+ device_details.py display device information
- tests test folder
+ pyw.unittest.py unit test for pyw functions
- guide User Guide resources
+ PyRIC.tex User Guide LaTex
+ PyRIC.bib User Guide bibliography
- setup.py install file
- setup.cfg used by setup.py
- MANIFEST.in used by setup.py
Expand Down Expand Up @@ -400,7 +399,4 @@ Extending PyRIC is fun and easy too, see the user guide PyRIC.pdf.
+ docs netlinke documentation/help
* nlhelp.py nl80211 search
* commands.help nl80211 commands help data
* attributes.help nl80211 attributes help data
* res User Guide resources
- PyRIC.tex User Guide LaTex
- PyRIC.bib User Guide bibliography
* attributes.help nl80211 attributes help data
1 change: 1 addition & 0 deletions RFI
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,4 @@ dev <devname> set txpower <auto|fixed|limit> [<tx power in mBm>]

phy <phyname> set txpower <auto|fixed|limit> [<tx power in mBm>]
Specify transmit power level and setting type.

1 change: 1 addition & 0 deletions TODO
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
1) overall
o make a cli as well
o determine if rfkill issue is related only to ubuntu
2) libnl.py
o see (1) in RFI
4) pyw
Expand Down
4 changes: 3 additions & 1 deletion __init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# root Distribution directory
# PyRIC root Distribution directory
# Do not import from this directory i.e from PyRIC import foobar
# use pip to install or import from pyric
5 changes: 3 additions & 2 deletions examples/device_details.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/env python
""" device_details.py
""" details.py
Example for displaying device details
"""

import argparse as ap
Expand Down Expand Up @@ -67,7 +68,7 @@ def execute(dev):
try:
dev = args.dev
if dev is None:
print "usage: python device_details.py -d <dev>"
print "usage: python details.py -d <dev>"
else:
execute(dev)
except pyric.error as e:
Expand Down
1 change: 1 addition & 0 deletions examples/pentest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
""" pentest.py
Example for setting up a wireless environment - must be done as root
"""

import argparse as ap
Expand Down
3 changes: 2 additions & 1 deletion pyric/docs/res/PyRIC.bib → guide/PyRIC.bib
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

@Misc{libnl,
Title = {Netlink Library (libnl)},
Author = {Thomas Graf},
Expand Down Expand Up @@ -44,4 +45,4 @@ @Misc{gplv3
Shorthand = {GPL},
Url = {http://www.gnu.org/licenses/gpl.html},
Version = {3}
}
}
Loading

0 comments on commit 33a1d36

Please sign in to comment.