From ee771562a65dd5ee158b4bffc6d02318932e4e82 Mon Sep 17 00:00:00 2001 From: Victor Date: Tue, 20 Oct 2020 03:54:30 +0300 Subject: [PATCH] Prepare for publication --- .gitignore | 1 + Makefile | 25 +++++++++++++++ README.md | 59 ++++++++++++++++++++++++++++++++++++ wpspin.nim => src/wpspin.nim | 0 wpspin.nimble | 15 +++++++++ 5 files changed, 100 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 README.md rename wpspin.nim => src/wpspin.nim (100%) create mode 100644 wpspin.nimble diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a49a0bf --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.nims diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a982c0d --- /dev/null +++ b/Makefile @@ -0,0 +1,25 @@ +PREFIX ?= /usr +BINDIR = $(DESTDIR)$(PREFIX)/bin +SRCDIR = src +TARGET = wpspin +SOURCE = $(SRCDIR)/wpspin.nim + +.PHONY: all install uninstall + +all: $(TARGET) + +$(TARGET): $(SOURCE) + nimble install -y argparse + nim compile --gc:none --checks:off --out:$@ $(SOURCE) + strip $@ + nimble uninstall -y argparse + +install: $(TARGET) + install -d $(DESTDIR)$(BINDIR) + install -m 755 $< $(DESTDIR)$(BINDIR) + +uninstall: + rm $(BINDIR)/$(TARGET) + +clean: + rm -f $(TARGET) diff --git a/README.md b/README.md new file mode 100644 index 0000000..982b021 --- /dev/null +++ b/README.md @@ -0,0 +1,59 @@ +# WPS PIN generator +![GitHub](https://img.shields.io/github/license/drygdryg/wpspin-nim) +![GitHub All Releases](https://img.shields.io/github/downloads/drygdryg/wpspin-nim/total) +[![nimble](https://raw.githubusercontent.com/yglukhov/nimble-tag/master/nimble.png)](https://github.com/yglukhov/nimble-tag) + +## Overview +WPS PIN generator uses known MAC address based algorithms commonly found in routers firmware to generate their default PIN codes. PIN codes can be used with programs like [Reaver](https://github.com/t6x/reaver-wps-fork-t6x), [Bully](https://github.com/aanarchyy/bully) or [OneShot](https://github.com/drygdryg/OneShot) to recover Wi-Fi passwords. +## Installation +### Installing on Debian >= 11 or Ubuntu >= 20.04 +``` +sudo apt install -y nim +git clone https://github.com/drygdryg/wpspin-nim +cd wpspin-nim/ +make +sudo make install +``` + +### Installing on older versions of Debian/Ubuntu +Download universal Linux executable from the [releases](https://github.com/drygdryg/wpspin-nim/releases) + +### Installing on Arch Linux or Manjaro +![AUR version](https://img.shields.io/aur/version/wpspin) +``` +yay -S wpspin +``` + +### Installing on [Termux](https://play.google.com/store/apps/details?id=com.termux) +``` +pkg install nim +git clone https://github.com/drygdryg/wpspin-nim +cd wpspin-nim/ +make && make install +``` + +### Installing on Windows +Download Windows executable from the [releases](https://github.com/drygdryg/wpspin-nim/releases) + +### Installing with Nimble (platform-independent) +``` +nimble install wpspin +``` + +## Usage +Basic usage +``` +wpspin 60:A4:4C:D0:D5:80 +``` +To generate all PIN codes in addition to the suggested ones use `-A` +``` +wpspin -A 60:A4:4C:D0:D5:80 +``` +To use algorithms for testing use `-T` +``` +wpspin -A -T 60:A4:4C:D0:D5:80 +``` +*More detailed usage: `wpspin --help`* + +## Credits +3WiFi offline WPS PIN generator: https://3wifi.stascorp.com/wpspin \ No newline at end of file diff --git a/wpspin.nim b/src/wpspin.nim similarity index 100% rename from wpspin.nim rename to src/wpspin.nim diff --git a/wpspin.nimble b/wpspin.nimble new file mode 100644 index 0000000..00f940a --- /dev/null +++ b/wpspin.nimble @@ -0,0 +1,15 @@ +# Package + +version = "0.3.0" +author = "Victor Golovanenko (drygdryg)" +description = "Full-featured WPS PIN generator" +license = "MIT" +srcDir = "src" +bin = @["wpspin"] + + + +# Dependencies + +requires "nim >= 0.20.0" +requires "argparse >= 0.10.1"