Skip to content

Commit e5ad466

Browse files
committed
New feature: crypt
1 parent 769d886 commit e5ad466

File tree

6 files changed

+64
-24
lines changed

6 files changed

+64
-24
lines changed

Release-notes.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
## Release notes
22

3+
### v1.1.1 - Just a new function
4+
5+
* New feature: Encrypt/Decrypt files with `spy crypt` command.
6+
* Licence error fix.
7+
38
### v1.1.0 - Bug fix and upgrades
49

510
* Bug fix and upgrades in `zip compress/extract` command.

lash/ExtraTools/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
from .Devices import *
2-
from .logger import *
2+
from .spy import *
33
from .sched_manager import *
44
from .bonus import *

lash/ExtraTools/logger.py

Lines changed: 0 additions & 21 deletions
This file was deleted.

lash/ExtraTools/spy.py

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
import os, click
2+
from pynput.keyboard import Listener
3+
from lash.Exportables.ikeyboard import *
4+
from lash.executor import playbp
5+
import pyaes as pya
6+
7+
8+
@click.group('spy', help='Spy tools')
9+
def spy():
10+
...
11+
12+
13+
@spy.command(help='Keylogger')
14+
@click.option('-p', type=click.Path(exists=True), default='.', help='Path to send output file with info')
15+
def keyboard(p):
16+
print('<key logger on> f3 to stop record')
17+
os.chdir(p)
18+
listener = Listener(on_press=key_down, on_release=key_up)
19+
listener.start()
20+
listener.join()
21+
playbp()
22+
print(f'> Process Finished <')
23+
24+
25+
@spy.command()
26+
@click.argument('file', metavar='<file>', type=click.STRING)
27+
@click.argument('key', metavar='<key>', type=click.STRING)
28+
@click.argument('p', metavar='path', type=click.Path(exists=True), required=False, default='.')
29+
@click.option('-dc', is_flag=True, default=False, help='Decrypt file')
30+
def crypt(file, key, p, dc=False):
31+
"""\b
32+
Encrypt/Decrypt files with AES algorithm
33+
\b
34+
Save the <key> you need her to decode
35+
The key NEED have 16 characters
36+
\b
37+
Ex: crypt text.txt $kvzis1@7y602qsx
38+
"""
39+
bkey = str.encode(key) # Convert to bytes
40+
fp = p + '\\' + file
41+
42+
file = open(fp, 'rb')
43+
crip = pya.AESModeOfOperationCTR(bkey)
44+
if dc:
45+
data = crip.decrypt(file.read())
46+
crypted = open(fp, 'wb')
47+
crypted.write(data)
48+
print(f'\nFile decrypted successfully')
49+
else:
50+
data = crip.encrypt(file.read())
51+
file.close()
52+
53+
crypted = open(fp, 'wb')
54+
crypted.write(data)
55+
print(f'\nFile encrypted with key: {key}')

lash/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
@group('global')
1010
def Global():
1111
"""\b
12-
- Lash 1.1.0 by KevBoyz ~ https://github.com/KevBoyz/Lash
12+
- Lash 1.1.1 by KevBoyz ~ https://github.com/KevBoyz/Lash
1313
Edit the package configs manually in /Exportables/config.py"""
1414
...
1515

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
setuptools.setup(
2424
name='lash',
25-
version='1.1.0',
25+
version='1.1.1',
2626
author='Kevin Emmanuel',
2727
author_email='kevinho_gameplays@hotmail.com',
2828
description='Tools package to desktop',
@@ -39,6 +39,7 @@
3939
'schedule~=1.1.0',
4040
'setuptools~=56.0.0',
4141
'playsound2~=0.1'
42+
'pyaes~=1.6.1'
4243
],
4344
packages=setuptools.find_packages(
4445
os.path.join(os.path.dirname(__file__))),

0 commit comments

Comments
 (0)