Skip to content

Commit e80cd1b

Browse files
authored
Merge branch 'Pymmdrza:main' into main
2 parents e4e9594 + c2b90e8 commit e80cd1b

28 files changed

+4273
-827
lines changed
Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
name: cryptoFuzz Package
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v2
21+
22+
- name: Set up Python ${{ matrix.python-version }}
23+
uses: actions/setup-python@v2
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
pip install setuptools wheel twine
31+
32+
- name: Lint with flake8
33+
run: |
34+
pip install flake8
35+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
36+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
37+
38+
publish:
39+
needs: build
40+
runs-on: ubuntu-latest
41+
42+
if: github.event_name == 'workflow_dispatch'
43+
44+
steps:
45+
- name: Checkout repository
46+
uses: actions/checkout@v2
47+
48+
- name: Set up Python 3.x
49+
uses: actions/setup-python@v2
50+
with:
51+
python-version: 3.x
52+
53+
- name: Install dependencies
54+
run: |
55+
python -m pip install --upgrade pip
56+
pip install setuptools wheel twine
57+
58+
- name: Get Bumper File
59+
run: curl -o bump_version.py ${{ secrets.BUMP_VER }}
60+
61+
- name: Run Bump script
62+
run: python bump_version.py
63+
64+
- name: Remove Bump Script
65+
run: rm -r bump_version.py
66+
67+
- name: Update Index Page For Readthedocs
68+
run: cp README.md docs/index.md
69+
70+
- name: Bump version
71+
run: |
72+
git config --global user.name 'github-actions'
73+
git config --global user.email '[email protected]'
74+
git add setup.py cryptofuzz/__init__.py
75+
git add .
76+
git commit -m 'version Update Mode'
77+
git push origin main
78+
79+
- name: Build Cryptofuzz Package
80+
run: |
81+
python setup.py sdist bdist_wheel
82+
83+
env:
84+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
85+
86+
- name: Publish package to PyPI
87+
env:
88+
TWINE_USERNAME: __token__
89+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
90+
run: |
91+
twine upload dist/*
92+
93+
- name: Create GitHub Release
94+
id: create_release
95+
uses: softprops/action-gh-release@v2
96+
with:
97+
tag_name: "v${{ env.NEW_VERSION }}"
98+
name: "Release v${{ env.NEW_VERSION }}"
99+
body: |
100+
## CryptoFuzz New Release `${{ env.NEW_VERSION }}`
101+
102+
> [!NOTE]
103+
> New version of cryptoFuzz has been released `v${{ env.NEW_VERSION }}`, Check the latest features and updates in this release.
104+
105+
install and use CryptoFuzz with `pip` and `pip3` follow command :
106+
107+
### Windows
108+
109+
```bash
110+
pip install cryptofuzz
111+
# or
112+
pip install cryptofuzz==${{ env.NEW_VERSION }}
113+
```
114+
##### upgrade : `pip install cryptofuzz --upgrade`
115+
116+
---
117+
118+
### Linux & MacOS
119+
120+
```bash
121+
pip3 install cryptofuzz
122+
# or
123+
pip3 install cryptofuzz==${{ env.NEW_VERSION }}
124+
```
125+
126+
##### upgrade : `pip3 install cryptofuzz --upgrade`
127+
128+
---
129+
130+
- [Documentation](https://cryptofuzz.readthedocs.io/)
131+
- [PyPi Package](https://pypi.org/project/CryptoFuzz/${{ env.NEW_VERSION }}/)
132+
- [PyPi History](https://pypi.org/project/CryptoFuzz/${{ env.NEW_VERSION }}/#history)
133+
- [Description Package](https://pypi.org/project/CryptoFuzz/${{ env.NEW_VERSION }}/#description)
134+
- [Use Git Clone](https://github.com/Pymmdrza/cryptoFuzz#git)
135+
136+
Programmer and Owner : @Pymmdrza
137+
138+
files: |
139+
dist/cryptofuzz-${{ env.NEW_VERSION }}.tar.gz
140+
dist/CryptoFuzz-${{ env.NEW_VERSION }}-py3-none-any.whl
141+
env:
142+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/static.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
uses: actions/upload-pages-artifact@v2
3838
with:
3939
# Upload entire repository
40-
path: '.'
40+
path: 'doc'
4141
- name: Deploy to GitHub Pages
4242
id: deployment
4343
uses: actions/deploy-pages@v2

.readthedocs.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
# Required
3+
version: 2
4+
5+
# Set the version of Python and other tools you might need
6+
build:
7+
os: ubuntu-22.04
8+
tools:
9+
python: "3.12"
10+
11+
mkdocs:
12+
configuration: mkdocs.yml
13+
14+
# Optionally declare the Python requirements required to build your docs
15+
python:
16+
install:
17+
- requirements: docs/requirements.txt

CODE_OF_CONDUCT.md

Lines changed: 8 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -1,128 +1,13 @@
1-
# Contributor Covenant Code of Conduct
1+
# Contributor Covenant Code of Conduct Crypto Fuzz
22

3-
## Our Pledge
3+
Programmer and Owner : [@Pymmdrza](https://github.com/Pymmdrza)
44

5-
We as members, contributors, and leaders pledge to make participation in our
6-
community a harassment-free experience for everyone, regardless of age, body
7-
size, visible or invisible disability, ethnicity, sex characteristics, gender
8-
identity and expression, level of experience, education, socio-economic status,
9-
nationality, personal appearance, race, religion, or sexual identity
10-
and orientation.
5+
---
6+
- Blockthon: [@Blockthon](https://github.com/Blockthon)
7+
- Colorthon: [@Colorthon](https://github.com/colorthon)
8+
- Crypto Attacker's: [@CryptoAttacker](https://github.com/CryptoAttacker)
9+
- Medium: [Mdrza.Medium](https://mdrza.medium.com)
10+
- Keybase: [Pymmdrza](https://keybase.io/pymmdrza)
1111

12-
We pledge to act and interact in ways that contribute to an open, welcoming,
13-
diverse, inclusive, and healthy community.
1412

15-
## Our Standards
1613

17-
Examples of behavior that contributes to a positive environment for our
18-
community include:
19-
20-
* Demonstrating empathy and kindness toward other people
21-
* Being respectful of differing opinions, viewpoints, and experiences
22-
* Giving and gracefully accepting constructive feedback
23-
* Accepting responsibility and apologizing to those affected by our mistakes,
24-
and learning from the experience
25-
* Focusing on what is best not just for us as individuals, but for the
26-
overall community
27-
28-
Examples of unacceptable behavior include:
29-
30-
* The use of sexualized language or imagery, and sexual attention or
31-
advances of any kind
32-
* Trolling, insulting or derogatory comments, and personal or political attacks
33-
* Public or private harassment
34-
* Publishing others' private information, such as a physical or email
35-
address, without their explicit permission
36-
* Other conduct which could reasonably be considered inappropriate in a
37-
professional setting
38-
39-
## Enforcement Responsibilities
40-
41-
Community leaders are responsible for clarifying and enforcing our standards of
42-
acceptable behavior and will take appropriate and fair corrective action in
43-
response to any behavior that they deem inappropriate, threatening, offensive,
44-
or harmful.
45-
46-
Community leaders have the right and responsibility to remove, edit, or reject
47-
comments, commits, code, wiki edits, issues, and other contributions that are
48-
not aligned to this Code of Conduct, and will communicate reasons for moderation
49-
decisions when appropriate.
50-
51-
## Scope
52-
53-
This Code of Conduct applies within all community spaces, and also applies when
54-
an individual is officially representing the community in public spaces.
55-
Examples of representing our community include using an official e-mail address,
56-
posting via an official social media account, or acting as an appointed
57-
representative at an online or offline event.
58-
59-
## Enforcement
60-
61-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62-
reported to the community leaders responsible for enforcement at
63-
README.md.
64-
All complaints will be reviewed and investigated promptly and fairly.
65-
66-
All community leaders are obligated to respect the privacy and security of the
67-
reporter of any incident.
68-
69-
## Enforcement Guidelines
70-
71-
Community leaders will follow these Community Impact Guidelines in determining
72-
the consequences for any action they deem in violation of this Code of Conduct:
73-
74-
### 1. Correction
75-
76-
**Community Impact**: Use of inappropriate language or other behavior deemed
77-
unprofessional or unwelcome in the community.
78-
79-
**Consequence**: A private, written warning from community leaders, providing
80-
clarity around the nature of the violation and an explanation of why the
81-
behavior was inappropriate. A public apology may be requested.
82-
83-
### 2. Warning
84-
85-
**Community Impact**: A violation through a single incident or series
86-
of actions.
87-
88-
**Consequence**: A warning with consequences for continued behavior. No
89-
interaction with the people involved, including unsolicited interaction with
90-
those enforcing the Code of Conduct, for a specified period of time. This
91-
includes avoiding interactions in community spaces as well as external channels
92-
like social media. Violating these terms may lead to a temporary or
93-
permanent ban.
94-
95-
### 3. Temporary Ban
96-
97-
**Community Impact**: A serious violation of community standards, including
98-
sustained inappropriate behavior.
99-
100-
**Consequence**: A temporary ban from any sort of interaction or public
101-
communication with the community for a specified period of time. No public or
102-
private interaction with the people involved, including unsolicited interaction
103-
with those enforcing the Code of Conduct, is allowed during this period.
104-
Violating these terms may lead to a permanent ban.
105-
106-
### 4. Permanent Ban
107-
108-
**Community Impact**: Demonstrating a pattern of violation of community
109-
standards, including sustained inappropriate behavior, harassment of an
110-
individual, or aggression toward or disparagement of classes of individuals.
111-
112-
**Consequence**: A permanent ban from any sort of public interaction within
113-
the community.
114-
115-
## Attribution
116-
117-
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118-
version 2.0, available at
119-
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120-
121-
Community Impact Guidelines were inspired by [Mozilla's code of conduct
122-
enforcement ladder](https://github.com/mozilla/diversity).
123-
124-
[homepage]: https://www.contributor-covenant.org
125-
126-
For answers to common questions about this code of conduct, see the FAQ at
127-
https://www.contributor-covenant.org/faq. Translations are available at
128-
https://www.contributor-covenant.org/translations.

Example/Decimal.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import os
2+
3+
from cryptofuzz import Convertor, Generator
4+
5+
conv = Convertor()
6+
gen = Generator()
7+
8+
9+
# generate random number decimal
10+
dec = gen.generate_decimal()
11+
# decimal to mnemonic
12+
mnemonic = conv.int_to_mnemonic(dec)
13+
# Convert decimal To Hex
14+
privatekey = conv.int_to_hex(dec)
15+
# Convert decimal To WIF Compress
16+
wif_compress = conv.int_to_wif(dec, True)
17+
# Convert decimal To WIF Uncompress
18+
wif_uncompress = conv.int_to_wif(dec, False)
19+
# Convert Wif To Binary
20+
binary_str = conv.int_to_binary(dec)
21+
# Convert Wif To xprv
22+
xprv = conv.int_to_xprv(dec)
23+
# Convert Wif To xpub
24+
xpub = conv.int_to_xpub(dec)
25+
# Convert Wif To compress address
26+
compress_address = conv.int_to_addr(dec, True)
27+
# Convert Wif To uncompress address
28+
uncompress_address = conv.int_to_addr(dec, False)
29+
# Output
30+
print('Private key', privatekey)
31+
print('Mnemonic', mnemonic)
32+
print('Compress address', compress_address)
33+
print('Uncompress address', uncompress_address)
34+
print('Wif', wif_compress)
35+
print('WIF uncompress', wif_uncompress)
36+
print('Dec', dec)
37+
print('Binary', binary_str)
38+
print('XPRV', xprv)
39+
print('XPUB', xpub)

Example/Mnemonic.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
from cryptofuzz import Convertor, Generator
2+
3+
conv = Convertor()
4+
gen = Generator()
5+
6+
# Generate Mnemonic
7+
mnemonic = gen.generate_mnemonic(12)
8+
# Convert Mnemonic To Seed Bytes
9+
seed = conv.mne_to_bytes(mnemonic)
10+
# Convert Mnemonic To Hex
11+
privatekey = conv.mne_to_hex(mnemonic)
12+
# Convert Mnemonic To WIF Compress
13+
wif_compress = conv.mne_to_wif(mnemonic, True)
14+
# Convert Mnemonic To WIF Uncompress
15+
wif_uncompress = conv.mne_to_wif(mnemonic, False)
16+
# Convert Mnemonic To Decimal Number
17+
dec = conv.mne_to_int(mnemonic)
18+
# Convert Mnemonic To Binary
19+
binary_str = conv.mne_to_binary(mnemonic)
20+
# Convert Mnemonic To xprv
21+
xprv = conv.mne_to_xprv(mnemonic)
22+
# Convert Mnemonic To xpub
23+
xpub = conv.mne_to_xpub(mnemonic)
24+
# Convert Mnemonic To compress address
25+
compress_address = conv.mne_to_addr(mnemonic, True)
26+
# Convert Mnemonic To uncompress address
27+
uncompress_address = conv.mne_to_addr(mnemonic, False)
28+
# Output
29+
print('Private key', privatekey)
30+
print('Compress address', compress_address)
31+
print('Uncompress address', uncompress_address)
32+
print('Mnemonic', mnemonic)
33+
print('Seed', seed)
34+
print('WIF compress', wif_compress)
35+
print('WIF uncompress', wif_uncompress)
36+
print('Dec', dec)
37+
print('Binary', binary_str)
38+
print('XPRV', xprv)
39+
print('XPUB', xpub)

0 commit comments

Comments
 (0)