Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is putting c# code in a code-behind and compiling it to a DLL any more secure than an inline <script> block?

Tags:

c#

security

I constantly have to do little 10-line code snippets for customer websites. Other people in my office are now asking me to put the code in DLLs, as the code sometimes contains a password for a 3rd party webservice, or something else of similar security. Is it actually any more secure if compiled to a DLL?

like image 953
Jordan Hudson Avatar asked Aug 30 '12 22:08

Jordan Hudson


People also ask

Why puts is used in C?

The puts() function in C/C++ is used to write a line or string to the output( stdout ) stream. It prints the passed string with a newline and returns an integer value.

IS puts the same as printf?

the printf() function is used to print both strings and variables to the screen while the puts() function only permits you to print a string only to your screen.

What is the meaning of put C?

💪 Ace Coding Interviews. The puts function in C is used to write a line or string to the output stream ( stdout ) that is up to, but does not include, the null character.

What is puts and gets in C?

The puts() function is used to print the string on the console which is previously read by using gets() or scanf() function. The puts() function returns an integer value representing the number of characters being printed on the console.


2 Answers

No. It's classic security by obscurity and can be easily revealed in a decompiler.

like image 158
spender Avatar answered Sep 30 '22 06:09

spender


It is probably slightly more secure, but not by very much. If you are not taking steps to encrypt the passwords, it is only slightly harder to open a DLL in a binary editor and hunt for passwords if you suspect there's something interesting in the DLL.

Either approach is not very secure.

like image 42
Eric J. Avatar answered Sep 30 '22 05:09

Eric J.