Stop Hackers By Using Cython (yes, Cython with a C) - Sell Your First Python App

Тәжірибелік нұсқаулар және стиль

YARRR MATEY! Avast, our app is ripe for plunder and a filthy batch of bilge rats have started clawing away at our source code. Ready the Cython cannons and prepare for battle, else ye walk the plank.
Ignoring my cringe attempt at writing a pirate-themed description, in this video we take a look at how to compile a Python executable, both with and without Cython obfuscation, and implement a simple automation process for protecting our source code. We also take a look at how bytecode can be extracted from executables, and then decompiled to recover the original source code. Scary right 😱! Lastly, we end the video with a brief discussion about the harsh reality of trying to lock down and license a piece of software which is distributed to end users for offline usage.
// RESOURCES 🌐
○ PyInstaller Extractor - github.com/extremecoders-re/p...
○ Decompyle++ (pycdc) - github.com/zrax/pycdc
○ uncompyle6 - github.com/rocky/python-uncom...
○ Visual Studio Community (Windows) - visualstudio.microsoft.com/fr...
○ Cython Requirements (all platforms) - cython.readthedocs.io/en/late...
○ Python Windows Compilers - wiki.python.org/moin/WindowsC...
// USEFUL LINKS 🔗
○ SendOwl Payment Processor - www.sendowl.com?r=110cf
○ Vultr VPS Provider - www.vultr.com/?ref=9129062
// PLAYLIST ▶️
• Sell Your First Python...
// MORE VIDEOS TO WATCH 🎥
○ Integrating Your App GUI - Sell Your First Python App - • Turn Your GUI into a F...
○ Build a Modern Python GUI - Sell Your First Python App - • Build a Modern Python ...
○ Core Functionality - Sell Your First Python App - • Split PDFs in Python u...
// TIMESTAMPS ⌛
00:00 - Pirates (No... Not the Johnny Depp Kind!!)
00:22 - Create task for Auto-PY-to-EXE (tasks.json)
00:49 - Compiling Executable using Auto-PY-to-EXE
01:49 - Fundamental Flaw with Python Executables
02:24 - PyInstaller Extractor (pyinstxtractor)
03:15 - Recovering Source Code using the pycdc Decompiler
03:43 - Compiling Python Code into Binaries using Cython
04:40 - Cython Build Script (setup.py)
06:10 - Cython Cleanup Script (clean.py)
06:38 - Adding VS Code Automation Tasks (tasks.json)
06:50 - Updating Launch Profiles to Run Tasks Automatically (launch.json)
06:58 - Building Obfuscated Python Executable
07:50 - Reality of Digital Rights Management (DRM) and Licensing
08:52 - What's Next?
// TOOLS THAT I USE 🛠️
○ DaVinci Resolve 18
○ OBS
○ Inkscape
○ GIMP (not what you think it is 🙃)
○ Canva
○ Visual Studio Code
// MUSIC 🎵
♪ Cheese (Prod. by Lukrembo)
Link : • lukrembo - cheese (roy...
// THANK YOU ❤️
If you enjoyed the video, please consider liking and subscribing!
It really means a lot to me, and helps me make more videos just like these.
Thanks once again and have a great day! 😊
DISCLAIMER: Brain Buffer does not encourage or endorse the usage of torrenting to obtain software or media illegally. All information provided in this video is presented for educational purposes only.
DISCLAIMER: Links included in this description might be affiliate links. If you purchase a product or service with the links that I provide I may receive a small commission. There is no additional charge to you! Thank you for supporting my channel so I can continue to provide you with free content!

Пікірлер: 18

  • @brain.buffer
    @brain.buffer Жыл бұрын

    Subscribe!! I’d hate for you to miss my next upload :D

  • @assiaadlase
    @assiaadlase9 ай бұрын

    It would be very helpful to include a video focusing on performance aspects, such as speed optimization or insights into loading screens when using PyInstaller. And just want to express my deep gratitude for the free content you provide. and I truly appreciate the knowledge and skills you share with us. Thanks you a lots

  • @muhammadadnan1430
    @muhammadadnan1430 Жыл бұрын

    Bruv this video is top tier. I sincerely hope your account grows to million subs.

  • @brain.buffer

    @brain.buffer

    Жыл бұрын

    Much appreciated Muhammad! Thanks for watching, and stay tuned for more content. :D

  • @JacobDanell
    @JacobDanell9 ай бұрын

    Great and professional videos man! Could you make a separate video on how to aggregate multiple files into one single file like you mention at 7:47 ? Would love to know how to do this more automated than manually copy-paste into a new file each time I need to build.

  • @assiaadlase

    @assiaadlase

    9 ай бұрын

    up

  • @raseshgautam8397
    @raseshgautam8397 Жыл бұрын

    This is real and informative content brother, would appreciate a lot more content coming from your side !!!

  • @brain.buffer

    @brain.buffer

    Жыл бұрын

    Thanks for watching! More content is on the way :D

  • @novianindy887
    @novianindy8879 ай бұрын

    Can we talk about the file size? does te cython make the binary size big? because in Nuitka the filesize got so big. or we can just stick to pyInstaller and obfuscate the code right?

  • @yassinesafraoui
    @yassinesafraoui Жыл бұрын

    Definitely worth watching content, keep going!!

  • @brain.buffer

    @brain.buffer

    Жыл бұрын

    Hey Yassine! Thanks for the kind words, I really appreciate it! Have an awesome day (or night) :D

  • @sabon8814
    @sabon88143 ай бұрын

    i followed all your steps and it's just creating a __init__.py folder inside my project module and no other files created, what am i doing wrong?

  • @richardbennett4365
    @richardbennett43652 ай бұрын

    His executable here only runs on Windows OS. 😮😢😢

  • @taominh
    @taominh Жыл бұрын

    nice video but how to complie multiple file ?

  • @brain.buffer

    @brain.buffer

    Жыл бұрын

    Hey Taominh! I'm not totally sure what you mean by "compiling multiple files". Perhaps you could elaborate more? In this video, our goal is compiling our .py files into .pyd binaries to obfuscate the contents of our code. We achieve this by tracking all imports in our .py files (lines starting with "import" and "from"), converting our files to .pyx files, and then compiling our Cython extensions (i.e. compiling our binaries). To include other files as part of the compilation, focus on the "setup()" command called around 5:50, and how the "extensions" variable is constructed using a breadth first search (BFS) traversal of .py files to locate import lines.

  • @taominh

    @taominh

    Жыл бұрын

    @@brain.buffer nice video and more video :D

  • @assiaadlase
    @assiaadlase9 ай бұрын

    please provide codes

  • @jenselstner5527
    @jenselstner552710 ай бұрын

    Stop fussing around and use Rust, C++ or C.

Келесі