Robot Framework Obfuscator
The Robot Framework obfuscator is a command line tool which can obfuscate Robot Framework code.
Installing
pip can be used to install the obfuscator:
pip install https://github.com/robocorp/robotframework-obfuscator/archive/master.zip
Note that dependencies must also be installed:
pip install robotframework
pip install robotframework-lsp
Dependencies
It depends on Python 3.8+, Robot Framework 4+ and robotframework-lsp 0.29+.
Usage
After installing it, it's possible to run the obfuscator with:
python -m robotframework_obfuscator --dest <dest-dir> <dir-to-obfuscate>
Where <dest-dir> is the directory where the obfuscated sources should be put and
<dir-to-obfuscate> is the directory with the sources to obfuscate.
Note that all files from the <dir-to-obfuscate> will be copied to the <dest-dir>
but only .robot and .resource files will be obfuscated.
If some keyword should not be obfuscated, it's possible to use the --skip-keyword option to make a call such as:
python -m robotframework_obfuscator --dest <dest-dir> --skip-keyword MyKeyword --skip-keyword AnotherKeyword <dir-to-obfuscate>
If some variable should not be obfuscated, it's possible to use the --skip-var option to make a call such as:
python -m robotframework_obfuscator --dest <dest-dir> --skip-var my_var --skip-var AnotherVar <dir-to-obfuscate>
Caveats
Both keyword names and variable names will be obfuscated. If a given keyword or variable name was referenced in a different way (read from a file, environment variable, etc.), it's possible that the program may fail to execute afterwards, thus, it's suggested that the obfuscated version of the program is run to verify that the behavior is still the same.
Note that keyword names passed to Run Keyword (or other run variants of the Run
from the BuiltIn library) are properly translated, but if the target code has
a some direct call to run a keyword, it may fail.
It's possible to overcome this by not obfuscating a specific keyword name
with the --skip-keyword option.
Also note that if some variable is passed as a parameter to Robot Framework
(or through some variables file), it's possible to use the --skip-var option
to skip translating those variables.
Notes
Note that the obfuscator may make your program run slower as in many cases an additional keyword evaluation may be needed for each keyword run -- in general, as a rule of thumb, code that need to be fast, should be in Python, so, it shouldn't make much difference, but if the related code has too much logic leveraged in Robot Framework itself, it may make a difference.
Important
This obfuscator is currently in alpha mode. Please run your program with the obfuscated version to make sure that the behavior is still the same.
Metadata
Release files for robotframework-obfuscator 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| robotframework-obfuscator-0.0.1.tar.gz | 14.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| robotframework_obfuscator-0.0.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 28.5 kB
Release files / robotframework-obfuscator-0.0.1.tar.gz
| Download URL | robotframework-obfuscator-0.0.1.tar.gz |
|---|---|
| Size | 14.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b2da07b5c239ce9d0b64de1d969c26fa7703bd2c8891e4f75010affc218474f0
|
|
BLAKE2b-256 checksum How to use checksums |
822b05f3482b5320f19e966f8ef28341d869fee9106d638159439f7e9be8663b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
|
Release files / robotframework_obfuscator-0.0.1-py2.py3-none-any.whl
| Download URL | robotframework_obfuscator-0.0.1-py2.py3-none-any.whl |
|---|---|
| Size | 14.4 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
80897b05ade65f7bfbc7aae3fc99356c9cce86fe0fc57d4a1fbf6f1e51b5b277
|
|
BLAKE2b-256 checksum How to use checksums |
86e358e678b57a0c90e3a8d8b4848e45c5f15551c325ffcd757f24532686d2a7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
|