₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,329,538 members, 8,441,115 topics. Date: Wednesday, 08 July 2026 at 05:40 AM

Toggle theme

Python Code Obfuscation[help] - Programming - Nairaland

Nairaland ForumScience/TechnologyProgrammingPython Code Obfuscation[help] (1739 Views)

1 Reply (Go Down)

Python Code Obfuscation[help] by blink6(op): 9:05pm On Oct 04, 2014
hi guys!,

please, am on a project which happens to be python one.

now, I want to obfuscate it in other to hide my code from reverse engineering.

is there any app or method to do this?

thanks.
Re: Python Code Obfuscation[help] by Seun(mod): 9:46pm On Oct 04, 2014
You can distribute just the .pyc files that are created when you run your code. They are not exactly obfuscated but most people can't read them.
Re: Python Code Obfuscation[help] by Seun(mod): 9:46pm On Oct 04, 2014
--
Re: Python Code Obfuscation[help] by blink6(op): 4:40am On Oct 05, 2014
Seun:
You can distribute just the .pyc files that are created when you run your code. They are not exactly obfuscated but most people can't read them.
first of, an glad u of all persons here replied me. seems yuh a python lover.

nevertheless, is there any other method aside the one you gave?

thanks.
Re: Python Code Obfuscation[help] by umaryusuf(m): 7:05am On Oct 05, 2014
Re: Python Code Obfuscation[help] by donphoenix: 12:58am On Oct 12, 2014
are you trying to secure the final exe or the .py file? If its d exe. Den a simple crypter will suffice. It works by takin d binary code, splicin it nd encryptin it wt an algorithm lyk rc4 or aes den attachin a decryption stub wt it dat decrypts d code in memory only at runtime usin d decryption key u provided. If d exe is decompiled or haxored, the person will only get junk unreadable/unusable code.
Re: Python Code Obfuscation[help] by blink6(op): 12:48pm On Oct 14, 2014
donphoenix:
are you trying to secure the final exe or the .py file? If its d exe. Den a simple crypter will suffice. It works by takin d binary code, splicin it nd encryptin it wt an algorithm lyk rc4 or aes den attachin a decryption stub wt it dat decrypts d code in memory only at runtime usin d decryption key u provided. If d exe is decompiled or haxored, the person will only get junk unreadable/unusable code.
the .py file content.
Re: Python Code Obfuscation[help] by donphoenix: 1:32pm On Oct 14, 2014
blink6:
the .py file content.
same method will still work but you'll b using a base64 cipher stream. It wont give you the function of using an encryption key but your will be obfuscated enough
1 Reply

Check Out My Python Code For Giving You The Date/time You Are Currently.Python Code For Birthday ReminderPlease Help With This Python Code234

HTML Is Not A Programming Language? YES Or NOGoogle And Udacity Launches Android Nanodegree To Teach CodingDatanemesis 1: In The Minds Of Nairaland, Seun Give Us A Copy !