Тёмный

Porting My Hacking Toolkit From Windows To Linux 

Nathan Baggs
Подписаться 49 тыс.
Просмотров 7 тыс.
50% 1

Find out how to port a code base from Windows to Linux. This is cut down from a livestream, subscribe to get notifications and join in on us building a hacking toolkit
Get the code: github.com/nat...
Become a member to get early access to videos (and to previous livestreams in full) - / @nathanbaggs
Want to build cool stuff from scratch? app.codecrafte...
💭 All views are my own 💭

Опубликовано:

 

19 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 42   
@nathanbaggs
@nathanbaggs Месяц назад
Become a member to get early access to videos (and to previous livestreams in full) - ru-vid.com/show-UCQvW_89l7f-hCMP1pzGm4xwjoin
@navsigda4030
@navsigda4030 Месяц назад
Your series about disassembling games or fixing them for a certain purpose has led me here. I don't understand the code, but I understand the thought process, and it's really enjoyable to watch. Thanks, Nathan :)
@krux02
@krux02 Месяц назад
for some reason `-Wall -Werror -Wextra -pedantic` does not contain one of the most important warnings `-Wconversion`. `-Wconversion` warns you about lossy implicit conversions between number types (e.g. float to int). Why is that important? abs
@nathanbaggs
@nathanbaggs Месяц назад
There’s always more flags (: these are just the ones I go to off the top of my head, but thanks for pointing out other useful ones!
@minirop
@minirop Месяц назад
that's why Clang has -Weverything (which isn't recommended)
@turtlefrog369
@turtlefrog369 Месяц назад
@@minirop yeah and GCC has Wall, which is not all.
@jmvr
@jmvr Месяц назад
​​@@minirop yeah, -Weverything is cool, but it warns me when I use anything above C++90 (even when I compile with C++20 in mind), and thus -Werror doesn't let me compile. Obviously, you could just do -Wno-some-dumb-warning, but that just adds a ton of arguments to the command which makes things really hard to read It's a cool idea since -Wall -Wextra doesn't cover everything, but it then covers stuff that I wouldn't even think would be a problem
@bananapi_rl
@bananapi_rl Месяц назад
It's always a good day when nathan posts :)
@nathanbaggs
@nathanbaggs Месяц назад
What a kind sentiment, thanks (:
@nox4000
@nox4000 Месяц назад
Been writing C++ code for over 15 years. Didn't know you can define functions as the default in the source file, cool!
@johanngambolputty5351
@johanngambolputty5351 Месяц назад
libmem seems to be a pretty good cross platform backend for reading/writing memory and injecting bits of code, it also seems to be cross language (written in c but I use its rust bindings) and somewhat cross cpu architecture. I've been using egui_inspect to generate a basic cheat engine like gui for it (libmem_egui).
@nathanbaggs
@nathanbaggs Месяц назад
Cool thanks I’ll check it out, I wanted to build things from scratch as I think it’s a fun problem to solve. I’m doing it on stream as well
@johanngambolputty5351
@johanngambolputty5351 Месяц назад
@@nathanbaggs understandable
@turtlefrog369
@turtlefrog369 Месяц назад
C is not C++ in the same way using C in Rust is not ideal. Its not ideal in C++ either.
@dave7244
@dave7244 Месяц назад
I don't have as much C++ experience as you do. I've got cross platform builds for OpenGL / SDL and C++ code bases working cross platform using the GCC compiler (MINGW on Windows). I've found that using the MS C++ compiler is a pain and gave up on it and just used MINGW. The MINGW compiler has the relevant Windows API specific stuff (I've mucked around with some bluetooth APIs on Windows and the namespaces are there on Windows). Is there a specific reason to use the the Microsoft C++ compiler on Windows if you are planning to write cross platform code?
@belg4mit
@belg4mit Месяц назад
He mentions in the video that he likes to use multiple compilers to see what warnings they throw, since they check for compliance with the language spec in different ways,
@dave7244
@dave7244 Месяц назад
​@@belg4mit I get that answer a lot, but honestly I found it an utter pain just to get stuff working and having to make a bunch of MSVC rules in my code and there was almost zero benefit. Why do I really care that it throws a warning about something in MSVC if my binary works correctly?
@nathanbaggs
@nathanbaggs Месяц назад
They all have different levels of support. MSVC has pretty good support for the latest library features so I often use that to play around. As for using them in larger projects ultimately it doesn’t make a difference if you can get what you want with tool X. I’ve done this enough that there’s minimal friction in setting up multiple compilers so I prefer to use the native one per platform
@dave7244
@dave7244 Месяц назад
@@nathanbaggs Ok thanks.
@klafbang
@klafbang Месяц назад
*worries about the performance of dereferencing a virtual method or pointer* *faffs around in the (virtual) file system*
@LagowiecDev
@LagowiecDev Месяц назад
What a difference between .h and .hpp?
@bloodaid
@bloodaid Месяц назад
I think .hpp can contain .h and .cpp code
@IoIxD
@IoIxD Месяц назад
The intended difference is that .h is for C and .hpp is for C++. But I've seen people use .h for C++, or no extension at all, because both compilers will take any file as long as it has valid code.
@scooter4196
@scooter4196 Месяц назад
I believe .h is for C while .hpp is for C++. However, I don't think the extension really matters in the end. I suppose it's a good way to differenciate between the 2 languages because they are different in how they work. If you are working on a C AND C++ code base at the same time.
@grendel_eoten
@grendel_eoten Месяц назад
From the compiler's perspective, there is zero difference. It's just a convention that makes it easy for programmers to tell whether a header file is meant for a C program (.h) or a C++ program (.hh, .hpp, .hxx)
@LagowiecDev
@LagowiecDev Месяц назад
Thanks guys :)
@maksymiliank5135
@maksymiliank5135 4 дня назад
28:27 why not just split on a space character, and then iterate through permissions manually? I don't think that this regex is more readable, and I've seen it being used to format telephone numbers and emails and it's a nightmare.
@nathanbaggs
@nathanbaggs 4 дня назад
I was doing it live and fancied mixing it up
@OhhBabyATriple
@OhhBabyATriple Месяц назад
GREAT Video. Thanks Nathan!
@maartenofbelgium
@maartenofbelgium Месяц назад
Instead of the pimpl idiom, could CRTP be an alternative to avoid allocations?
@nathanbaggs
@nathanbaggs Месяц назад
You mean mixing in the platform specific bits? It’s an interesting thought however I think it would provide a slightly more cumbersome experience for the user as they’d have to template the class with the platform specific bits. With this we get the advantage they can just create a Process object and it’ll work for the current platform
@minirop
@minirop Месяц назад
doesn't really fix the "issue". You still allocate "impl" but implicitely inside the Process "object" instead of a separate memory block, but you still have the indirection since it uses inheritance (i.e. vtable) And as said in the video, since you'll never have a "windowprocess" and a "linuxprocess" in the same build (i.e. only 1 subclass), then inheritance is more of an hindrance.
@GamePlayByFaks
@GamePlayByFaks 29 дней назад
Hi, why not use AI to assist in porting tools, I wonder ?
@SoftBreadSoft
@SoftBreadSoft 28 дней назад
Because you have to assist "AI" more than it assists you
@GamePlayByFaks
@GamePlayByFaks 27 дней назад
@@SoftBreadSoft makes sense.
@solitudesf8111
@solitudesf8111 Месяц назад
goddamn cpp sucks
@maksymiliank5135
@maksymiliank5135 4 дня назад
it's not as bad as it used to be
Далее
How To Manipulate Process Memory On Windows
31:33
Просмотров 5 тыс.
연준 (YEONJUN) ‘GGUM’ Official MV
02:44
Просмотров 3,2 млн
Как мы играем в игры 😂
00:20
Просмотров 1,3 млн
Why I Don't Like Singletons
29:05
Просмотров 63 тыс.
I forced EVERYONE to use Linux
22:59
Просмотров 543 тыс.
Reverse Engineering the AI of Age of Empires
10:34
Просмотров 37 тыс.
C++ vs Rust: which is faster?
21:15
Просмотров 394 тыс.
Linux from Scratch
2:35:42
Просмотров 174 тыс.
How to Avoid Refactoring Legacy Code HELL
35:57
Просмотров 36 тыс.
The Windows Source Code Revealed: Task Manager (E01)
27:11