Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
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
120
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
900
Oracle Database Communication Protocol
nezlooy
0
740
Other Decks in Research
See All in Research
コーディングエージェントとABNを再考
hf149
2
730
AIで最適化を解けるか?
mickey_kubo
0
120
英語教育 “研究” のあり方:学術知とアウトリーチの緊張関係
terasawat
1
1k
2026 東京科学大 情報通信系 研究室紹介 (すずかけ台)
icttitech
0
3.9k
Research Engineerという仕事 / Research Engineering: Bridging Research and Business
chck
1
220
Sleuthcon Keynote - How Cybercriminals (ab)use AI
fr0gger
0
190
Can We Teach Logical Reasoning to LLMs? – An Approach Using Synthetic Corpora (AAAI 2026 bridge keynote)
morishtr
1
260
明日から使える!研究効率化ツール入門
matsui_528
13
7.3k
LINEヤフー データサイエンス Meetup「三井物産コモディティ予測チャレンジ」の舞台裏-AlpacaTechパート
gamella
1
580
[IR Reading 2026春 論文紹介] LLM-based Listwise Reranking under the Effect of Positional Bias (ECIR 2026) /IR-Reading-2026-Spring
koheishinden
PRO
0
130
言語モデルから言語について語る際に押さえておきたいこと
eumesy
PRO
5
2.3k
2026年度 生成AI を活用した論文執筆ガイド/ワークショップ / 2026 Academic Year Guide to Writing Papers Using Generative AI - Workshop
ks91
PRO
0
180
Featured
See All Featured
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
540
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
440
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
480
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
400
The Limits of Empathy - UXLibs8
cassininazir
1
370
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
3.5k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
610
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.2k
Balancing Empowerment & Direction
lara
6
1.2k
How to train your dragon (web standard)
notwaldorf
97
6.7k
Skip the Path - Find Your Career Trail
mkilby
1
150
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