mirror of
https://github.com/cedricbonhomme/Stegano.git
synced 2025-05-14 01:38:31 +02:00
New minor release (v0.6.5).
This commit is contained in:
parent
f8f0ba22aa
commit
2011f197cd
5 changed files with 40 additions and 15 deletions
|
@ -1,6 +1,13 @@
|
||||||
Release History
|
Release History
|
||||||
===============
|
===============
|
||||||
|
|
||||||
|
0.6.5 (2017-02-16)
|
||||||
|
------------------
|
||||||
|
|
||||||
|
* added a command to list all available generators for the lsb-set module;
|
||||||
|
* test when the data image is coming via byte stream, for the lsb module.
|
||||||
|
|
||||||
|
|
||||||
0.6.4 (2017-02-06)
|
0.6.4 (2017-02-06)
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
|
|
33
bin/lsb-set
33
bin/lsb-set
|
@ -70,20 +70,25 @@ parser_reveal.add_argument("-o", dest="secret_binary",
|
||||||
help="Output for the binary secret (Text or any binary file).")
|
help="Output for the binary secret (Text or any binary file).")
|
||||||
|
|
||||||
|
|
||||||
|
# Subparser: List generators
|
||||||
|
parser_list_generators = subparsers.add_parser('list-generators',
|
||||||
|
help='list-generators help')
|
||||||
|
|
||||||
arguments = parser.parse_args()
|
arguments = parser.parse_args()
|
||||||
|
|
||||||
try:
|
if arguments.command != 'list-generators':
|
||||||
arguments.generator_function
|
try:
|
||||||
except AttributeError:
|
arguments.generator_function
|
||||||
print('You must specify the name of a generator.')
|
except AttributeError:
|
||||||
parser.print_help()
|
print('You must specify the name of a generator.')
|
||||||
exit(1)
|
parser.print_help()
|
||||||
|
exit(1)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
generator = getattr(generators, arguments.generator_function)()
|
generator = getattr(generators, arguments.generator_function)()
|
||||||
except AttributeError as e:
|
except AttributeError as e:
|
||||||
print("Unknown generator: {}".format(arguments.generator_function))
|
print("Unknown generator: {}".format(arguments.generator_function))
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
if arguments.command == 'hide':
|
if arguments.command == 'hide':
|
||||||
if arguments.secret_message != None:
|
if arguments.secret_message != None:
|
||||||
|
@ -110,3 +115,9 @@ elif arguments.command == 'reveal':
|
||||||
f.write(data)
|
f.write(data)
|
||||||
else:
|
else:
|
||||||
print(secret)
|
print(secret)
|
||||||
|
|
||||||
|
elif arguments.command == 'list-generators':
|
||||||
|
import inspect
|
||||||
|
all_generators = inspect.getmembers(generators, inspect.isfunction)
|
||||||
|
for generator in all_generators:
|
||||||
|
print(generator[0], generator[1].__doc__)
|
||||||
|
|
|
@ -50,7 +50,7 @@ copyright = u'2012-2017, Cédric Bonhomme'
|
||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
version = '0.6'
|
version = '0.6'
|
||||||
# The full version, including alpha/beta/rc tags.
|
# The full version, including alpha/beta/rc tags.
|
||||||
release = '0.6.4'
|
release = '0.6.5'
|
||||||
|
|
||||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||||
# for a list of supported languages.
|
# for a list of supported languages.
|
||||||
|
|
4
setup.py
4
setup.py
|
@ -36,7 +36,7 @@ with open('CHANGELOG.rst', 'r') as f:
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='Stegano',
|
name='Stegano',
|
||||||
version='0.6.4',
|
version='0.6.5',
|
||||||
author='Cédric Bonhomme',
|
author='Cédric Bonhomme',
|
||||||
author_email='cedric@cedricbonhomme.org',
|
author_email='cedric@cedricbonhomme.org',
|
||||||
packages=packages,
|
packages=packages,
|
||||||
|
@ -44,7 +44,7 @@ setup(
|
||||||
scripts=scripts,
|
scripts=scripts,
|
||||||
url='https://github.com/cedricbonhomme/Stegano',
|
url='https://github.com/cedricbonhomme/Stegano',
|
||||||
description='A Python Steganography module.',
|
description='A Python Steganography module.',
|
||||||
long_description=readme + '\n\n' + changelog,
|
long_description=readme + '\n|\n|\n|\n' + changelog,
|
||||||
platforms = ['Linux'],
|
platforms = ['Linux'],
|
||||||
license='GPLv3',
|
license='GPLv3',
|
||||||
install_requires=requires,
|
install_requires=requires,
|
||||||
|
|
|
@ -38,6 +38,9 @@ def identity():
|
||||||
n += 1
|
n += 1
|
||||||
|
|
||||||
def Dead_Man_Walking():
|
def Dead_Man_Walking():
|
||||||
|
"""
|
||||||
|
Dead Man Walking.
|
||||||
|
"""
|
||||||
n = 0
|
n = 0
|
||||||
while True:
|
while True:
|
||||||
yield n + 7
|
yield n + 7
|
||||||
|
@ -96,6 +99,10 @@ def eratosthenes_composite():
|
||||||
p1 = p2
|
p1 = p2
|
||||||
|
|
||||||
def carmichael():
|
def carmichael():
|
||||||
|
"""
|
||||||
|
https://oeis.org/A002997
|
||||||
|
Composite numbers n such that a^(n-1) == 1 (mod n) for every a coprime to n.
|
||||||
|
"""
|
||||||
for m in eratosthenes_composite():
|
for m in eratosthenes_composite():
|
||||||
for a in range(2, m):
|
for a in range(2, m):
|
||||||
if pow(a,m,m) != a:
|
if pow(a,m,m) != a:
|
||||||
|
@ -116,9 +123,9 @@ def ackermann(m, n):
|
||||||
|
|
||||||
def fibonacci():
|
def fibonacci():
|
||||||
"""
|
"""
|
||||||
|
https://oeis.org/A000045
|
||||||
A generator for Fibonacci numbers, goes to next number in series on each call.
|
A generator for Fibonacci numbers, goes to next number in series on each call.
|
||||||
This generator start at 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, ...
|
This generator start at 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, ...
|
||||||
See: http://oeis.org/A000045
|
|
||||||
"""
|
"""
|
||||||
a, b = 1, 2
|
a, b = 1, 2
|
||||||
while True:
|
while True:
|
||||||
|
|
Loading…
Add table
Reference in a new issue