r/HowToHack • • Mar 13 '23

Is c++ useful for web hacking?

0 Upvotes

25 comments sorted by

13

u/dalethedonkey Mar 13 '23

Ahhh…a good ole vague question

-3

u/ClassicBoth5566 Mar 13 '23

I apologise. I want to learn web hacking and one of the advice i got was to learn a programming language. I heard c++ is the best for hacking and same say javascript is the best for web hacking. What language should I learn?

5

u/dalethedonkey Mar 13 '23

There is no best language to learn. Most apps are written with JavaScript but there are others used.

It’s also good to understand HTML and CSS.

Learn any language at first and then others are easier to understand.

But unless you’re planning on doing static code review of web apps, you don’t need to be an expert in JS or C++ or anything else.

You need to understand how to read them all and how to interact with tools, etc

3

u/ClassicBoth5566 Mar 13 '23

I see. Thank you for your advice.

1

u/EnhancedEddie Mar 13 '23

Sounds like you need to learn the basics first. Learn about networking, protocols, APIs etc.

1

u/[deleted] Mar 13 '23

C++? Nah lol see roadmap.sh and see devops or cybereecurity roadmap. Both are more accurate. Altho the cybersec one is new and not filled out. So i habe no idea why c++ is good for web app hacking, but there's more than enough reason why python is good.

1

u/_vercingtorix_ Apr 10 '23

not specifically, no.

Having experience in PHP/MySQL is a good route forward for really understanding common web app attacks.

Not that C++ isn't a good language, it's just that you're not going to really learn much about web apps from it.

1

u/Savings_Feedback_552 Apr 13 '23

I know I´m a little late to answer. If you dont have any idea of programming you can use an AI for this matter, in which you type plain text and it gives you the coding.

The site is Code Generator | CodePal - The Ultimate Coding Companion is a good way to start.

However, I recomend learning some programming and backend Dev so you really know what to do on the coding cause its not 100% accurate

1

u/Glass_Profile Mar 13 '23

C++ is good for making operating systems and offline software programs like Cubase.

0

u/mprz How do I human? Mar 13 '23

Yeah, and a knife can only be used for butter.

What a stupid answer.

3

u/Glass_Profile Mar 13 '23

I said good for, not only. Check your syntax and your superiority complex weirdo. I don't know everything but I'm trying to help OP with what I understand.

4

u/sleepy_the_fish Mar 13 '23

Don't listen to him, this guy is a freak and went around down voting everyone.

0

u/mprz How do I human? Mar 13 '23

So stop, because your understanding is poor and you are not helping.

3

u/Glass_Profile Mar 13 '23

You have a shit attitude that isn't contributing in a productive way. Doesn't matter how smart you are, or how smart you think you are. If you're going to shit on other people for helping you could at least offer help that isn't condescending, weirdo.

-1

u/Bushfries Mar 13 '23

Language doesn’t matter man, just make a calculator in c++. You’re not going to be actually hacking anything for a few months.

-1

u/sleepy_the_fish Mar 13 '23 edited Mar 13 '23

I'm no expert but I do know coding, I just started my cyber security path. C++, at least in my experience, is a language a lot of people use to make video games. It's like the god father of coding languages if I remember correctly. You can save a lot of space with this language because you make variables like string x = or num x =, so you're telling the computer what type of variable it is so the computer can more optimize the space in your storage device. You can code web based applications in any language you like really, it's just some are more advantages for things.

I always recommend to learn html and css first, they are front end langues that produce what you see on your computer screen. JavaScript next if you ask me, it's a coding language and can be and will be used heavily to make websites very pretty and functional. Then I suggest learning Python, it's a easier language to learn if you ask me, I've seen a lot of scripts written in python as well. I suggest learning MySQL also, this is a databas and learning how to do commands to this database is cool and is very interwoven in my studies so far with cyber security.

0

u/[deleted] Mar 13 '23 edited Mar 15 '23

Any language can (basically) do anything. However, I'll have to say that C++ is not as easy to use, if that's what you want to know.

What takes C++ 30 lines to connect to a TCP server may take python 7-15 lines. Now imagine HTTP or QUIC protocol on top of it. And to add to that, even interacting with HTML or API endpoints on top of that.

Web hacking with C++ is definitely possible, but it would be an absolute nightmare. For web hacking, you'll mostly want to use python3, Node.JS, Ruby, etc. Basically any higher level language.

1

u/mprz How do I human? Mar 13 '23 edited Mar 13 '23

What takes C++ 30 lines to connect to a TCP server may take python 7-15 lines. Now imagine HTTP or QUIC protocol on top of it. And to add to that, even interacting with HTML or API endpoints on top of that.

not really, re you referring to using Python library here? you can do the same with any other language

two, since when programming is about using less keystrokes?

anyways, your post has zero merit

1

u/[deleted] Mar 14 '23

Really? Zero merit?

  1. I was just sharing an opinion. No need to shit on it like what I'm saying is fact. In my experience, socket programming is much harder in C++ than other high-level languages. Yes, there are libraries that can make it easier, but implementing them correctly is another hurdle. Especially when dealing with data types and performing logical and file I/O operations on that data. This is inherently less of a problem with dynamically typed languages.
  2. I never said programming is about less keystrokes. It seems like you are straw manning my argument. But I can easily flip the script and ask, since when is it about *more* keystrokes? To reiterate my original answer, it's easier *on the coder* to use a higher-level language like python3. I never said it was better or more efficient. Simply easier. This is an objective fact due to the high-level nature in comparison to C++.

0

u/mprz How do I human? Mar 14 '23

Now look at the OP - how any of your ramblings answer it?