openbullet / openbullet/OpenBullet2
[Bug]: Cannot import external python module in IronPython
Open
@openbullet is already working on this.
Since Jun 6, 2024.
bug
- Dominant language
- C#
- Stars
- 2.4k
- Forks
- 602
- PR merge metrics
- No merged PRs in 30d
Description
Version of the software
0.2.5
Operating system
Windows 10
Browser / Native
Native Client
What happened?
When i try to run script (ironpython)
it says "No module found"
but i installed the module using pip
pip install pycryptodome
pip install Crypto.Cipher
kindly help me if this is not a bug
Relevant LoliCode if needed
from Crypto.Cipher import AES
import base64
def encrypt_text(input_text, secret):
# Pad the input text to be a multiple of 16 bytes (AES block size)
pad = lambda s: s + (16 - len(s) % 16) * chr(16 - len(s) % 16)
input_text_padded = pad(input_text)
# Create the AES cipher object with the specified mode (CBC) and IV set to all zeroes
iv = b'\x00' * AES.block_size
cipher = AES.new(secret, AES.MODE_CBC, iv)
# Encrypt the padded input text
encrypted_text = cipher.encrypt(input_text_padded.encode())
# Encode the encrypted text in base64 for safe storage/transmission
encoded_text = base64.b64encode(encrypted_text).decode()
return encoded_text
# Provided data
input_text = ''
secret = b'Afbdrft4dAfedth4$' # Replace with the actual secret key in bytes
# Encrypt the input text using AES-128-CBC
encrypted_text = encrypt_text(input_text, secret)
print("Encrypted text:", encrypted_text)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.