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))))
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>...
| ^~~~~~~~
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.
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);");