Wireguard reconfiguring AllowedIPs can cause issues 2024-05-16 english computer When reconfiguring Wireguard AllowedIPs list it could happen that previous or parallel connections (race condition) send/receive packets to/from forbidden IPs. This is not a problem if this connections are eventually closed. However, worth noticing.
Tail recursion in loop while 2024-04-15 english computer Interesting optimization of recursion using tail function. Consider this: void RecursiveFunction(ref HashSet finalList, Type itemToAdd, ref HashSet itemsToNotAdd) { // some checks and returns
Cognitive Complexity (SonarQube) 2024-04-15 english computer - Increment when there is a break in the linear (top-to-bottom, left-to-right) flow of the code. - Increment when structures that break the flow are nested. - Ignore "shorthand" structures that readably condense multiple lines of code into one.
WireGuard 2023-06-15 english This is the VPN solution used in the project I am working on, a simple and secure packet distribution and controlled by the IP addresses configured for each peer. There is a very nice example in [the home of WireGuard project].
Debugging a non signed driver in Windows 10 2023-06-15 english debugging computer Not always just to disable driver signing enforcement work in Windows. In Windows 10 when tried to start a driver after reboot with `bcdedit -set TESTSIGNING ON` I still got the `StartService FAILED 577: Windows cannot verify the digital signature for this file` message.
Critical Sections and Outlook 2023-06-15 reversing english debugging computer Today was a happy crush analysis day, because I receive an Outlook memory dump the moment it frooze the main window in the beginning of the process. I asked for one because it could be useful to another analysis I was doing with Office server communication.
Asciidoc is the best 2023-06-05 computer english essays After reading about the purpose and [current implementation of asciidoctor] I realize that asciidoc is the best text standard for the future of the blog. I say that based on the structure care of the format, the embebbed metadata into its own format and the clear objective of being a unique and formalized standard, what could simplify a lot the necessity of writers and publishers of keeping a text base as the original and yet keep the structure inside with almost no effort in the side of the writers.
Hacker Rank Array - Part 1 2023-04-28 english interview computer The next step after [the Warm Up challenges] are the array challenges. And so I did it. Now I am going to recap what I did and how I did. And what complexity the algorithms have. ## Array Manipulation
Close Remote Socket 2020-07-05 english computer I got used to close sockets in Windows using TCP View, but I haven't learned yet how to do this in Linux. Some Google and now I know. It is kinda simple in terminal mode, as any task a programmer needs to do in your system.
Some things I learned in a Hacker Rank exercise 2019-08-08 english ccpp computer A couple of days ago I subscribed to Hacker Hank, a website specialized in provide interview exercises. The site is as a better version of Code Jam, with the possibility to Compile & Run the code, as well as running several test cases.
Real Programmers Don't Use Java 2014-02-20 english When I was a newbie (and a wanna-be) I enjoyed reading "Real Programmers Don't Use Pascal", a satiric text that influenced and encouraged me into the path of "C/C++ enlightenment", most even than K&R's book. Since then I thought that being a "Real Programmer" was something close to everything one needs to know to get (hard) things done (quickly). Being a "Quiche Eater" was, in couterpart, comparable to nothing. Real Programmers solve real problems! Quiche Eaters are losers who study the academic concepts of computer science and never do a damn useful and/or working program (maybe you know some guy like this).
Using TodoList and Microsoft Project together 2010-04-10 english computer The next article about bits is still in the oven. Taking vacation (40 days) had drop me out of ideas! At the moment, I can explain the tips and tricks using  TodoList to manage my team and synchronize my tasks in a Microsoft Project timesheet.
What I've been doing in the last 10 years 2009-08-17 english This week I dedicate myself to update my resumè and I have the brilliant idea of put into it my technical historical, what resuming is a list of things I did or was involved with during my brief ten years stay in the programming world.
Static Polymorphism 2009-07-10 english computer To explain the polymorphism nothing is better than see how stuff used to be. If you were a twenty old C programmer in the past and created the following functions: int soma(int x, int y); double soma(double x, double y);
Antidebugging during the process attach 2008-08-05 english projects computer Today was a great day for reverse engineering and protection analysis. I've found two great programs to to these things: a API call monitor (update: does not exist anymore) and a COM call monitor (update: either). Besides that, in the first program site - from a enthusiastic of the good for all Win32 Assembly - I've found the source code for one more antidebugging technique, what bring us back to our series of antidebugging techniques.
Antidebugging using the DebugPort 2008-08-01 english projects computer When a debugger starts a process to be debugged or, the article case, connects to a already created process, the communication between these processes is made through an internal resource inside Windows called LPC (Local Procedure Call). The system creates a "magic" communication port for debugging and the debugging events pass throw it.
Antidebugging using exceptions (part two) 2008-07-30 english projects computer In the first article we saw how it's possible to spoof the debugger through exceptions and let the attacker lose some considerable time trying to unbind the program from the fake breakpoints. However, we saw also that this is a difficult solution to keep in the source code, besides its main weakness to be easily bypassed if discovered. Now it's time to put things easier to support and at the same time to guarantee tough times even if the attacker discover what is going on.
Antidebugging using exceptions (part one) 2008-07-28 english projects computer A debugger puts breakpoints to stop for a moment the debuggee execution. In order to do this it makes use of a well known instruction: int 3. This instruction throws an exception - the breakpoint exception - that is caught by the operating system and bypassed to the handling code for this exception. For debuggee processes this code is inside the debugger. For free processes this code normally doesn't exist and the application simply crashs.
How to run anything as a service 2008-05-27 english computer The biggest advantage running an application as a service, interactive or not, is to allow its start before a logon be performed. An example that happens to me is the need of debugging a [GINA]. In order to do this, I need the Visual Studio remote debugger be started before logon. The easiest and fastest solution is to run Msvcmon, the server part of debugging, as a service.
Funky do-while 2008-02-13 english computer It's a known habit to use do-while constructions when there's a need to define a macro that has more than one command instead of using the { simple multicommand brackets }. What was never clear is why this is so.
Silly regex trick 2008-02-07 english computer I know what you going to think about this one: "silly trick". That's why I just put it in the title. Anyway, that is something I use everyday, so I thought it might be useful to who cares about productivity.
MouseTool 2007-11-13 projects english Well, as most of you already know, I really don't like mice. Nevertheless I respect the users who use it and like it. That is the reason why I am writing a little more about it. This time, I going to show a program I use every day: MouseTool, for the users who does not use the mouse and like it.
Why is my DLL locked? 2007-09-24 english computer The Windows code responsible to call DllMain for each loaded and unloaded DLLs uses an exclusive access object, the so-called mutex, to synchronize its calls. The result is that inside a process just one DllMain can be called at a given moment. This object-mutex is called "loader lock" into the Microsoft documentation.
C and C++ Operators Precedence Table 2007-07-30 english ccpp computer > Wanderley, your explanation about [why a program compiles in C++ and not in C] seems to me logic and correct, but gave me some doubts, because I always learned that the C and C++ operator precedence are the same thing. I checked out the Appendix A in the "C ++ - How To Program" (sixth edition) and the book table is equal to the C operators precedence table and it is different from the C++ precedence table presented by you in the article. I went to the internet and found out in two websites the table and both are equal to the book table:
What happens inside the sizeof operator 2007-07-16 english ccpp computer The question: how to get the size of a struct member without declaring it as a variable in memory? In pseudocode: static const size_t FIELD_SIZE_MSGID = 15; struct FEEDER_RECORD_HEADER {
Precedence difference 2007-07-10 english ccpp computer Once upon a time my old friend Kabloc wrote this little and "harmless" function in order to print the multiplication table: #include int main() { int f1,f2,s=0; for( f1 = 1; (f1 == 11 && s != 5) ? s=5, f1=0, putchar(10) : ( f1 <= 10 ) ? f1 = f1 : f1 = 12, f1 <= 11 ; f1++ )
Google shortcuts 2007-07-06 english I love shortcuts. Since my very first years using computers, shortcuts had become my obsession. I research them through the time, collecting them, using them. For a long time I avoid myself from touching the mouse, trainning to remember all keystroke sequences I know.
Disassembling the array operator 2007-06-22 english ccpp computer Arrays are fascinating in C language because they are so simple and so powerful at the same time. When we start to really understand them and realize all its power we are very close to understand another awesome feature of the language: pointers.