Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0cce62d

Browse files
Resolves issue #3
1 parent bc68c86 commit 0cce62d

File tree

6 files changed

+56
-10
lines changed

6 files changed

+56
-10
lines changed

‎.travis.yml‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
language: python
2+
python:
3+
- "3.4"
4+
- "3.5"
5+
- "3.6"
6+
# command to install dependencies
7+
install:
8+
- pip install .
9+
# command to run tests
10+
script:
11+
- pytest tests/*.py

‎README.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,13 @@ git clone https://github.com/ismailtasdelen/Python-Randon-Password-Generator.git
1919
```
2020
git clone git@github.com:ismailtasdelen/Python-Randon-Password-Generator.git
2121
```
22+
23+
## Run pip3 install to set up this script
24+
```
25+
pip3 install .
26+
```
27+
28+
## Generating a password via following command
29+
```
30+
python3 run.py
31+
```

‎run.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
# -*- conding:utf-8 -*-
33

44
import os
5+
from source import rpg
56

67
## Running
7-
os.system("python source/rpg.py")
8+
rpg.random_password_generator_ico()
9+
print("Password : " + rpg.random_password_generator())

‎setup.py‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# -*- coding: utf-8 -*-
2+
3+
from setuptools import setup
4+
5+
setup(name='rpg',
6+
version='0.1',
7+
description='Python - Random Password Generator ( R.P.G. )',
8+
url='https://github.com/ismailtasdelen/Python-Random-Password-Generator',
9+
author='İSMAİL TAŞDELEN',
10+
author_email='pentestdatabase@gmail.com',
11+
license='MIT',
12+
packages=['source'],
13+
python_requires=">=3",
14+
zip_safe=False)

‎source/rpg.py‎

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
import string
55
import random
66

7-
def random_password_genertor():
7+
def random_password_generator():
88
chars = string.ascii_uppercase + string.ascii_lowercase + string.digits
99
size = 8
10-
return ''.join(random.choice(chars) for x in range(size,20))
10+
return ''.join(random.choice(chars) for x in range(size,20))
1111

12-
def random_password_genertor_ico():
13-
random_password_genertor_ico = """
12+
def random_password_generator_ico():
13+
random_password_generator_ico = """
1414
#############################################################
1515
# PYTHON - Random Password Generetor (RPG) - GH0ST S0FTWARE #
16-
#############################################################
16+
#############################################################
1717
# CONTACT #
1818
#############################################################
1919
# DEVELOPER : İSMAİL TAŞDELEN #
@@ -22,7 +22,4 @@ def random_password_genertor_ico():
2222
# Whatsapp : + 90 534 295 94 31 #
2323
#############################################################
2424
"""
25-
print random_password_genertor_ico
26-
27-
random_password_genertor_ico()
28-
print("Password : " + random_password_genertor())
25+
print(random_password_generator_ico)

‎tests/rpg_test.py‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# -*- coding:utf-8 -*-
2+
3+
import unittest
4+
5+
from source import rpg
6+
7+
class rpg_test(unittest.TestCase):
8+
def test_random_password_generator(self):
9+
result_password = len(rpg.random_password_generator())
10+
11+
self.assertGreaterEqual(result_password, 8)
12+
self.assertLessEqual(result_password, 20)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /