Fading Coder

One Final Commit for the Last Sprint

Java Object Serialization and Print Streams

Object Serialization and Deserialization Writing objects to a stream using ObjectOutputStream is called serialization. Reading objects from a stream using ObjectInputStream is called deserialization. Creating a Serializable Class To serialize an object, the class must implement the Serializable inte...

Java RMI Deserialization Attack Analysis

RMI Overview Java Remote Method Invocation (RMI) enables distributed computing by allowing objects in one JVM to invoke methods on objects residing in another JVM. A typical RMI application consists of: A server that creates and exports remote objects A client that looks up and invokes methods on th...

JSON Deserialization Strategies for .NET Applications Using Newtonsoft.Json

When working with JSON data in .NET, the Newtonsoft.Json (Json.NET) library provides robust mechanisms for serialization and deserialization. One common approach involves parsing a JSON string into a JObject to extract specific properties and convert them into strongly typed objects.Deserializing Si...

Decoding a Serialized Pattern with Python’s pickle Module

The puzzle starts at the page with an image and a cryptic instruction: "pronounce it." Viewing the page source reveals a reference to a file named banner.p, alonsgide an HTML comment that reads "peak hell sounds familiar ?" Retrieving banner.p from the server returns what appears...

Implementing Shallow and Deep Cloning in C#

The MemberwiseClone method generates a shallow copy by creating a new instance and copying all non-static fields from the original object. For value types, a bitwise copy occurs; for reference types, the reference itself is copied, not the referenced object. Consequently, both the original and clone...

Using ThreadLocal for Thread-Specific Variables and DTOs in Java Applications

When the data submitted by the frontend differs significantly from the corresponding properties in the entity class, its advisable to use Data Transfer Objects (DTOs) to encapsulate the data. In the service layer, where data transmission is required, you can use the following method to copy properti...

Practical Techniques for File Operations and Data Serialization in C#

File-based storage is optimal for managing substantial volumes of data with simple relationships, such as application logs, offering accessibility across various storage media. The .NET framework provides stream-based APIs for file interaction. Common File and Directory Operations Obtain the current...

Addressing BinaryFormatter Obsolescence When Migrating from .NET Core 3.1 to .NET 5.0

When upgrading a project from .NET Core 3.1 to .NET 5.0, a common compilasion warning arises concerning serialization: warning SYSLIB0011: 'BinaryFormatter.Serialize(Stream, object)' is obsolete: 'BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter fo...

Excluding Fields from JSON Serialization in Java

Mark Fields for Exclusion The transient keyword in Java is natviely recognized by most Java JSON libraries (including the popular Jackson libray) to skip marked fields during serialization. This is ideal for sensitive data like passwords or internal fields that do not need to be included in output J...

Working with JSON Data in Python

JSON (JavaScript Object Nottation) is a lightweight data interchange format that is easy for humans to read and write, and easy for machines to parse and generate. Python provides a built-in json module for handling JSON data. Using the json module, you can convert Python objects to JSON strings (se...