oswg 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- oswg-0.1.1/.github/workflows/release-binaries.yml +107 -0
- oswg-0.1.1/.github/workflows/release.yml +71 -0
- oswg-0.1.1/.gitignore +54 -0
- oswg-0.1.1/LICENSE +21 -0
- oswg-0.1.1/PKG-INFO +161 -0
- oswg-0.1.1/README.md +123 -0
- oswg-0.1.1/build_binary.py +77 -0
- oswg-0.1.1/oswg.spec +82 -0
- oswg-0.1.1/pyproject.toml +86 -0
- oswg-0.1.1/src/oswg/__init__.py +3 -0
- oswg-0.1.1/src/oswg/__main__.py +5 -0
- oswg-0.1.1/src/oswg/cli.py +207 -0
- oswg-0.1.1/src/oswg/cli_utils.py +68 -0
- oswg-0.1.1/src/oswg/config.py +47 -0
- oswg-0.1.1/src/oswg/core/__init__.py +8 -0
- oswg-0.1.1/src/oswg/core/generator.py +97 -0
- oswg-0.1.1/src/oswg/core/models.py +70 -0
- oswg-0.1.1/src/oswg/core/mutations.py +164 -0
- oswg-0.1.1/src/oswg/core/scraper.py +114 -0
- oswg-0.1.1/src/oswg/database.py +178 -0
- oswg-0.1.1/src/oswg/launcher.py +151 -0
- oswg-0.1.1/src/oswg/models.py +102 -0
- oswg-0.1.1/src/oswg/routers/__init__.py +1 -0
- oswg-0.1.1/src/oswg/routers/generate.py +109 -0
- oswg-0.1.1/src/oswg/routers/jobs.py +160 -0
- oswg-0.1.1/src/oswg/routers/mutate.py +41 -0
- oswg-0.1.1/src/oswg/routers/scrape.py +93 -0
- oswg-0.1.1/src/oswg/server.py +93 -0
- oswg-0.1.1/src/oswg/services/__init__.py +14 -0
- oswg-0.1.1/src/oswg/services/file_manager.py +82 -0
- oswg-0.1.1/src/oswg/services/job_manager.py +103 -0
- oswg-0.1.1/src/oswg/services/progress.py +136 -0
- oswg-0.1.1/src/oswg/static/index.html +0 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build:
|
|
10
|
+
name: Build ${{ matrix.target }}
|
|
11
|
+
strategy:
|
|
12
|
+
fail-fast: false
|
|
13
|
+
matrix:
|
|
14
|
+
include:
|
|
15
|
+
- os: ubuntu-latest
|
|
16
|
+
target: linux-x86_64
|
|
17
|
+
artifact_name: oswg-linux-x86_64
|
|
18
|
+
binary_name: oswg
|
|
19
|
+
- os: macos-latest
|
|
20
|
+
target: macos-x86_64
|
|
21
|
+
artifact_name: oswg-macos-x86_64
|
|
22
|
+
binary_name: oswg
|
|
23
|
+
- os: macos-latest
|
|
24
|
+
target: macos-arm64
|
|
25
|
+
artifact_name: oswg-macos-arm64
|
|
26
|
+
binary_name: oswg
|
|
27
|
+
|
|
28
|
+
runs-on: ${{ matrix.os }}
|
|
29
|
+
permissions:
|
|
30
|
+
contents: write
|
|
31
|
+
steps:
|
|
32
|
+
- name: Checkout
|
|
33
|
+
uses: actions/checkout@v4
|
|
34
|
+
|
|
35
|
+
- name: Set up Python
|
|
36
|
+
uses: actions/setup-python@v5
|
|
37
|
+
with:
|
|
38
|
+
python-version: "3.12"
|
|
39
|
+
|
|
40
|
+
- name: Set up Node.js
|
|
41
|
+
uses: actions/setup-node@v4
|
|
42
|
+
with:
|
|
43
|
+
node-version: "20"
|
|
44
|
+
|
|
45
|
+
- name: Build
|
|
46
|
+
run: |
|
|
47
|
+
python -m pip install --upgrade pip
|
|
48
|
+
pip install pyinstaller
|
|
49
|
+
python build_binary.py
|
|
50
|
+
|
|
51
|
+
- name: Upload binary
|
|
52
|
+
uses: actions/upload-artifact@v4
|
|
53
|
+
with:
|
|
54
|
+
name: ${{ matrix.artifact_name }}
|
|
55
|
+
path: dist/${{ matrix.binary_name }}
|
|
56
|
+
|
|
57
|
+
publish-pypi:
|
|
58
|
+
name: Publish to PyPI
|
|
59
|
+
needs: build
|
|
60
|
+
runs-on: ubuntu-latest
|
|
61
|
+
continue-on-error: true
|
|
62
|
+
steps:
|
|
63
|
+
- name: Checkout
|
|
64
|
+
uses: actions/checkout@v4
|
|
65
|
+
|
|
66
|
+
- name: Set up Python
|
|
67
|
+
uses: actions/setup-python@v5
|
|
68
|
+
with:
|
|
69
|
+
python-version: "3.12"
|
|
70
|
+
|
|
71
|
+
- name: Build sdist and wheel
|
|
72
|
+
run: |
|
|
73
|
+
python -m pip install --upgrade pip
|
|
74
|
+
pip install build
|
|
75
|
+
python -m build
|
|
76
|
+
|
|
77
|
+
- name: Publish to PyPI
|
|
78
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
79
|
+
with:
|
|
80
|
+
user: __token__
|
|
81
|
+
password: ${{ secrets.PYPI_API_KEY }}
|
|
82
|
+
packages-dir: dist/
|
|
83
|
+
skip-existing: true
|
|
84
|
+
|
|
85
|
+
release:
|
|
86
|
+
name: Create GitHub Release
|
|
87
|
+
needs: [build, publish-pypi]
|
|
88
|
+
if: success() || failure()
|
|
89
|
+
runs-on: ubuntu-latest
|
|
90
|
+
permissions:
|
|
91
|
+
contents: write
|
|
92
|
+
steps:
|
|
93
|
+
- name: Download all artifacts
|
|
94
|
+
uses: actions/download-artifact@v4
|
|
95
|
+
with:
|
|
96
|
+
path: artifacts
|
|
97
|
+
|
|
98
|
+
- name: Create release
|
|
99
|
+
uses: softprops/action-gh-release@v2
|
|
100
|
+
with:
|
|
101
|
+
files: |
|
|
102
|
+
artifacts/oswg-linux-x86_64/oswg
|
|
103
|
+
artifacts/oswg-macos-x86_64/oswg
|
|
104
|
+
artifacts/oswg-macos-arm64/oswg
|
|
105
|
+
generate_release_notes: true
|
|
106
|
+
draft: false
|
|
107
|
+
prerelease: false
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
name: Semantic Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
release:
|
|
10
|
+
name: Semantic Release
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
permissions:
|
|
13
|
+
contents: write
|
|
14
|
+
issues: write
|
|
15
|
+
pull-requests: write
|
|
16
|
+
steps:
|
|
17
|
+
- name: Checkout
|
|
18
|
+
uses: actions/checkout@v4
|
|
19
|
+
with:
|
|
20
|
+
fetch-depth: 0
|
|
21
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
22
|
+
|
|
23
|
+
- name: Set up Python
|
|
24
|
+
uses: actions/setup-python@v5
|
|
25
|
+
with:
|
|
26
|
+
python-version: "3.12"
|
|
27
|
+
|
|
28
|
+
- name: Install dependencies
|
|
29
|
+
run: |
|
|
30
|
+
python -m pip install --upgrade pip
|
|
31
|
+
pip install python-semantic-release
|
|
32
|
+
|
|
33
|
+
- name: Run semantic-release
|
|
34
|
+
env:
|
|
35
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
36
|
+
run: |
|
|
37
|
+
semantic-release version --noop
|
|
38
|
+
semantic-release publish
|
|
39
|
+
|
|
40
|
+
build-binary:
|
|
41
|
+
name: Build Binary
|
|
42
|
+
needs: release
|
|
43
|
+
runs-on: ubuntu-latest
|
|
44
|
+
permissions:
|
|
45
|
+
contents: write
|
|
46
|
+
steps:
|
|
47
|
+
- name: Checkout
|
|
48
|
+
uses: actions/checkout@v4
|
|
49
|
+
|
|
50
|
+
- name: Set up Python
|
|
51
|
+
uses: actions/setup-python@v5
|
|
52
|
+
with:
|
|
53
|
+
python-version: "3.12"
|
|
54
|
+
|
|
55
|
+
- name: Set up Node.js
|
|
56
|
+
uses: actions/setup-node@v4
|
|
57
|
+
with:
|
|
58
|
+
node-version: "20"
|
|
59
|
+
|
|
60
|
+
- name: Build and attach
|
|
61
|
+
run: |
|
|
62
|
+
python -m pip install --upgrade pip
|
|
63
|
+
pip install pyinstaller
|
|
64
|
+
python build_binary.py
|
|
65
|
+
ls -la dist/
|
|
66
|
+
|
|
67
|
+
- name: Upload binary
|
|
68
|
+
uses: actions/upload-artifact@v4
|
|
69
|
+
with:
|
|
70
|
+
name: oswg-linux-x86_64
|
|
71
|
+
path: dist/oswg
|
oswg-0.1.1/.gitignore
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.so
|
|
6
|
+
.Python
|
|
7
|
+
build/
|
|
8
|
+
develop-eggs/
|
|
9
|
+
dist/
|
|
10
|
+
downloads/
|
|
11
|
+
eggs/
|
|
12
|
+
.eggs/
|
|
13
|
+
lib/
|
|
14
|
+
lib64/
|
|
15
|
+
parts/
|
|
16
|
+
sdist/
|
|
17
|
+
var/
|
|
18
|
+
wheels/
|
|
19
|
+
*.egg-info/
|
|
20
|
+
.installed.cfg
|
|
21
|
+
*.egg
|
|
22
|
+
|
|
23
|
+
# Virtual environments
|
|
24
|
+
venv/
|
|
25
|
+
env/
|
|
26
|
+
ENV/
|
|
27
|
+
|
|
28
|
+
# PyInstaller
|
|
29
|
+
*.spec.bak
|
|
30
|
+
build/
|
|
31
|
+
dist/
|
|
32
|
+
|
|
33
|
+
# Node
|
|
34
|
+
node_modules/
|
|
35
|
+
ui/build/
|
|
36
|
+
ui/.svelte-kit/
|
|
37
|
+
|
|
38
|
+
# IDE
|
|
39
|
+
.vscode/
|
|
40
|
+
.idea/
|
|
41
|
+
*.swp
|
|
42
|
+
*.swo
|
|
43
|
+
.DS_Store
|
|
44
|
+
|
|
45
|
+
# Environment
|
|
46
|
+
.env
|
|
47
|
+
.env.local
|
|
48
|
+
.env.*.local
|
|
49
|
+
|
|
50
|
+
# OSWG data
|
|
51
|
+
*.db
|
|
52
|
+
*.db-journal
|
|
53
|
+
*.db-shm
|
|
54
|
+
*.db-wal
|
oswg-0.1.1/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Dimitris Marakomichelakis
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
oswg-0.1.1/PKG-INFO
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: oswg
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: Oddly Specific Wordlist Generator - Generate targeted wordlists from website content
|
|
5
|
+
Author: Dimitris Marakomichelakis
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Keywords: cybersecurity,osint,pentesting,scraper,security,wordlist
|
|
9
|
+
Classifier: Development Status :: 3 - Alpha
|
|
10
|
+
Classifier: Environment :: Console
|
|
11
|
+
Classifier: Intended Audience :: Information Technology
|
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Topic :: Security
|
|
19
|
+
Requires-Python: >=3.10
|
|
20
|
+
Requires-Dist: aiosqlite>=0.19.0
|
|
21
|
+
Requires-Dist: beautifulsoup4>=4.12.0
|
|
22
|
+
Requires-Dist: fastapi>=0.110.0
|
|
23
|
+
Requires-Dist: httpx>=0.27.0
|
|
24
|
+
Requires-Dist: lxml>=5.1.0
|
|
25
|
+
Requires-Dist: pydantic-settings>=2.1.0
|
|
26
|
+
Requires-Dist: pydantic>=2.6.0
|
|
27
|
+
Requires-Dist: rich>=13.7.0
|
|
28
|
+
Requires-Dist: typer>=0.12.0
|
|
29
|
+
Requires-Dist: uvicorn[standard]>=0.27.0
|
|
30
|
+
Requires-Dist: websockets>=12.0
|
|
31
|
+
Provides-Extra: dev
|
|
32
|
+
Requires-Dist: pyinstaller>=6.0.0; extra == 'dev'
|
|
33
|
+
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
|
|
34
|
+
Requires-Dist: pytest-cov>=4.1.0; extra == 'dev'
|
|
35
|
+
Requires-Dist: pytest>=8.0.0; extra == 'dev'
|
|
36
|
+
Requires-Dist: ruff>=0.3.0; extra == 'dev'
|
|
37
|
+
Description-Content-Type: text/markdown
|
|
38
|
+
|
|
39
|
+
# OSWG - Oddly Specific Wordlist Generator
|
|
40
|
+
|
|
41
|
+
A tool that generates targeted wordlists by scraping websites and applying intelligent mutations. Designed for penetration testers and security researchers.
|
|
42
|
+
|
|
43
|
+
## Features
|
|
44
|
+
|
|
45
|
+
- **Scrape** websites for relevant keywords
|
|
46
|
+
- **Generate** wordlists with l33t speak, capitalization, numbers, and special character mutations
|
|
47
|
+
- **Mutate** existing wordlists with the same transformation rules
|
|
48
|
+
- **Web UI** with real-time progress via WebSocket
|
|
49
|
+
- **Single binary** — CLI and web dashboard in one executable
|
|
50
|
+
- **XDG-compliant** — data stored in `~/.local/share/oswg/`
|
|
51
|
+
|
|
52
|
+
## Installation
|
|
53
|
+
|
|
54
|
+
### Option 1: Download prebuilt binary (recommended)
|
|
55
|
+
|
|
56
|
+
Download the latest release for your platform from the [Releases page](https://github.com/yourusername/oswg/releases).
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
# Linux
|
|
60
|
+
wget https://github.com/yourusername/oswg/releases/latest/download/oswg-linux-x86_64
|
|
61
|
+
chmod +x oswg-linux-x86_64
|
|
62
|
+
./oswg-linux-x86_64 --ui
|
|
63
|
+
|
|
64
|
+
# macOS
|
|
65
|
+
wget https://github.com/yourusername/oswg/releases/latest/download/oswg-macos-arm64
|
|
66
|
+
chmod +x oswg-macos-arm64
|
|
67
|
+
./oswg-macos-arm64 --ui
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Option 2: Install via pip
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
pip install oswg
|
|
74
|
+
oswg --ui
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Usage
|
|
78
|
+
|
|
79
|
+
### CLI Mode
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
# Generate a wordlist
|
|
83
|
+
oswg generate https://example.com --size 50000 -o wordlist.txt
|
|
84
|
+
|
|
85
|
+
# Scrape keywords only
|
|
86
|
+
oswg scrape https://example.com --max-pages 5
|
|
87
|
+
|
|
88
|
+
# Mutate words
|
|
89
|
+
oswg mutate password admin login --numbers --special -o mutations.txt
|
|
90
|
+
oswg mutate --file words.txt -o mutations.txt
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Web Dashboard
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
oswg --ui
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
The dashboard will automatically open in your browser at `http://127.0.0.1:8000`. If port 8000 is busy, it will auto-increment to 8001, 8002, etc.
|
|
100
|
+
|
|
101
|
+
**Options:**
|
|
102
|
+
- `--port 8080` — Start at a custom port
|
|
103
|
+
- `--host 0.0.0.0` — Bind to all interfaces (use with caution)
|
|
104
|
+
- `--no-browser` — Don't open the browser automatically
|
|
105
|
+
|
|
106
|
+
## Data Location
|
|
107
|
+
|
|
108
|
+
OSWG follows the [XDG Base Directory Specification](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html):
|
|
109
|
+
|
|
110
|
+
- **Data:** `~/.local/share/oswg/` (database, generated wordlists)
|
|
111
|
+
- **Config:** `~/.config/oswg/` (future use)
|
|
112
|
+
- **Cache:** `~/.cache/oswg/` (future use)
|
|
113
|
+
|
|
114
|
+
Override with environment variables:
|
|
115
|
+
- `XDG_DATA_HOME` — Change the data directory
|
|
116
|
+
- `OSWG_DATA_DIR` — Override the oswg-specific directory
|
|
117
|
+
|
|
118
|
+
## Development
|
|
119
|
+
|
|
120
|
+
### Build from source
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
git clone https://github.com/yourusername/oswg
|
|
124
|
+
cd oswg
|
|
125
|
+
|
|
126
|
+
# Install dependencies
|
|
127
|
+
pip install -e ".[dev]"
|
|
128
|
+
|
|
129
|
+
# Run CLI
|
|
130
|
+
oswg generate https://example.com
|
|
131
|
+
|
|
132
|
+
# Run web UI
|
|
133
|
+
oswg --ui
|
|
134
|
+
|
|
135
|
+
# Build standalone binary
|
|
136
|
+
python build.py
|
|
137
|
+
# → dist/oswg
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Project Structure
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
oswg/
|
|
144
|
+
├── src/oswg/ # Unified Python package
|
|
145
|
+
│ ├── core/ # Scraping & mutation engine
|
|
146
|
+
│ ├── routers/ # FastAPI routes
|
|
147
|
+
│ ├── services/ # Job management, file management
|
|
148
|
+
│ ├── cli.py # Typer CLI entry point
|
|
149
|
+
│ ├── launcher.py # --ui launcher
|
|
150
|
+
│ └── static/ # SvelteKit build output
|
|
151
|
+
├── ui/ # SvelteKit source
|
|
152
|
+
├── tests/ # Test suite
|
|
153
|
+
├── build.py # PyInstaller build script
|
|
154
|
+
├── oswg.spec # PyInstaller spec
|
|
155
|
+
├── pyproject.toml # Package configuration
|
|
156
|
+
└── .github/workflows/ # CI/CD
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## License
|
|
160
|
+
|
|
161
|
+
MIT
|
oswg-0.1.1/README.md
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# OSWG - Oddly Specific Wordlist Generator
|
|
2
|
+
|
|
3
|
+
A tool that generates targeted wordlists by scraping websites and applying intelligent mutations. Designed for penetration testers and security researchers.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Scrape** websites for relevant keywords
|
|
8
|
+
- **Generate** wordlists with l33t speak, capitalization, numbers, and special character mutations
|
|
9
|
+
- **Mutate** existing wordlists with the same transformation rules
|
|
10
|
+
- **Web UI** with real-time progress via WebSocket
|
|
11
|
+
- **Single binary** — CLI and web dashboard in one executable
|
|
12
|
+
- **XDG-compliant** — data stored in `~/.local/share/oswg/`
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
### Option 1: Download prebuilt binary (recommended)
|
|
17
|
+
|
|
18
|
+
Download the latest release for your platform from the [Releases page](https://github.com/yourusername/oswg/releases).
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# Linux
|
|
22
|
+
wget https://github.com/yourusername/oswg/releases/latest/download/oswg-linux-x86_64
|
|
23
|
+
chmod +x oswg-linux-x86_64
|
|
24
|
+
./oswg-linux-x86_64 --ui
|
|
25
|
+
|
|
26
|
+
# macOS
|
|
27
|
+
wget https://github.com/yourusername/oswg/releases/latest/download/oswg-macos-arm64
|
|
28
|
+
chmod +x oswg-macos-arm64
|
|
29
|
+
./oswg-macos-arm64 --ui
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Option 2: Install via pip
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pip install oswg
|
|
36
|
+
oswg --ui
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Usage
|
|
40
|
+
|
|
41
|
+
### CLI Mode
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
# Generate a wordlist
|
|
45
|
+
oswg generate https://example.com --size 50000 -o wordlist.txt
|
|
46
|
+
|
|
47
|
+
# Scrape keywords only
|
|
48
|
+
oswg scrape https://example.com --max-pages 5
|
|
49
|
+
|
|
50
|
+
# Mutate words
|
|
51
|
+
oswg mutate password admin login --numbers --special -o mutations.txt
|
|
52
|
+
oswg mutate --file words.txt -o mutations.txt
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Web Dashboard
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
oswg --ui
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
The dashboard will automatically open in your browser at `http://127.0.0.1:8000`. If port 8000 is busy, it will auto-increment to 8001, 8002, etc.
|
|
62
|
+
|
|
63
|
+
**Options:**
|
|
64
|
+
- `--port 8080` — Start at a custom port
|
|
65
|
+
- `--host 0.0.0.0` — Bind to all interfaces (use with caution)
|
|
66
|
+
- `--no-browser` — Don't open the browser automatically
|
|
67
|
+
|
|
68
|
+
## Data Location
|
|
69
|
+
|
|
70
|
+
OSWG follows the [XDG Base Directory Specification](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html):
|
|
71
|
+
|
|
72
|
+
- **Data:** `~/.local/share/oswg/` (database, generated wordlists)
|
|
73
|
+
- **Config:** `~/.config/oswg/` (future use)
|
|
74
|
+
- **Cache:** `~/.cache/oswg/` (future use)
|
|
75
|
+
|
|
76
|
+
Override with environment variables:
|
|
77
|
+
- `XDG_DATA_HOME` — Change the data directory
|
|
78
|
+
- `OSWG_DATA_DIR` — Override the oswg-specific directory
|
|
79
|
+
|
|
80
|
+
## Development
|
|
81
|
+
|
|
82
|
+
### Build from source
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
git clone https://github.com/yourusername/oswg
|
|
86
|
+
cd oswg
|
|
87
|
+
|
|
88
|
+
# Install dependencies
|
|
89
|
+
pip install -e ".[dev]"
|
|
90
|
+
|
|
91
|
+
# Run CLI
|
|
92
|
+
oswg generate https://example.com
|
|
93
|
+
|
|
94
|
+
# Run web UI
|
|
95
|
+
oswg --ui
|
|
96
|
+
|
|
97
|
+
# Build standalone binary
|
|
98
|
+
python build.py
|
|
99
|
+
# → dist/oswg
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Project Structure
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
oswg/
|
|
106
|
+
├── src/oswg/ # Unified Python package
|
|
107
|
+
│ ├── core/ # Scraping & mutation engine
|
|
108
|
+
│ ├── routers/ # FastAPI routes
|
|
109
|
+
│ ├── services/ # Job management, file management
|
|
110
|
+
│ ├── cli.py # Typer CLI entry point
|
|
111
|
+
│ ├── launcher.py # --ui launcher
|
|
112
|
+
│ └── static/ # SvelteKit build output
|
|
113
|
+
├── ui/ # SvelteKit source
|
|
114
|
+
├── tests/ # Test suite
|
|
115
|
+
├── build.py # PyInstaller build script
|
|
116
|
+
├── oswg.spec # PyInstaller spec
|
|
117
|
+
├── pyproject.toml # Package configuration
|
|
118
|
+
└── .github/workflows/ # CI/CD
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## License
|
|
122
|
+
|
|
123
|
+
MIT
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"""Build script for OSWG - builds SvelteKit UI and PyInstaller binary."""
|
|
2
|
+
|
|
3
|
+
import platform
|
|
4
|
+
import shutil
|
|
5
|
+
import subprocess
|
|
6
|
+
import sys
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
|
|
9
|
+
ROOT = Path(__file__).parent
|
|
10
|
+
UI_DIR = ROOT / "ui"
|
|
11
|
+
STATIC_DEST = ROOT / "src" / "oswg" / "static"
|
|
12
|
+
DIST_DIR = ROOT / "dist"
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def build_frontend() -> None:
|
|
16
|
+
"""Build the SvelteKit frontend."""
|
|
17
|
+
if not UI_DIR.exists():
|
|
18
|
+
print(f"UI directory not found at {UI_DIR}, skipping frontend build.")
|
|
19
|
+
STATIC_DEST.mkdir(parents=True, exist_ok=True)
|
|
20
|
+
(STATIC_DEST / "index.html").touch()
|
|
21
|
+
return
|
|
22
|
+
|
|
23
|
+
print("Building SvelteKit frontend...")
|
|
24
|
+
|
|
25
|
+
if not (UI_DIR / "node_modules").exists():
|
|
26
|
+
print("Installing npm dependencies...")
|
|
27
|
+
subprocess.run(["npm", "ci"], cwd=UI_DIR, check=True)
|
|
28
|
+
|
|
29
|
+
subprocess.run(["npm", "run", "build"], cwd=UI_DIR, check=True)
|
|
30
|
+
|
|
31
|
+
build_output = UI_DIR / "build"
|
|
32
|
+
if not build_output.exists():
|
|
33
|
+
print("ERROR: SvelteKit build did not produce a 'build' directory")
|
|
34
|
+
sys.exit(1)
|
|
35
|
+
|
|
36
|
+
if STATIC_DEST.exists():
|
|
37
|
+
shutil.rmtree(STATIC_DEST)
|
|
38
|
+
shutil.copytree(build_output, STATIC_DEST)
|
|
39
|
+
print(f"Static files copied to {STATIC_DEST}")
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def build_binary() -> None:
|
|
43
|
+
"""Build the PyInstaller binary."""
|
|
44
|
+
print("Building PyInstaller binary...")
|
|
45
|
+
if DIST_DIR.exists():
|
|
46
|
+
shutil.rmtree(DIST_DIR)
|
|
47
|
+
|
|
48
|
+
subprocess.run(
|
|
49
|
+
[sys.executable, "-m", "PyInstaller", "oswg.spec", "--clean", "--noconfirm"],
|
|
50
|
+
cwd=ROOT,
|
|
51
|
+
check=True,
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
system = platform.system().lower()
|
|
55
|
+
|
|
56
|
+
if system in ("darwin", "linux"):
|
|
57
|
+
binary_name = "oswg"
|
|
58
|
+
else:
|
|
59
|
+
binary_name = "oswg.exe"
|
|
60
|
+
|
|
61
|
+
binary_path = DIST_DIR / binary_name
|
|
62
|
+
if binary_path.exists():
|
|
63
|
+
size_mb = binary_path.stat().st_size / (1024 * 1024)
|
|
64
|
+
print(f"Binary built: {binary_path} ({size_mb:.1f} MB)")
|
|
65
|
+
else:
|
|
66
|
+
print(f"ERROR: Binary not found at {binary_path}")
|
|
67
|
+
sys.exit(1)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def main() -> None:
|
|
71
|
+
build_frontend()
|
|
72
|
+
build_binary()
|
|
73
|
+
print("Build complete!")
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
if __name__ == "__main__":
|
|
77
|
+
main()
|
oswg-0.1.1/oswg.spec
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# PyInstaller spec for OSWG
|
|
2
|
+
# Run with: pyinstaller oswg.spec
|
|
3
|
+
|
|
4
|
+
import sys
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
|
|
7
|
+
block_cipher = None
|
|
8
|
+
|
|
9
|
+
# Determine paths
|
|
10
|
+
PROJECT_ROOT = Path(SPECPATH)
|
|
11
|
+
STATIC_PATH = PROJECT_ROOT / "src" / "oswg" / "static"
|
|
12
|
+
|
|
13
|
+
a = Analysis(
|
|
14
|
+
["src/oswg/__main__.py"],
|
|
15
|
+
pathex=[],
|
|
16
|
+
binaries=[],
|
|
17
|
+
datas=[
|
|
18
|
+
(str(STATIC_PATH / "*"), "oswg/static/"),
|
|
19
|
+
],
|
|
20
|
+
hiddenimports=[
|
|
21
|
+
"uvicorn.logging",
|
|
22
|
+
"uvicorn.loops",
|
|
23
|
+
"uvicorn.lifespan",
|
|
24
|
+
"uvicorn.loops.auto",
|
|
25
|
+
"uvicorn.protocols.http",
|
|
26
|
+
"uvicorn.protocols.http.auto",
|
|
27
|
+
"uvicorn.protocols.websockets",
|
|
28
|
+
"uvicorn.protocols.websockets.auto",
|
|
29
|
+
"uvicorn.protocols.http.h11_impl",
|
|
30
|
+
"uvicorn.protocols.http.httptools_impl",
|
|
31
|
+
"aiosqlite",
|
|
32
|
+
"httpx",
|
|
33
|
+
"lxml",
|
|
34
|
+
"lxml._elementpath",
|
|
35
|
+
"lxml.etree",
|
|
36
|
+
"rich",
|
|
37
|
+
"typer",
|
|
38
|
+
"pydantic_settings",
|
|
39
|
+
"multipart",
|
|
40
|
+
],
|
|
41
|
+
hookspath=[],
|
|
42
|
+
hooksconfig={},
|
|
43
|
+
runtime_hooks=[],
|
|
44
|
+
excludes=[
|
|
45
|
+
"tkinter",
|
|
46
|
+
"unittest",
|
|
47
|
+
"pytest",
|
|
48
|
+
"test",
|
|
49
|
+
"tests",
|
|
50
|
+
"pydoc",
|
|
51
|
+
"doctest",
|
|
52
|
+
],
|
|
53
|
+
win_no_prefer_redirects=False,
|
|
54
|
+
win_private_assemblies=False,
|
|
55
|
+
cipher=block_cipher,
|
|
56
|
+
noarchive=False,
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
|
|
60
|
+
|
|
61
|
+
exe = EXE(
|
|
62
|
+
pyz,
|
|
63
|
+
a.scripts,
|
|
64
|
+
a.binaries,
|
|
65
|
+
a.zipfiles,
|
|
66
|
+
a.datas,
|
|
67
|
+
[],
|
|
68
|
+
name="oswg",
|
|
69
|
+
debug=False,
|
|
70
|
+
bootloader_ignore_signals=False,
|
|
71
|
+
strip=True,
|
|
72
|
+
upx=True,
|
|
73
|
+
upx_exclude=[],
|
|
74
|
+
runtime_tmpdir=None,
|
|
75
|
+
console=True,
|
|
76
|
+
disable_windowed_traceback=False,
|
|
77
|
+
argv_emulation=False,
|
|
78
|
+
target_arch=None,
|
|
79
|
+
codesign_identity=None,
|
|
80
|
+
entitlements_file=None,
|
|
81
|
+
icon=None,
|
|
82
|
+
)
|