Video Description

Ctypes in Python This lesson introduces the module and discusses what's going to be covered over the entire course. - CtypesRegular expressions

  • Multithreading

  • Fuzzing

This particular lesson goes deep into Ctypes which is: A means of using C code within a Python program A way to do things that might not be included in Python or which require special modules/libraries A lower-level language than Python C-type has the following calling conventions: - Stdcall

  • Def foo

  • Cdecl

  • Def bar

In C code, you use a DLL (dynamically linked library) to gain access to functions from other code as well as various C type functions. Major DLLs are: - dll

  • dll

  • dll

Ctypes utilize memory addresses called Pointers, but they tend to be complicated and difficult to handle. However, the primary reason is the difference between passing by reference or passing by value: - C passes by reference: you pass the data's address, rather than copying it all over

  • Python passes by value: when you pass a variable to a function, the called function copies the entire contents of that variable

  • When you pass by reference, you changes made to addressed data will show for any functions which access that data

  • In passing by value, you can do whatever you like to the data you receive, the original won't be offered

Participants also learn about Ctypes functions: - Printf

  • MessageBoxA

Course Modules