Skip to content

Commit

Permalink
Merge pull request #3 from cytopia/release-0.4.0
Browse files Browse the repository at this point in the history
Follow semver and add GitHub actions
  • Loading branch information
cytopia authored Jan 23, 2020
2 parents 56ed5bd + 9fa2d37 commit 1099804
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 8 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---

###
### Lints all generic and json files in the whole git repository
###

name: linting
on:
pull_request:
push:
branches:
- master
tags:

jobs:
lint:
runs-on: ubuntu-latest
strategy:
fail-fast: False
matrix:
target:
- pycodestyle
- pydocstyle
- black

name: "[ ${{ matrix.target }} ]"
steps:
- name: Checkout repository
uses: actions/checkout@master

- name: Lint
run: |
make ${target}
env:
target: ${{ matrix.target }}
11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ endif


VERSION = 2.7
BINNAME = badchars

# -------------------------------------------------------------------------------------------------
# Default Target
Expand All @@ -29,13 +30,13 @@ help:
lint: pycodestyle pydocstyle black

pycodestyle:
docker run --rm -v $(PWD):/data cytopia/pycodestyle --show-source --show-pep8 badchars
docker run --rm -v $(PWD):/data cytopia/pycodestyle --show-source --show-pep8 $(BINNAME)

pydocstyle:
docker run --rm -v $(PWD):/data cytopia/pydocstyle badchars
docker run --rm -v $(PWD):/data cytopia/pydocstyle $(BINNAME)

black:
docker run --rm -v ${PWD}:/data cytopia/black -l 100 badchars
docker run --rm -v ${PWD}:/data cytopia/black -l 100 --check --diff $(BINNAME)


# -------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -110,8 +111,8 @@ autoformat:
$$(tty -s && echo "-it" || echo) \
-v $(PWD):/data \
-w /data \
cytopia/black -l 100 badchars
cytopia/black -l 100 $(BINNAME)
clean:
-rm -rf badchars.egg-info/
-rm -rf $(BINNAME).egg-info/
-rm -rf dist/
-rm -rf build/
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
# badchars

[![](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![PyPI](https://img.shields.io/pypi/v/badchars)](https://pypi.org/project/badchars/)
[![PyPI - Status](https://img.shields.io/pypi/status/badchars)](https://pypi.org/project/badchars/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/badchars)](https://pypi.org/project/badchars/)
[![PyPI - Format](https://img.shields.io/pypi/format/badchars)](https://pypi.org/project/badchars/)
[![PyPI - Implementation](https://img.shields.io/pypi/implementation/badchars)](https://pypi.org/project/badchars/)
[![PyPI - License](https://img.shields.io/pypi/l/badchars)](https://pypi.org/project/badchars/)

[![Build Status](https://github.com/cytopia/badchars/workflows/linting/badge.svg)](https://github.com/cytopia/badchars/actions?workflow=linting)

A hex bad char generator to instruct encoders such as [shikata-ga-nai](https://github.com/rapid7/metasploit-framework/blob/master/modules/encoders/x86/shikata_ga_nai.rb)
to transform those to other chars.



## Installation
```bash
pip install badchars
Expand Down
2 changes: 1 addition & 1 deletion badchars
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def main():
"-v",
"--version",
action="version",
version="%(prog)s 0.3 by cytopia",
version="%(prog)s 0.4.0 by cytopia",
help="Show version information,",
)
parser.add_argument(
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name="badchars",
version="0.3",
version="0.4.0",
description="A hex badchar generator for different programming languages.",
license="MIT",
long_description=long_description,
Expand Down

0 comments on commit 1099804

Please sign in to comment.