Alex
but i want to execute the signal handler every 5 seconds
klimi
well then you need to do it some other way
Alex
well then you need to do it some other way
i can't reuse the alarm multiple times?
klimi
well you can reuse it
klimi
but alarm(N) just sets the timer to N seconds
klimi
so if you are infinitely looping and resetting it to 5 seconds, it will stay on 5 seconds.
klimi
It's like setting up egg timer to 10 minutes and after 1 minute put it once again at 10 minutes
布丁
If there’s no software vulnerabilities, hardening is useless
Alex
so if you are infinitely looping and resetting it to 5 seconds, it will stay on 5 seconds.
maybe i could put the new alarm(5) in the handler, it will work?
Hussein
If there’s no software vulnerabilities, hardening is useless
exactly the V8 engine has and will be replaced at some point
Hussein
the problem is that JIT compilation and its optimisation isn’t easy to implement
Anonymous
but i want to execute the signal handler every 5 seconds
what about….? doAction() { alarm() doAction() }
Anonymous
It falls into a loop and calls itself after specified seconds
Alex
but the alarm handler what does? -the main has to accept new connections -the handler has to check the connections every T seconds
Anonymous
but the alarm handler what does? -the main has to accept new connections -the handler has to check the connections every T seconds
stackoverflow.com/questions/15541262/using-alarm3-with-out-exit-from-program-c Check this one, may help you.
Alex
ty
Anonymous
ty
You’re welcome
klimi
you should be able to...
Anonymous
you cannot send links?
I fear of getting warnings/banned
klimi
well you wouldn't be banned immediately anyway
klimi
try sending the link
Anonymous
Stackoverflow links are allowed here?
Dima
/warns
/warns
Dima
Stackoverflow links are allowed here?
cant really say, try to post it, if you’ll get a warn we’ll remove it
Dima
sure
I thought Rose triggers to any link posted
klimi
no... rose should trigger on t.me and alike
\Device\NUL
t.me
klimi
nvm...
布丁
exactly the V8 engine has and will be replaced at some point
modern OS applies hardening for all programs
klimi
hm only immediate ban we have on telegram.me which i don't know why that is
Dima
/blue_text_must_click
CoolkingX
Guys plz suggest me some good sites for c++ with oops concept
Hussein
modern OS applies hardening for all programs
yeah as processes to separate them from each other into memory pages so no process can read the memory of another which is what the protect mode is about but this only prevent a process from crashing another process which is irrelevent and not even a sandbox
Hussein
modern OS applies hardening for all programs
if you think about it, a malware is nothing different than a regular program execpt for its purpose an intention it can do whatever a regular program does and screw up your computer the only thing that malware may not be able to do is to read other programs memory which is good but taken for nowadays granted
Hussein
Guys plz suggest me some good sites for c++ with oops concept
a website called tutorialspoint was good enough for me
Hussein
and there is tons of those just pick the one you like or watch a video tutorial on youtube
CoolkingX
Ok
布丁
Just name a few, ASLR, NX bit, stack canary etc
Hussein
Well, hardening is much more than that
what kind of hardening do you mean?
布丁
what kind of hardening do you mean?
Include those tunable advanced security features in Windows Defender
Hussein
ASLR is used to generate random virtual addresses and to prevent some attacks that can exploit memory corruption to read other programs memory and NX bit is way to separate executable code and data in memory to make it harder to load malware into flawed programs and a stack canary is used to keep programs access the memory that they allocated nothing can prevent a malware also windows defender is a anti-virus which tries to detect known malware and there are tons of ways to bypass that
Hussein
still a malware can do horrible stuffs once it is executed
Digvijay Singh
Hey someone help me I'm not able to do easy and medium questions of gfg
Digvijay Singh
What to do?
Hussein
on what topic?
0xJosh
What's the most efficient and effective way of coding a C++ algorithm for generating secure random numbers for market prices? I'd like some ideas on this 🙏
Hussein
do you mean like cryptographically secure or good enough for statistical purpose?
Hussein
what do you mean by market prices?
0xJosh
do you mean like cryptographically secure or good enough for statistical purpose?
Yes, cryptographically secure random number generator/algorithm.
0xJosh
what do you mean by market prices?
Like the financial markets
0xJosh
Although this isn't for the global forex Market, it's for a special kind of Market called "synthetic indicies"
Digvijay Singh
Ravi
Arrays
For a problem, first determine what you should do, and code it, then go for actual algorithm behind it. If cant determine, then simply understand the algorithm and code it on your own.
Hussein
Although this isn't for the global forex Market, it's for a special kind of Market called "synthetic indicies"
well.. for anything has to be cryptographically secure you should use a well-tested library and avoid using a library you made library from scratch unless it has been tested not to be broken by cryptanalyzing your cipher libsodium is great one that I have been using also it is so easy to use also it’s a fork of libNaCl which is a library that follows best practices for cryptographic algorithms implementation so you would expect it to be more secure than few other libraries
Hussein
Thank you for this.. Didn't even think about the library stuff. Asides from that do you have any tips or guidelines on how I'd go about coding it?
https://doc. libsodium .org/generating_random_data this the link for it’s official documentation on how to generate secure random numbers
Hussein
there are few functions for different uses as specified above just pick the one that suits you and use it just like you use any C library
Hussein
also I beleive that they have bindings for almost every language so you can install the one that suits you the most
Hussein
Thank you for this.. Didn't even think about the library stuff. Asides from that do you have any tips or guidelines on how I'd go about coding it?
everything is in the document on how to securely use everything just read it and you gonna be just fine
MRT
hi, what is 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, 0x20, 0x40, etc. memory address? can give an example to understand this or give me an article about it
MRT
for what architecture?
yul, solidity, i think 64 bit, sorry im new :D
klimi
so you can address by 64 bit ints, so that would make max address 2^64
klimi
thats right :)
then you have all the necessary information to say whether number can or cannot be an address
MRT
then you have all the necessary information to say whether number can or cannot be an address
for example i have this struct struct MyStruct { uint64 x; uint64 y; uint256 z; } i want to select slot, for first slot we use _x := and(w, 0xffffffffffffffffffffffffffffffff) // == x , i want to know why i use 0xffffffffffffffffffffffffffffffff ? what is this ? 0xffffffffffffffffffffffffffffffff what is this addres ??
klimi
dunnot, to me it looks like they just wanted to have some max value of the datatype
klimi
but i might be off
MRT
for next slot we use shift right _y := shr(64, w)