Nope
if checks that p is not NULL and a is greater than *p. It looks like finding maximum of a, and *p
Yes, i think it is a check for a null pointer, im looking for confermation
Anonymous
i using the sizeof operator in C on a string variable ( i know its views it as a pointer) so on a 64 bit system it should output 8 , which it does, but when i create another pointer , and do the samething it outputs 4, any reason why ?
Anonymous
Show the code
https://pastebin.com/UPy7q249
Artöm
https://pastebin.com/UPy7q249
sizeof(someArry) is sizeof(char[4]) which is 4
Anonymous
sizeof(someArry) is sizeof(char[4]) which is 4
in the function tho , its shows 8 bytes
Anonymous
for the string parameter
Anonymous
printf("this string seems to take up %i bytes of memory\nbut acutally it is referring to the size of the pointer variable\n", sizeof(string));
Anonymous
this outputs 8
Artöm
in the function tho , its shows 8 bytes
Because string argument has type char*
Artöm
Which has size 8 on your machine
professor
hey guys , does anyone here can interpret asm or c version of decompile version?
Artöm
hey guys , does anyone here can interpret asm or c version of decompile version?
And why doy need to interpret it and not use compiled?
professor
And why doy need to interpret it and not use compiled?
hey guys , I got a doubt on that strange function . which it doing a for` '\a' and '\b'` , but I also notice is subtraction v6 % 8 in this case AAAAAAA which lands in the first condition , but if I have the value -194 which is the result value from our` __QWORD[256] Buffer = sub_140001170(array[v9 % -256]); # -194` . I saw, some_256_array `is full of ret instructions or that's what it is copied to `empty_function by default. the thing is v9 is 62 by default, but I am confused to reach at else part if ( *(_QWORD *)buf == '9102okE' ) { strcpy(buf, "Eko2019"); if ( msg <= 512 ) { printf(aWaitingUserMes); v6 = recv(s, &Dst, (unsigned __int16)msg, 0); printf(aMessageReceive, v6); if ( (signed int)v6 % 8 ) { printf(aErrorInvalidSi); result = '\0'; } else { qword_14000D4E0 = printf(aRemoteMessageI, (unsigned int)dword_14000C000, &Dst); ++dword_14000C000; Buffer = sub_140001170(array[v9 % -256]); v2 = GetCurrentProcess(); WriteProcessMemory(v2, empty_func, &Buffer, 8ui64, &NumberOfBytesWritten); empty_func(); *(_QWORD *)v4 = v3; send(s, v4, 8, 0); result = 1i64; } }strange function sub_140001170 [+] Header received: 14 bytes [+] Header received: 8 bytes buf = struct.pack("<Q",0x393130326F6B45) v12 = "AAAAAAA" * 512# msg <= 512 , gets Error: Size too big payload = buf + v12
Artöm
WHat the fuck
professor
I mean I want to redirect the flow to else instead of first condition
Artöm
recv returns length of the received message. If banch will be executed if this length is not dividable by 8
Artöm
Hella lot of shit happens here, naming kills me
professor
it is because I dont have source code , and I have to use decompiler e
professor
a pwning chall
Ariana
so is it segfaulting?
Anonymous
int findSecondSmallest(int arr[], int n) { int smallest, secondSmallest; if(arr[0]<arr[1]) { smallest = arr[0]; secondSmallest = arr[1]; } else { smallest = arr[1]; secondSmallest = arr[0]; } for(int i=0; i<n; i++) { if(smallest>arr[i]) { secondSmallest = smallest; smallest = arr[i]; } else if(arr[i] < secondSmallest) { secondSmallest = arr[i]; } } return secondSmallest; } It returns the small element from first two elements i didn't get where is the problem. I want to return the second minimum element from arry
professor
ida windows reversing? sounds painful
no segmenting , no fuzzing , and it is killing me the header structure , but I have the logic , and maybe I am missing something
Laxmikant
Anonymous
Czar
Or std::nth_element
Nth element is partial sort :)
Czar
Also it gives better name 👍
Rachmadi
What is solution in my problem? Please help meee
Anonymous
Does anyone have pdf of C by forouzan
Francisco
std::sort
Not if you're in C
rex
just search in stackoverflow
Muhtasim Adil
What kind of questions can i ask here?
Anonymous
What kind of questions can i ask here?
Read the rules and find out
Anonymous
Hello guyzz am new here
Anonymous
Can someone help me
Anonymous
/warn
Biswajit
Do u have latex codes list
Biswajit
If anybody uses,upload it
Anonymous
Thankss
Welcome
Alankar
What is solution in my problem? Please help meee
why you use crome or firefox use brave browser no ads
Alankar
ot mean ?
Anonymous
off-topic
Alankar
ok
Anonymous
I'm trying to find the biggest number which is a power of 2 and is smaller than n.
Anonymous
#include<iostream> using namespace std; int main(){ long long n = 10000000000; for(long long i=61;i>=0;--i){ if((1 << i) & n){ cout<<i<<" "<<(1 << i); return 0; } } return 0; }
Anonymous
output: 60 268435456
Anonymous
This is wrong. The biggest number which is power of 2 and smaller than n =10000000000 is 8589934592.
Anonymous
What is going wrong here?
Dima
/ban Joined the group via ban link
Deepak
How can i insert a node in circular linked list
Deepak
Anyone know
.
Yes
Anonymous
If 1<<i becomes greater than n even then the AND operation will yield 0. Ain't it?
din va lu
What is the algorithm for inserting element at the array
C.
and operation evaluates if it is true or false
C.
and anything that's non 0 is true
C.
Sorry if I said something supid, but that's what I've learned so far
Anonymous
I mean suppose I've n = 5 -> 101 and so it's 61 to 3rd bit will all be 0(0 based indexing) so 1<<i & n will be 0 from 61 to 3.
C.
oh yeah, tks
Wim
I'm already wondering where the A comes from
Anonymous
Do you mean bitwise and? Then yes
yeah it's all bitwise.