UAForge 1.1.0__py3-none-any.whl
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.
- uaforge/__init__.py +128 -0
- uaforge/cli.py +105 -0
- uaforge/core/__init__.py +6 -0
- uaforge/core/database.py +413 -0
- uaforge/core/user_agent.py +201 -0
- uaforge/core/version_fetcher.py +152 -0
- uaforge/core/version_updater.py +411 -0
- uaforge/data/useragent.db +0 -0
- uaforge/utils.py +31 -0
- uaforge-1.1.0.dist-info/METADATA +286 -0
- uaforge-1.1.0.dist-info/RECORD +15 -0
- uaforge-1.1.0.dist-info/WHEEL +5 -0
- uaforge-1.1.0.dist-info/entry_points.txt +2 -0
- uaforge-1.1.0.dist-info/licenses/LICENSE +21 -0
- uaforge-1.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: UAForge
|
|
3
|
+
Version: 1.1.0
|
|
4
|
+
Summary: A powerful Python library and CLI tool for generating realistic, random user agent strings for Chrome, Firefox, and Opera browsers across multiple platforms.
|
|
5
|
+
Home-page: https://github.com/bolgac/UAForge
|
|
6
|
+
Author: bolgac
|
|
7
|
+
Author-email: bytearchsoft@gmail.com
|
|
8
|
+
Classifier: Development Status :: 4 - Beta
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: Topic :: Software Development :: Testing
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.6
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Requires-Python: >=3.6
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
License-File: LICENSE
|
|
21
|
+
Requires-Dist: beautifulsoup4>=4.13.3
|
|
22
|
+
Requires-Dist: requests>=2.32.3
|
|
23
|
+
Requires-Dist: lxml>=6.0.2
|
|
24
|
+
Dynamic: author
|
|
25
|
+
Dynamic: author-email
|
|
26
|
+
Dynamic: classifier
|
|
27
|
+
Dynamic: description
|
|
28
|
+
Dynamic: description-content-type
|
|
29
|
+
Dynamic: home-page
|
|
30
|
+
Dynamic: license-file
|
|
31
|
+
Dynamic: requires-dist
|
|
32
|
+
Dynamic: requires-python
|
|
33
|
+
Dynamic: summary
|
|
34
|
+
|
|
35
|
+
# UAForge - UserAgent Generator
|
|
36
|
+
|
|
37
|
+
A powerful Python library and CLI tool for generating realistic, random user agent strings for Chrome, Firefox, and Opera browsers across multiple platforms.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Features
|
|
42
|
+
- **Multi-browser support**: Generate user agents for Chrome, Firefox, and Opera
|
|
43
|
+
- **Cross-platform**: Supports Windows, Linux, macOS, Android, and iOS
|
|
44
|
+
- **Real version data**: Uses real browser version information from official sources
|
|
45
|
+
- **Realistic combinations**: Creates plausible user agent strings that mimic real browsers
|
|
46
|
+
- **SQLite database**: Stores version data locally for fast access
|
|
47
|
+
- **Auto-update**: Fetch latest browser versions from official sources
|
|
48
|
+
- **CLI interface**: Easy command-line usage
|
|
49
|
+
- **Python API**: Simple integration into Python projects
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Installation
|
|
54
|
+
|
|
55
|
+
### From PyPI (Recommended)
|
|
56
|
+
```bash
|
|
57
|
+
pip install uaforge
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Quick Start
|
|
61
|
+
|
|
62
|
+
### Using the CLI
|
|
63
|
+
|
|
64
|
+
Initialize the database (first-time setup):
|
|
65
|
+
```bash
|
|
66
|
+
uaforge --init
|
|
67
|
+
```
|
|
68
|
+
Generate a single user agent:
|
|
69
|
+
```bash
|
|
70
|
+
# Random browser user agent
|
|
71
|
+
uaforge
|
|
72
|
+
|
|
73
|
+
# Specific browser
|
|
74
|
+
uaforge --browser Chrome
|
|
75
|
+
uaforge --browser Firefox
|
|
76
|
+
uaforge --browser Opera
|
|
77
|
+
|
|
78
|
+
# Generate 10 Chrome user agents
|
|
79
|
+
uaforge --count 10 --browser Chrome
|
|
80
|
+
|
|
81
|
+
# Save to file
|
|
82
|
+
uaforge --count 50 --output useragents.txt --browser Firefox
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Update browser versions:
|
|
86
|
+
```bash
|
|
87
|
+
# Update all versions
|
|
88
|
+
uaforge --update all
|
|
89
|
+
|
|
90
|
+
# Update specific browser
|
|
91
|
+
uaforge --update chrome
|
|
92
|
+
uaforge --update firefox
|
|
93
|
+
uaforge --update opera
|
|
94
|
+
uaforge --update android
|
|
95
|
+
uaforge --update mac
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Using Python API
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
from uaforge import generate_user_agent, generate_multiple, update_versions
|
|
102
|
+
|
|
103
|
+
# Generate a single user agent
|
|
104
|
+
ua = generate_user_agent("Chrome")
|
|
105
|
+
print(ua)
|
|
106
|
+
|
|
107
|
+
# Generate multiple user agents
|
|
108
|
+
ua_list = generate_multiple(5)
|
|
109
|
+
for agent in ua_list:
|
|
110
|
+
print(agent)
|
|
111
|
+
|
|
112
|
+
# Update browser versions
|
|
113
|
+
update_versions("all")
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Advanced Usage
|
|
117
|
+
```bash
|
|
118
|
+
from uaforge.core.user_agent import UserAgentGenerator
|
|
119
|
+
|
|
120
|
+
# Create a custom generator
|
|
121
|
+
generator = UserAgentGenerator()
|
|
122
|
+
|
|
123
|
+
# Generate specific types
|
|
124
|
+
chrome_agent = generator.create_useragent("Chrome")
|
|
125
|
+
firefox_agent = generator.create_useragent("Firefox")
|
|
126
|
+
opera_agent = generator.create_useragent("Opera")
|
|
127
|
+
|
|
128
|
+
# Get a batch of agents
|
|
129
|
+
agents = generator.get_list(100)
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Command Line Reference
|
|
133
|
+
|
|
134
|
+
| Option | Short | Description |
|
|
135
|
+
|--------|-------------|-------------|
|
|
136
|
+
|--count | -c | Number of user agents to generate (default: 1) |
|
|
137
|
+
|--browser | -b | Browser type: Chrome, Firefox, Opera, random (default: random) |
|
|
138
|
+
|--output | -o | Output file to save user agents |
|
|
139
|
+
|--update | -u | Update version information: all, chrome, firefox, opera, android, windows, linux, mac |
|
|
140
|
+
|--init | | Initialize database with initial data |
|
|
141
|
+
|--version | -v | Show version information |
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## Examples
|
|
146
|
+
```bash
|
|
147
|
+
# Show version
|
|
148
|
+
uaforge --version
|
|
149
|
+
|
|
150
|
+
# Initialize database
|
|
151
|
+
uaforge --init
|
|
152
|
+
|
|
153
|
+
# Update all versions
|
|
154
|
+
uaforge --update all
|
|
155
|
+
|
|
156
|
+
# Generate 5 Firefox user agents
|
|
157
|
+
uaforge --count 5 --browser Firefox
|
|
158
|
+
|
|
159
|
+
# Generate 100 random user agents and save to file
|
|
160
|
+
uaforge --count 100 --output agents.txt
|
|
161
|
+
|
|
162
|
+
# Generate a single Chrome user agent
|
|
163
|
+
uaforge --browser Chrome
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
## Database Structure
|
|
167
|
+
- **Browser versions:** Chrome, Firefox, Opera version history
|
|
168
|
+
- **Platform information:** Windows, Linux, macOS, Android system strings
|
|
169
|
+
- **Version types:** Architecture and build types for each platform
|
|
170
|
+
- **Release dates:** Version release information
|
|
171
|
+
- **Database location:** ~/.useragent_generator/data/useragent.db
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## Supported Platforms and Browsers
|
|
176
|
+
|
|
177
|
+
**Browsers**
|
|
178
|
+
- Google Chrome (desktop & mobile)
|
|
179
|
+
- Mozilla Firefox (desktop & mobile)
|
|
180
|
+
- Opera (desktop & mobile)
|
|
181
|
+
|
|
182
|
+
**Operating Systems**
|
|
183
|
+
- Windows (NT 6.0 to NT 10.0)
|
|
184
|
+
- Linux (X11 variants)
|
|
185
|
+
- macOS (10.15 to 14.0)
|
|
186
|
+
- Android (10 to 14)
|
|
187
|
+
- iOS (simulated via macOS strings)
|
|
188
|
+
|
|
189
|
+
**Architectures**
|
|
190
|
+
- Windows: x64, WOW64
|
|
191
|
+
- Linux: i686, x86_64
|
|
192
|
+
- Android: armv7l, armv8l
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
## Project Structure
|
|
197
|
+
```bash
|
|
198
|
+
uaforge/
|
|
199
|
+
├── core/
|
|
200
|
+
│ ├── __init__.py # init file
|
|
201
|
+
│ ├── database.py # SQLite database operations
|
|
202
|
+
│ ├── user_agent.py # Main user agent generator
|
|
203
|
+
│ ├── version_fetcher.py # Fetch versions from web
|
|
204
|
+
│ └── version_updater.py # Update database with new versions
|
|
205
|
+
├── data/
|
|
206
|
+
│ └── useragent.db # SQLite database file
|
|
207
|
+
├── cli.py # Command-line interface
|
|
208
|
+
├── utils.py # Utility functions
|
|
209
|
+
└── __init__.py # Package exports
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
## Development
|
|
213
|
+
```bash
|
|
214
|
+
# Clone the repository
|
|
215
|
+
git clone https://github.com/bolgac/uaforge.git
|
|
216
|
+
cd uaforge
|
|
217
|
+
|
|
218
|
+
# Install in development mode
|
|
219
|
+
pip install -e .[dev]
|
|
220
|
+
|
|
221
|
+
# Run tests
|
|
222
|
+
python -m pytest
|
|
223
|
+
|
|
224
|
+
# Build distribution
|
|
225
|
+
python setup.py sdist bdist_wheel
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
## Common Issues and Solutions
|
|
229
|
+
### Database Not Found
|
|
230
|
+
|
|
231
|
+
```bash
|
|
232
|
+
uaforge --init
|
|
233
|
+
```
|
|
234
|
+
### Empty User Agents
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
uaforge --update all
|
|
238
|
+
```
|
|
239
|
+
### Network Issues
|
|
240
|
+
- Check your internet connection
|
|
241
|
+
- Use --init for offline mode with sample data
|
|
242
|
+
- Configure proxy if needed
|
|
243
|
+
|
|
244
|
+
### Permission Errors
|
|
245
|
+
- Run with appropriate permissions
|
|
246
|
+
- Check database file permissions
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
## Contributing
|
|
251
|
+
|
|
252
|
+
Feel free to fork this project, submit PRs, or suggest features via GitHub Issues!
|
|
253
|
+
|
|
254
|
+
We welcome contributions of all kinds:
|
|
255
|
+
- Bug reports and fixes
|
|
256
|
+
- New features and enhancements
|
|
257
|
+
- Documentation improvements
|
|
258
|
+
- Testing and code quality improvements
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
## 📬 Contact
|
|
263
|
+
|
|
264
|
+
- GitHub Issues – for bugs and feedback
|
|
265
|
+
- Email – `bytearchsoft@gmail.com` (for business inquiries or sponsorships)
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
269
|
+
## License
|
|
270
|
+
This project is licensed under the **MIT License** — see the [LICENSE](LICENSE) file for details.
|
|
271
|
+
|
|
272
|
+
---
|
|
273
|
+
|
|
274
|
+
## Acknowledgments
|
|
275
|
+
- Browser version data from official sources:
|
|
276
|
+
|
|
277
|
+
- [Chrome](https://chromedriver.storage.googleapis.com/)
|
|
278
|
+
- [Firefox](https://www.mozilla.org/en-US/firefox/releases/)
|
|
279
|
+
- [Android](https://tr.wikipedia.org/wiki/Android)
|
|
280
|
+
- [Opera](https://blogs.opera.com/desktop/)
|
|
281
|
+
- [Mac-Wikipedia](https://en.wikipedia.org/wiki/)
|
|
282
|
+
|
|
283
|
+
- Inspired by various user agent generation libraries
|
|
284
|
+
- Contributors and testers
|
|
285
|
+
|
|
286
|
+
---
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
uaforge/__init__.py,sha256=CEwXKMnZFPpFnSPRmZEyPTmbyeWjedsWEOfjAHhHcn0,4549
|
|
2
|
+
uaforge/cli.py,sha256=yvXIVBdmJInHOFgzuPCHfQXq09CJecLw30sUc-CjGuE,3726
|
|
3
|
+
uaforge/utils.py,sha256=fBFvY_YnXwIHusq9NIKnHYDP7WFwuZEgzr0EqUqIY38,1135
|
|
4
|
+
uaforge/core/__init__.py,sha256=WWsRgUrIwfbEXIoqmkm4TnoOsqKpXswwbzqZXXaSkTM,272
|
|
5
|
+
uaforge/core/database.py,sha256=kYu-TQcnixbsgq91kW_bYTRIZLtemN6EvMvfVusbDwM,14546
|
|
6
|
+
uaforge/core/user_agent.py,sha256=Qpsxa1IIsGBtrMeCQatFWwudkz9sMMywmlonzIn4VIE,10952
|
|
7
|
+
uaforge/core/version_fetcher.py,sha256=4_dE_lhiWrrpFQflF-sqx8oKGWyGB8IkfyiCZHFiSRA,7597
|
|
8
|
+
uaforge/core/version_updater.py,sha256=JeS_AmpmF0_7xCIgqhAlMiLpNkx_2jfBsbv1Rim8U-I,17369
|
|
9
|
+
uaforge/data/useragent.db,sha256=v2hvLezWKbYh-Wg2DDOpALcAiyMIm4pi9d0d_y21YyU,180224
|
|
10
|
+
uaforge-1.1.0.dist-info/licenses/LICENSE,sha256=GSGGweX_ViAqIE_ZkV16FBtkJrTb2obvX7NCcxnoTzg,1082
|
|
11
|
+
uaforge-1.1.0.dist-info/METADATA,sha256=ZDHiSEik1Evu-39uX4OEK6A0louP0rfcRnA26kAn6eY,7557
|
|
12
|
+
uaforge-1.1.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
13
|
+
uaforge-1.1.0.dist-info/entry_points.txt,sha256=QD0rKbTJ1ZNJPdW6oyOmCzZSe-Be17wijzqEYKTPKsI,45
|
|
14
|
+
uaforge-1.1.0.dist-info/top_level.txt,sha256=aymoFKz_qHDLMglGkS5f_bMSrvzzPPoy0_Ufa4pu_5w,8
|
|
15
|
+
uaforge-1.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 bolgac
|
|
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.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
uaforge
|