X
hi, i need to focus on C application security basics, may you suggest me an resource/course/book please?
Anonymous
hi, i need to focus on C application security basics, may you suggest me an resource/course/book please?
https://www.amazon.com/Secure-Coding-2nd-Software-Engineering/dp/0321822137/ref=mp_s_a_1_1?dchild=1&keywords=secure+coding+c&qid=1626172902&sr=8-1
Anonymous
released in 2005 :( im looking for an up-to-date alternative, sir
The book teaches concepts that are relevant even today. Only the language has evolved but the coding practices suggested in the book are as useful today as they were back then.
Anonymous
oh, ok... and, have you ever read this book? if yes may you share your comments with me please? thx again ^^
I have in the past. The book talks about how C code can be exploited if not programmed carefully. So in the process you not only learn how to avoid coding badly but also how to exploit such code. Admittedly it doesnt talk about advanced topics like kernel exploits using heap spraying and so on but if you are coding a C/C++ library or an application, you want to be sure that you follow the practices laid out in the book. Some of the contents for C++ may not be relevant with Modern C++ but the C content is all still valid
Anonymous
DiD you read his code? He wants to print 3 digit numbers where all the digital are different (I.e. no 2 digits are the same). He also wants to print just the combinations and not the permutations. So 123, 132, 213, 231, 321 and 312 are all considered the same and he wants to print just one of these.
Then in that case Easy part 000 to 009 012 to 019 023 to 029 034 to 039 045 to 049 056 to 059 So on to 089 101 to 189 following above 289, 389, 489, 589, 689, 789, 889, 989 Hard part We can no longer do simple ranges xx1 is invalid cus 1xx 200 is 002, 020 210 is 012, 021 234 to 239 Same as 10 to 89 same as above 333 to 339 Same as above til 987
Anonymous
I think that would be correct
.
And this is the result I got: 012, 013, 014, 015, 016, 017, 018, 019, 023, 024, 025, 026, 027, 028, 029, 034, 035, 036, 037, 038, 039, 045, 046, 047, 048, 049, 056, 057, 058, 059, 067, 068, 069, 078, 079, 089, 123, 124, 125, 126, 127, 128, 129, 134, 135, 136, 137, 138, 139, 145, 146, 147, 148, 149, 156, 157, 158, 159, 167, 168, 169, 178, 179, 189, 234, 235, 236, 237, 238, 239, 245, 246, 247, 248, 249, 256, 257, 258, 259, 267, 268, 269, 278, 279, 289, 345, 346, 347, 348, 349, 356, 357, 358, 359, 367, 368, 369, 378, 379, 389, 456, 457, 458, 459, 467, 468, 469, 478, 479, 489, 567, 568, 569, 578, 579, 589, 678, 679, 689, 789
Anonymous
Where is 031? 130? Etc
031 is a permutation of 013
Anonymous
;-;
Anonymous
791 ?
Anonymous
Anonymous
https://resources.sei.cmu.edu/downloads/secure-coding/assets/sei-cert-c-coding-standard-2016-v01.pdf
Pretty much the same guidelines as in the 2005 edition I pointed out. There are 5 new additions. Like I said there is not much change in secure coding practices landscape as far as C is concerned
Yorhane
hello guys, can I make a code in C to run the cmd, type something into it, and then press the enter key?
Yorhane
*guys
Thanks
Ahmed
Arrithnius
Good day..can someone help me with the comparison between strings from a user, like string name; cin » name; then like maybe if(name != "john") { //terminate a program by line exit(0); } I'm sorry, i am unable to break line for this problem..please help
Cesco
Strcmp(name, "John") for example
Arrithnius
Strcmp(name, "John") for example
"john" is a string name which a user is supposed to enter, if not then program terminated. This is like (Do you want to continue(Y/N) where a user would enter y or n, not any other character) my example requires a string, a full name.
Cesco
Strcmp() is an int func
Anonymous
Hello
z
Hello
https://www.nohello.com/2013/01/please-dont-say-just-hello-in-chat.html
Anonymous
if( !compare(name, "John")) return or exit;
Anonymous
Does anyone have any questions about data structures or algorithms for everyone to discuss?
Anonymous
Me first. Please write a function to copy source string to destination string without using std library
.
what is this?
An exercise for my school
Anonymous
what it does ? pseudo random number generator ?
Anonymous
what is your problem ?
.
what it does ? pseudo random number generator ?
Something like that, you can scroll up to see the code
Anonymous
what errors?
Anonymous
code?
Anonymous
paste in pastebin and send the link
Anonymous
Send in gruop
Anonymous
Does someone know why do I can’t put the limit of ‘99’ instead of ‘9’ in while conditions?
' ' is used to specify a character literal. '99' is not a character literal and you cant use single quotes around it.
Anonymous
I tried “99” but it’s still not working
Because "99" is a string literal and you cant use relational operators with it
Anonymous
Can anyone help me get a ram disk driver to not use paged/nonpaged pool?
.
Because "99" is a string literal and you cant use relational operators with it
Okay so what should I use to make it work? When I remove quotes it’s still wrong
Anonymous
Https://github.com/Zero3K/ERAM/ is the repository for the ram disk's source code
Anonymous
Stringy +====+ With C/C++ programming language, implement the simplest way to reverse a string +===+
Anonymous
char src[]= "123456789"; char des[10]; int l=0; while(src[l]) l++; int i; for(i=0; i<l; i++) des[i]=src[l-i-1]; des[i]='\0'; for(int i=0; i<l; i++) cout<<des[i]; return 0;
Anonymous
Output: 987654321
Tecatito
write a program that find the addition, multiplication, subtraction, division and average for any two floating numbers by using different called function and return all results in calling functions. The output displays must be in 3 floating points. Get the input from keyboard. Can anyone teach me how to do this question. I stuck with that question
Anonymous
float foobar = 0.9375; printf("%.3f", foobar);// prints out 0.938
.
What’s the simplest way to remove the last comma from a while loop?
Pavel
Anonymous
I dont know what exactly your question
Anonymous
Pls paster ex code
Pavel
Yes
depends on how you iterate over, I would just add a check for it, like this if (i < count - 1) { std::cout << ","; }
Pavel
another fancy way would be for (int i = 0; i < size - 1; ++i) { printValueByIndex(i); printComma(); } printValueByIndex(size - 1);
...
or, even better, dont even append it if you dont need it ;)
Pavel
But I've never seen code like this
Anonymous
While(a<b){ Print a; If (a==b-1 ) break; Print comma; }