From 16de5ec22caa46a6477cc727b99f1936497818af Mon Sep 17 00:00:00 2001 From: Mathias Svensson Date: Mon, 22 Aug 2016 13:11:50 -0700 Subject: [PATCH] Fix a lot of documentation (#675) --- LICENSE-pwntools.txt | 2 +- README.md | 20 ++++++++++++++------ docs/source/conf.py | 6 +++--- docs/source/index.rst | 14 ++++++++++++++ examples/README.md | 2 +- examples/gen-README.py | 2 +- extra/docker/Dockerfile | 2 +- pwnlib/asm.py | 4 ++-- pwnlib/testexample.py | 2 +- setup.py | 4 ++-- 10 files changed, 40 insertions(+), 18 deletions(-) diff --git a/LICENSE-pwntools.txt b/LICENSE-pwntools.txt index 891f006d..4e58dbd0 100644 --- a/LICENSE-pwntools.txt +++ b/LICENSE-pwntools.txt @@ -13,7 +13,7 @@ directories: - pwnlib/data/ -Copyright (c) 2015 Gallopsled and Zach Riggle +Copyright (c) 2015 Gallopsled et al. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 6af4b0f8..288d40f6 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # pwntools - CTF toolkit ![pwntools logo](https://github.com/Gallopsled/pwntools/blob/stable/docs/source/logo.png?raw=true) -[![Docs latest](https://readthedocs.org/projects/pwntools/badge/?version=latest)](https://pwntools.readthedocs.org/) -[![Docs 2.2.0](https://readthedocs.org/projects/pwntools/badge/?version=2.2.0)](https://pwntools.readthedocs.org/en/2.2.0) +[![Docs dev](https://readthedocs.org/projects/pwntools/badge/?version=dev)](https://docs.pwntools.com/en/dev) +[![Docs beta](https://readthedocs.org/projects/pwntools/badge/?version=beta)](https://docs.pwntools.com/en/beta) +[![Docs stable](https://readthedocs.org/projects/pwntools/badge/?version=stable)](https://docs.pwntools.com/en/stable) [![PyPI](https://img.shields.io/pypi/v/pwntools.svg?style=flat)](https://pypi.python.org/pypi/pwntools/) -[![Gittip](https://img.shields.io/gittip/gallopsled.svg?style=flat)](https://www.gittip.com/gallopsled/) [![Travis](https://travis-ci.org/Gallopsled/pwntools.svg?branch=stable)](https://travis-ci.org/Gallopsled/pwntools) [![Coveralls](https://img.shields.io/coveralls/Gallopsled/pwntools/stable.svg)](https://coveralls.io/github/Gallopsled/pwntools?branch=stable) [![Twitter](https://img.shields.io/badge/twitter-pwntools-4099FF.svg?style=flat)](https://twitter.com/pwntools) @@ -31,7 +31,7 @@ It will drop you into a clean, Docker-ized container. There is nothing of value [key]: https://gist.githubusercontent.com/zachriggle/efa2e0080ae6de2e8344/raw/4b503e9db54f009d97477d03d4ba5678471f8ff0/id_rsa # Documentation -Our documentation is available at [pwntools.readthedocs.org](https://pwntools.readthedocs.org/) +Our documentation is available at [docs.pwntools.com](https://docs.pwntools.com/) To get you started, we've provided some example solutions for past CTF challenges in our [write-ups repository](https://github.com/Gallopsled/pwntools-write-ups). @@ -44,10 +44,18 @@ Most of the functionality of pwntools is self-contained and Python-only. You sh ```sh apt-get update apt-get install python2.7 python-pip python-dev git libssl-dev -pip install --upgrade git+https://github.com/Gallopsled/pwntools.git + +# For cutting edge: +pip install --upgrade git+https://github.com/Gallopsled/pwntools.git@dev + +# If you want early access to the next release to help file bugs: +pip install --upgrade git+https://github.com/Gallopsled/pwntools.git@beta + +# If you just want it to work +pip install pwntools ``` -However, some of the features (assembling/disassembling foreign architectures) require non-Python dependencies. For more information, see the [complete installation instructions here](https://pwntools.readthedocs.org/en/latest/install.html). +However, some of the features (assembling/disassembling foreign architectures) require non-Python dependencies. For more information, see the [complete installation instructions here](https://docs.pwntools.com/en/dev/install.html). # Contribution diff --git a/docs/source/conf.py b/docs/source/conf.py index 5b76ed52..a441e30a 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -75,7 +75,7 @@ master_doc = 'index' # General information about the project. project = u'pwntools' -copyright = u'2015, Zach Riggle' +copyright = u'2016, Gallopsled et al.' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -217,7 +217,7 @@ latex_elements = { # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ ('index', 'pwntools.tex', u'pwntools Documentation', - u'2015, Zach Riggle', 'manual'), + u'2016, Gallopsled et al.', 'manual'), ] intersphinx_mapping = {'python': ('https://docs.python.org/2.7', None), @@ -250,7 +250,7 @@ intersphinx_mapping = {'python': ('https://docs.python.org/2.7', None), # (source start file, name, description, authors, manual section). man_pages = [ ('index', 'pwntools', u'pwntools Documentation', - [u'2015, Zach Riggle'], 1) + [u'2016, Gallopsled et al.'], 1) ] # If true, show URL addresses after external links. diff --git a/docs/source/index.rst b/docs/source/index.rst index 104c0204..5ce4112c 100755 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -5,6 +5,20 @@ pwntools Written in Python, it is designed for rapid prototyping and development, and intended to make exploit writing as simple as possible. +The primary location for this documentation is at docs.pwntools.com_, which uses +readthedocs_. It comes in three primary flavors: + +- Stable_ +- Beta_ +- Dev_ + +.. _readthedocs: https://readthedocs.org +.. _docs.pwntools.com: https://docs.pwntools.com +.. _Stable: https://docs.pwntools.com/en/stable +.. _Beta: https://docs.pwntools.com/en/beta +.. _Dev: https://docs.pwntools.com/en/dev + + Getting Started --------------- diff --git a/examples/README.md b/examples/README.md index aecbfed8..61d382f1 100644 --- a/examples/README.md +++ b/examples/README.md @@ -4,7 +4,7 @@ the pwntools project. We have a plan to create a separate repository with examples, primarily exploits. Until we do so, we recommend new users to look at -https://pwntools.readthedocs.org, as this is a better overview of our features. +https://docs.pwntools.com, as this is a better overview of our features. In no particular order the docstrings for each example: diff --git a/examples/gen-README.py b/examples/gen-README.py index 7b36dbed..4340be4c 100644 --- a/examples/gen-README.py +++ b/examples/gen-README.py @@ -11,7 +11,7 @@ the pwntools project. We have a plan to create a separate repository with examples, primarily exploits. Until we do so, we recommend new users to look at -https://pwntools.readthedocs.org, as this is a better overview of our features. +https://docs.pwntools.com, as this is a better overview of our features. In no particular order the docstrings for each example: diff --git a/extra/docker/Dockerfile b/extra/docker/Dockerfile index 0dcf2ed3..1330dbe0 100644 --- a/extra/docker/Dockerfile +++ b/extra/docker/Dockerfile @@ -4,7 +4,7 @@ ############################################################ FROM ubuntu:trusty -MAINTAINER Maintainer Zach Riggle +MAINTAINER Maintainer Gallopsled et al. RUN apt-get update && apt-get install -y software-properties-common RUN apt-add-repository --yes ppa:pwntools/binutils diff --git a/pwnlib/asm.py b/pwnlib/asm.py index 9bb212a5..341de2f6 100644 --- a/pwnlib/asm.py +++ b/pwnlib/asm.py @@ -133,7 +133,7 @@ def which_binutils(util): log.warning(""" Could not find %(util)r installed for %(context)s Try installing binutils for this architecture: -https://pwntools.readthedocs.org/en/latest/install/binutils.html +https://docs.pwntools.com/en/dev/install/binutils.html """.strip() % locals()) raise Exception('Could not find %(util)r installed for %(context)s' % locals()) @@ -179,7 +179,7 @@ def _assembler(): version = re.search(r' (\d\.\d+)', result).group(1) if version < '2.19': log.warn_once('Your binutils version is too old and may not work!\n' + \ - 'Try updating with: https://pwntools.readthedocs.org/en/latest/install/binutils.html\n' + \ + 'Try updating with: https://docs.pwntools.com/en/dev/install/binutils.html\n' + \ 'Reported Version: %r' % result.strip()) diff --git a/pwnlib/testexample.py b/pwnlib/testexample.py index 62425c74..2c373513 100644 --- a/pwnlib/testexample.py +++ b/pwnlib/testexample.py @@ -3,7 +3,7 @@ Module-level documentation would go here, along with a general description of the functionality. You can also add module-level doctests. You can see what the documentation for this module will look like here: -https://pwntools.readthedocs.org/en/latest/testexample.html +https://docs.pwntools.com/en/dev/testexample.html The tests for this module are run when the documentation is automatically-generated by Sphinx. This particular module is invoked by an "automodule" directive, which diff --git a/setup.py b/setup.py index 8da4d38c..36593052 100644 --- a/setup.py +++ b/setup.py @@ -76,8 +76,8 @@ setup( entry_points = {'console_scripts': console_scripts}, scripts = glob.glob("bin/*"), description = "CTF framework and exploit development library.", - author = "Zach Riggle", - author_email = "zachriggle@gmail.com", + author = "Gallopsled et al.", + author_email = "#pwntools @ freenode.net", url = 'https://pwntools.com', download_url = "https://pwntools.com/tarball/stable", install_requires = install_requires,