/
Is it work correctly?
it decrypts the string but also adds unuseful thingd
/
Is it work correctly?
bytearray(b'com/maxm\x00\x00\x00\x00\x00\x00\x00\x00') this is the output but the only useful thing is com/maxm
/
Ok i understand
and when i use the full string
/
Ok i understand
the output is this bytearray(b'\x14X\xdf\x0fE\x08\x9bGf}\x97\x1b\x8c\x1d@7')
/
it doesnt show anything
/
Ok i understand
n = 0x37401D8C1B977D661DA374A43B254A11 this is the full one
/
but not completely full
/
Ok i understand
i think you understand+
Daulet
import sys xor_keys = [ 5, 0x12, 0xFA, 0x34, 0xE1, 0x7C, 0x38, 0x5A, 0x61, 0x30, 0xA, 0x5A, 0xD1, 0x10, 0xCA, 0x72, 0x15, 0x51, 0xA5, 0x64, 1, 0x5F, 0x31, 0x41, 0x7A, 0x25, 0x2B, 0x8A, 0x3F, 0x1F, 0x9A ]; def decrypt(string_length, bytes): str_length = string_length & ~(string_length >> 31) counter = 0 while True: key = xor_keys[counter] if counter > 31: counter = 0 bytes[counter] ^= key counter += 1 str_length -= 1 if str_length == 0: break index = len(bytes) // 2 return bytes[:index].decode() n = 0x37401D8C1B977D66 length = 8 print(decrypt(length, bytearray(n.to_bytes(16, sys.byteorder))))
Daulet
index = len(bytes) // 2 return bytes[:index].decode() this new code
/
Ok
theres is an error
/
Ok
return bytes[:index].decode() UnicodeDecodeError: 'utf-8' codec can't decode byte 0xdf in position 2: invalid continuation byte
/
Show me the complete string
0x37401D8C1B977D661DA374A43B254A11
/
ok
/
Show me the complete string
i have sent the the complete string
/
Ok i see
you understand ed the error
Daulet
you understand ed the error
Is xor keys right for complete string?
/
Is xor keys right for complete string?
yes it is for every string that is encrypted with it
/
Is xor keys right for complete string?
void __fastcall decrypt_string_f2(int string_length, char *string_ptr) { int str_length; // r0 unsigned int counter; // r2 char byte; // r3 if ( string_length >= 1 ) { str_length = string_length & ~(string_length >> 31); counter = 0; do { byte = xor_keys[counter++]; --str_length; if ( counter > 31 ) counter = 0; *string_ptr++ ^= byte; } while ( str_length ); } }
Daulet
this is the c++ version
Show me original of string plz
/
Show me original of string plz
the original string should be com/maxmpz/audioplayer/Sync or something like that
/
Show me original of string plz
the c version works well
/
Yes
so you decrypted the full string
Daulet
Daulet
No i dont know how
Better to complete c++ version
/
Better to complete c++ version
i ahve only the problem
/
No i dont know how
but you fized the error
/
No
how
/
its all the day
/
that i make this thing
Michel
Hi there, I'm using meson + ninja in order to build my code and I'm getting a very lengthy error in this instruction: c++ -Itest/vector.p -Itest -I../test -I../include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Wpedantic -O0 -g -MD -MQ test/vector.p/vector.cpp.o -MF test/vector.p/vector.cpp.o.d -o test/vector.p/vector.cpp.o -c ../test/vector.cpp Could someone explain to me what do these options mean?
Michel
What I get is A LOT of errors like this In file included from ../include/cxxopts.hpp:43, from ../test/vector.cpp:4: test/vector:1:1: error: stray ‘\177’ in program 1 | <U+007F>ELF<U+0002><U+0001><U+0001>... | ^~~~~~~~
Michel
Here is my code if someone is interested in checking this out. The error occurs when I recompile after changing some of the .cpp's that use cxxopts.hpp
\Device\NUL
Do float types are portable , unlike integer types which has cstdint due data model. Or is there any typedef or header that similar to stdint ?
Sidharth Singh
/n
Kriss
So my throw code is like throw "No paper" And my catch code is catch(const char *txt ){} My question is why we are using a pointer to define the catch type and why char, can't we use something like catch(string txt){}
3xploit
Hello can i ask some question related mostly to compiler ? I am using visual studio for a project on C language but it doesnt resolve functions like realloc and memcpy. The project is taken from github and i would like to do some edits , it seems like the configuration is wrong because if i create new project these functions work fine.
3xploit
what do you mean by saying 'doesn't resolve'? raw error messages might help.
Yeah sure , Error LNK2001 unresolved external symbol __imp__wcsnicmp Same happens with all C functions.
Liam
yes 2022
see this: https://docs.microsoft.com/en-us/cpp/porting/visual-cpp-change-history-2003-2015?redirectedfrom=MSDN&view=msvc-170#BK_CRT > The definitions of all of the printf and scanf functions have been moved inline into <stdio.h>, <conio.h>, and other CRT headers. This breaking change leads to a linker error (LNK2019, unresolved external symbol) for any programs that declared these functions locally without including the appropriate CRT headers. If possible, you should update the code to include the CRT headers (that is, add #include <stdio.h>) and the inline functions, but if you do not want to modify your code to include these header files, an alternative solution is to add an additional library to your linker input, legacy_stdio_definitions.lib. and see this: https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strnicmp-wcsnicmp?view=msvc-170 > The Microsoft-specific function names strnicmp and wcsnicmp are deprecated aliases for the _strnicmp and _wcsnicmp functions.
Sadat
I was doing my project and i across the above code. But i am stuck, because after i extract data and wish to put it into database using the variable name, but unable to do so May i know is it possible to insert into the database using variable name ? eg. int i = 100; db->query("INSERT INTO a VALUES(5, i);");
Sadat
any help please
3xploit
@frame0x01 thanks for you help , i just copied all project files to another project and it worked.
Anonymous
So my throw code is like throw "No paper" And my catch code is catch(const char *txt ){} My question is why we are using a pointer to define the catch type and why char, can't we use something like catch(string txt){}
Exceptions don't do type conversions. There are very limited type conversions supported for exceptions and user defined conversions are not one of them. And think about it. When an exception is thrown, the C++ runtime stores the exception object in a place where it can be accessed by all threads. If all type conversions were allowed, then you will be working on a temporary and not the actual exception object. And if you rethrow that object, it will be meaningless because all the information you put into it while handling it will be lost as it is only the original exception object that will be rethrown.
Anonymous
1. Read C book. 2. typedef char *string; 3. PROFIT!!!
That is not even a relevant answer. He is talking about exceptions and you advise him to read about C
`` 🇫🇷 ;; ce serai ta blonde ce soir, si c'est ce que tu aimes
jaebie
Can I ask for some help in c++?
jaebie
Yes
i need a progran wherein it has function that will calculate the distance between two points
jaebie
kindly help me
Dima
try to write something at first
klimi
kindly help me
sure, and what do you know? how to write function? how to calculate distance between two points?
jaebie
How to write function
klimi
How to write function
void function() { // code }
Dima
void function() { // code }
no void function() { // code }