DEV Community

pypdeveloper
pypdeveloper

Posted on • Edited on

Why you need to know C for hacking

Everything and I mean everything that you use uses c in one way or another. Even if you think that it dose not include C it does python, javascript, java, windows, linux, mac os are all built on top of C. C is a low level programming language which means that it a language that communicates with the hardware. although assembly is below C but assembly is extremely hard to learn and there are many variants of assembly, so C is the best option. Learning C helps to attack and machine on the low level and as most software is built on top C it’s practically impossible to not be able to hack a software.

Top comments (1)

Collapse
 
pentacular profile image
pentacular • Edited

C programs run in the C Abstract Machine.

Access to the hardware is through language extensions -- you can do the same kinds of things in other languages.

Most of the things you consider 'hacking' won't be legal in portable C, and most will require learning some assembly -- C has no concept of op codes or registers or so on.

Being 'built on top of C' doesn't mean anything significant.

It just means that if you want to maintain implementations written in C, you'd better learn C.

While cpython is written in C, pypy is written in python -- does this mean that python is based on python if you're using pypy and based on C if you're using cpython? If so, what does 'based on' mean here? :)

The main benefits of C are that:

  1. it has many implementations and libraries.
  2. many implementations have very minimal runtime infrastructure (mostly to handle malloc, atexit, and FILE).
  3. many implementations have support for inline assembly.

Also, assembly languages are not particularly hard to learn.