Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Your Python - your rules
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Roman Bazhin
March 20, 2015
Research
130
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Your Python - your rules
Roman Bazhin
March 20, 2015
More Decks by Roman Bazhin
See All by Roman Bazhin
JETPLOW is dead. Long live the JETPLOW!
nezlooy
1
910
Oracle Database Communication Protocol
nezlooy
0
780
Other Decks in Research
See All in Research
論文読み会 SNLP2026 Tau2-Bench: Evaluating Conversational Agents in a Dual-Control Environment
s_mizuki_nlp
0
300
湯村研究室の紹介2026 / yumulab2026
yumulab
0
130
20260624 NLP colloquium: 単一のhubテキストがCLIPを壊す:hubnessによる埋め込みの脆弱性特定
de9uch1
2
300
Pesée et pointage par imagerie 3D : PHENO3D entre en phase de test terrains
institutdelelevage
PRO
0
110
SLAMはどこまで解決されたのか?
tomonom
0
1.5k
Language and AI
ayaniwa
0
320
2025年度秋葉原ウォーカブルプロジェクト調査報告 「アキバらしいウォーカブル」とは何か
izumiyama_lab
1
250
JPA2026_NetworkTutorial_JunKashihara
junkashihara
0
230
2026年6月_副業コンプライアンス調査_業界別リスク度分析_株式会社フクスケ.pdf
fkske
0
130
長時間動画QAにおけるマルチエージェント推論 ・SVAgent: Storyline-Guided Long Video Understanding via Cross-Modal Multi-Agent Collaboration
murakawatakuya
1
230
量子サマースクール2026「量子計算機アーキテクチャ分野の概観」
youten622
1
980
CVPR2026論文紹介_VLMにとって良いvision encoderとは何か?Rethinking Model Selection in VLM Through the Lens of Gromov-Wasserstein Distance
kobayashi31
1
270
Featured
See All Featured
How Software Deployment tools have changed in the past 20 years
geshan
2
35k
Believing is Seeing
oripsolob
1
240
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
sira's awesome portfolio website redesign presentation
elsirapls
0
460
Paper Plane
katiecoart
PRO
5
54k
Thoughts on Productivity
jonyablonski
76
5.4k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
850
brightonSEO & MeasureFest 2025 - Winning Strategies for Black Friday CRO & PPC - Christian Goodrich
cargoodrich
3
870
GitHub's CSS Performance
jonrohan
1033
470k
Git: the NoSQL Database
bkeepers
PRO
433
67k
Transcript
–
• • • @ @ © 2002—2015, Digital Security
• • • • • • •
• • • • • • • •
None
• • • • • … • •
…
…
• • def load_module(self, fullname): code = self.get_code(fullname) // get_source
ispkg = self.is_package(fullname) nmod = imp.new_module(fullname) mod = sys.modules.setdefault(fullname, nmod) mod.__file__ = "<%s>" % self.__class__.__name__ mod.__loader__ = self if ispkg: mod.__path__ = [] mod.__package__ = fullname else: mod.__package__ = fullname.rpartition('.')[0] exec(code, mod.__dict__) return mod PyObject *load_module(PyObject *self, PyObject *args){ char *mod_code, *fullname; PyObject *new_mod, *sys_mod_dict, *mod_dict, *res, *o; PyArg_ParseTuple(args, "s", &fullname); new_mod = PyModule_New(fullname); Py_INCREF(new_mod); sys_mod_dict = PyImport_GetModuleDict(); if (sys_mod_dict != NULL){ PyDict_SetItemString(sys_mod_dict, fullname, new_mod); o = PyDict_GetItemString(sys_mod_dict, "__builtin__"); PyModule_AddObject(new_mod, "__builtins__", o); } mod_code = get_code(fullname); mod_dict = PyModule_GetDict(new_mod); res = PyRun_String(mod_code, Py_file_input, mod_dict, mod_dict);
None
None
«Об одном способе защиты исходников Python-программы»
None
None
• • •
None
• • • • • •
• • • • • • • • • •
…
• • #define STOP_CODE 0 #define POP_TOP 1 #define ROT_TWO
2 #define ROT_THREE 3 #define DUP_TOP 4 #define ROT_FOUR 5 #define NOP 9 … #define BINARY_POWER 0 #define PRINT_ITEM 1 #define INPLACE_OR 2 #define DUP_TOP 3 #define GET_ITER 4 #define BINARY_MULTIPLY 5 #define BINARY_XOR 9 …
• • typedef struct { PyObject_HEAD int co_argcount; int co_nlocals;
int co_stacksize; int co_flags; … PyObject *co_consts; PyObject *co_names; PyObject *co_varnames; PyObject *co_freevars; PyObject *co_cellvars; PyObject *co_code; … } PyCodeObject;
• • • • B3 F2 0D 0A 0D F1
5C 50 63 00 00 00 00 00 00 00 00 06 00 00 00 40 00 00 00 73 16 01 00 00 78 43 00 65 00 00 64 00 00 83 01 00 44 5D 30 00 5A 01 B3 F2 0D 0A 0D F1 5C 50 63 70 F9 79 04 8E 20 00 00 11 06 10 0C 0F 0A 0B 08 02 01 03 00 03 00 02 00 00 00 00 00 04 00 05 0A 20 01 00 00 03 00 01
• • • • •
• • • • • • • •
• • • • •
None
• • • • • •
• PyObject *codestring = PyString_FromString("MARKER"); PyObject *tuple = PyTuple_New(0); PyObject
*string = PyString_FromString(""); PyCodeObject *co_obj = PyCode_New(0, 0, 0, 0, codestring, tuple, tuple, tuple, tuple, tuple, string, string, 0, string); for (char *ptr = (char *) co_obj; ptr < (char *)co_obj + sizeof(PyCodeObject); ptr += 4) if (*((PyObject **)ptr) == co_obj) print("Gotcha"); •
• • • • 0x64 0x44 0x47 0x11 0x48 0x2E
0x61 0x41 0x53 0x23
• • •
• • • • • • • • • •
• •
• • • •
None
• • • • • • •
None
• • • • • • • • • •
• • • • • • • •
• •
None