Anonymous
the first is a cast
yes to dword pointer i think
/
cast the int to dword *
Seher
What is difference between qt6 core and qt widgets
/
why if i write ptrStore = (_DWORD *)(*(int (**a)(void))(*(_DWORD *)*ptrStore + 92))(); it tells me bad charter '='
it go to the pointer + 92 gets the dword pointer in it and gets the function pointer
Ibrahimovic
hello guys can anyone help me setup my c++ programme
Richard
cmake ? makefile?
Ibrahimovic
i need a download link for c++ that link should also have header file
Ibrahimovic
please guys🙏
Richard
have you been searched anything?
klimi
cmake ? makefile?
? what about them
Richard
? what about them
i thought Ibrahimovic wants to configure his c++ project,
klimi
Oh i see, i thought it was another question. my bad
/
Help
/
what do it mean when you use a pointer like an array
/
like Ptr[8];
klimi
like Ptr[8];
*(ptr + 8) you mean this?
Pavel
ptr[8]
It's the same under the hood, you get the dereferenced pointer that was offset by sizeof of item * 8
Pavel
If that a pointer to to start of the array you will get the 8th element
/
Yes
yes i thought it
/
thank you
Anonymous
So... when you have an array like arr[9] and you write arr only this is a pointer for the first element And you can write *(arr + 8) which is the same as arr[8] right? the same thing if I make pointer to the first element int *ptr = &arr[0] ptr[8]
Anonymous
Hi everyone am new here
klimi
Hi everyone am new here
then please read the rules so you know how to behave
mito
This is more of like an assembly question.. So, I was reading up on something online about Code caves where you use unused memory in the process to execute extra code. Suppose I have a process where the disassembled instruction at address 0x0040AD9D a call "proc.exe"+0x7564 which is 5 bytes. (for example) 0x0040AD9D E8 0x0040AD9E 1E 0x0040AD9F 5A 0x0040ADA0 05 0x0040ADA1 00 So I'm changing that instruction to something else in that specific address which will jump to my code that I have defined elsewhere in the same memory of the process. The code that was given as an example in that article I was reading about, unsigned char* hook_location = (unsigned char*)0x0040AD9D; Which is the pointer to the address of the instruction that I will change. ... VirtualProtect((void*)hook_location, 5, PAGE_EXECUTE_READWRITE, &old_protect); Now I want to change the instruction to jmp address_to_my_func. *hook_location = 0xE9; 1st byte to 0xE9 - jmp opcode i,e 0x0040AD9D = 0xE9 *(DWORD*)(hook_location + 1) = (DWORD)&codecave - ((DWORD)hook_location + 5); Here I believe , We store the address to the codecave function beside the jmp instruction. Here I don't understand why subtracting ((DWORD)hook_location + 5) from the codecave address. Why are we subtracting it ? #cpp #x86_asm #asm
klimi
Message from anubhav deleted. Reason: external link https://justpaste.it/7vf48 Please help to run this code
klimi
Thought i would really like that you would write your questions too :D
Pavel
Message from anubhav deleted. Reason: external link https://justpaste.it/7vf48 Please help to run this code
I would also mention that's this is a message deleted by the bot, because the bot's message get deleted after a while, and it starts looking weird :)
Pavel
Message from anubhav deleted. Reason: external link https://justpaste.it/7vf48 Please help to run this code
@anubhav6005, what do you mean by "help to run", it gives some compile errors?
Pavel
Ya but what I should do to run that? Please help me
You can paste it on wandbox.org or cpp.sh, if you don't have a compiler. But Ideally you need to get a compiler and learn how to use it
anubhav
compile it and execute it
You resolved the code?
klimi
You resolved the code?
i didn't even look at it
anubhav
Lxjxjxhks
if(s[i]== 'a' || s[i]=='e' || s[i] == 'i' || s[i]== 'o' || s[i] == u) how to shorten this piece of code
Anonymous
Please I where does it suitable to start programming
Anonymous
Please on which device can I start programming
Anonymous
Android or Laptop
anubhav
laptop\
Pavel
like without using multiple or
You can use std::set and search in it, or have std::array<bool, 256> with only these values set to true (if your characters are 8 bit)
Anonymous
C++23
Babasaheb
wow,brilliant
ɛ n h ᴀ n c ɛ ґ 🧟‍♂️
https://pastebin.com/erzVEipQ Hi I’m having a logical error here i can’t seem to find it so if anyone could be of help I’ll be grateful. It’s supposed to print all values in the linked list but it only prints the first value
Anonymous
i need help for a project, you need to know sockets, win32api
ɛ n h ᴀ n c ɛ ґ 🧟‍♂️
Pavel
https://pastebin.com/3F0Wz1s6 you meant this way right? but its still not working
That's because of your while condition, you're missing the last node, I think you need to check for ptr->next instead of ptr in the while loop
ɛ n h ᴀ n c ɛ ґ 🧟‍♂️
That's because of your while condition, you're missing the last node, I think you need to check for ptr->next instead of ptr in the while loop
Yeah i tried that too Thanks for your help I think it means I’ve not fully understood so I’ll have to go back
Ibrahimovic
Guys I'm begging in c++
Ibrahimovic
I need c++app
Ibrahimovic
Anyone send download link
I need c++app
You need MingW
Anonymous
How can I run embedded c in netbeans?
Kriss
if(s[i]== 'a' || s[i]=='e' || s[i] == 'i' || s[i]== 'o' || s[i] == u) how to shorten this piece of code
You can store the characters in another string and use a for loop with embedded if statement
Anonymous
This is more of like an assembly question.. So, I was reading up on something online about Code caves where you use unused memory in the process to execute extra code. Suppose I have a process where the disassembled instruction at address 0x0040AD9D a call "proc.exe"+0x7564 which is 5 bytes. (for example) 0x0040AD9D E8 0x0040AD9E 1E 0x0040AD9F 5A 0x0040ADA0 05 0x0040ADA1 00 So I'm changing that instruction to something else in that specific address which will jump to my code that I have defined elsewhere in the same memory of the process. The code that was given as an example in that article I was reading about, unsigned char* hook_location = (unsigned char*)0x0040AD9D; Which is the pointer to the address of the instruction that I will change. ... VirtualProtect((void*)hook_location, 5, PAGE_EXECUTE_READWRITE, &old_protect); Now I want to change the instruction to jmp address_to_my_func. *hook_location = 0xE9; 1st byte to 0xE9 - jmp opcode i,e 0x0040AD9D = 0xE9 *(DWORD*)(hook_location + 1) = (DWORD)&codecave - ((DWORD)hook_location + 5); Here I believe , We store the address to the codecave function beside the jmp instruction. Here I don't understand why subtracting ((DWORD)hook_location + 5) from the codecave address. Why are we subtracting it ? #cpp #x86_asm #asm
That is because jmp instructions use relative addressing i.e. address to be jumped to is at an offset from the current location. So instead of using absolute addresses, you specify the location to jump to using an offset from the current address in the instruction pointer. That is why you do that.
Anonymous
laptop\
Noted
Rajeev
We have a vector<pair<int,int>> how to print index of second element of pair that is greater than 'n' ? #binary search #sorting #comparators Example: Pair : 1-4 5-7 8-14 19-21 n= 16 n is just greater than second element of pair (8-14) therefore, ans is 2nd index
conko
#include <string> string str = "aeiou" if(str.contains(s[i]))
Could be simplified further by "aeiou"sv.contains(s[i]) in C++23👍
Babasaheb
const char* str = "aeiou"; if(strchr(str,s[i]) != NULL)
Anonymous
Guys what is the different of int main() and void main()
Babasaheb
int main():return a int value ,void main() ,nothing to return
Babasaheb
function main() also need to obey function definition principle
Pavel
Guys what is the different of int main() and void main()
void main is non-standard, I think only MSVC supports it, so it preferable only use int main if you want your app to be portable.