Skip to content

Commit

Permalink
OWTF 0.16 "shady citizen" : Eclipse project files added & minor bug f…
Browse files Browse the repository at this point in the history
…ixed in owtf.py
  • Loading branch information
flabbergastedbd committed May 10, 2013
1 parent 4102fbb commit 3a417f0
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 15 deletions.
5 changes: 0 additions & 5 deletions .gitignore
Expand Up @@ -15,8 +15,3 @@ tools/restricted/*
# Defined OWTF tests with potential proprietary information #
################################################################
tests/restricted/*

# Eclipse files #
#################
.pydevproject
.project
17 changes: 17 additions & 0 deletions .project
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>OWTF</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.python.pydev.PyDevBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.python.pydev.pythonNature</nature>
</natures>
</projectDescription>
8 changes: 8 additions & 0 deletions .pydevproject
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?><pydev_project>
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
<path>/owtf</path>
</pydev_pathproperty>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
</pydev_project>
2 changes: 1 addition & 1 deletion owtf.py
Expand Up @@ -151,7 +151,7 @@ def ProcessOptions(Core):
if PluginGroup != 'web':
Usage("The quiet plugin type can only be used for the web plugin group currently")
elif Arg.PluginType not in PluginTypesForGroup:
Usage("Invalid Plugin Type '"+str(PluginType)+"' for Plugin Group '"+str(PluginGroup)+"'. Valid Types: "+', '.join(PluginTypesForGroup))
Usage("Invalid Plugin Type '"+str(Arg.PluginType)+"' for Plugin Group '"+str(PluginGroup)+"'. Valid Types: "+', '.join(PluginTypesForGroup))

Scope = Arg.Targets # Arguments at the end are the URL target(s)
NumTargets = len(Scope)
Expand Down
1 change: 1 addition & 0 deletions readme/CHANGELOG
Expand Up @@ -20,6 +20,7 @@
+ fixed minor pentesting vs. pen testing typo on owtf.py :)
+ Merged new pull request from Bharadwaj Machiraju (@tunnelshade): OWTF restricted dictionary installation and merging scripts thank you!
+ Minor improvements to pull request above after testing (linking raft files instead of copying again, fixing svndigger_raft_dict_merger.py permissions)
+ Added .project files in order to allow importing of OWTF project into Eclipse, revised readme/CONTRIBUTORS and a bug fix in owtf.py <=> @tunnelshade

24/09/2012 - 0.15 "Brucon" pre-alpha release: Dedicated to Brucon (http://brucon.org), its organisers and attendants
+ Changed name to OWASP OWTF since this is an OWASP project now, thank you OWASP! - https://www.owasp.org/index.php/OWASP_OWTF
Expand Down
32 changes: 23 additions & 9 deletions readme/CONTRIBUTORS
Expand Up @@ -6,7 +6,7 @@ owtf git installation script (very basic atm): owtf_dir/install/install_git.sh
GIT installation/setup instructions: http://help.github.com/linux-set-up-git/

Development IDE: After using only vi for months I switched to: eclipse + pydev
Installation steps (should work fine on Ubuntu / Backtrack):
Installation steps (should work fine on Ubuntu / Backtrack / Kali Linux):
1) apt-get install eclipse
Below is mostly from these guides but correcting the pydev.org URL:
http://pluthon.garage.maemo.org/1st_edition/pydev.html
Expand All @@ -17,21 +17,33 @@ http://cs.calvin.edu/curriculum/cs/106/resources/pythonOnEclipse/1.installingPyD
5) Next / Next / Finish :)
6) Trust the Atana certificate
7) Restart Eclipse
8) Create new OWTF project selecting PyDev
9) Click on "Please configure an interpreter .."
8) Go to Windows / Preferences
9) In the dialog box select Pydev / Interpreter - Python.
10) On the python interpreters box (at the top) click "New"
11) Interpreter name: python2.6 + Interpreter Location: /usr/bin/python2.6 (or run whereis python2.6)
12) ok, apply + fight until you get the settings you like :P
13) This might help: http://stackoverflow.com/questions/186118/eclipse-fonts-and-background-color
14) Right click on code window / Preferences / Click on "Show whitespace characters" and make sure that "insert spaces for tabs" is DISABLED!!!
15) Ensure when you click on the "tab" key there are no dots "." and if so: right click on code window / Toggle force tabs
NOTE: The OWTF codebase uses tabs for indentation, please be consistent with this. Thank you.
If you are like me you might find the following helpful to have word wrap working in Eclipse:
14) Right click on code window / Preferences / Click on "Show whitespace characters" and make sure that "insert spaces for tabs" is ENABLED!!!
15) Ensure that 1 tab is replaced by 4 spaces.
16) If you are like me you might find the following helpful to have word wrap working in Eclipse:
http://ahtik.com/blog/projects/eclipse-word-wrap/
16) External library method/properties completion:
17) External library method/properties completion:
Project / PyDev - PYTHON PATH / External libraries tab / Add Source Folder:
/usr/share/pyshared/twisted (for twisted completion, location on bactrack 5)

Importing the OWTF pydev-project into Eclipse.
1) In eclipse, go to files > import > general > existing projects into workspace
2) Select the OWTF folder as root directory.
3) Check the OWTF project.
4) Click on Finish. The OWTF project will be imported.

In order to write the code for OWTF in the pythonic way, it is recommended to enable PEP 8 styling guide in eclipse.
Follow these steps to integrate pep8.py with eclipse:
1) In your Eclipse, go to Window->Preferences
2) Choose PyDev->Editor->Code Analysis
3) Go to pep8.py tab
4) Choose the radio button for warning and click Ok.

right click on editor window / preferences DOES NOT WORK for many things you should:
Go to Window / Preferences / PyDev / Editor and adjust your settings here (tab defaults here override the Eclipse defaults, for example)

Expand All @@ -43,5 +55,7 @@ DID NOT WORK:
2) Copy it here (Backtrack 5, but you get the idea): /usr/lib/eclipse/plugins
3) Restart Eclipse
4) Go to Window / Preferences / Vim Plugin / set the location to: /usr/bin/vim
5)

The tasks to be done should be added as a TO-DO comment in eclipse.
(Refer http://pydev.org/manual_adv_tasks.html). The comment below will add task to the TODO list.
#TODO: Link/Message

0 comments on commit 3a417f0

Please sign in to comment.