مطالب
برنامه نویسی امن به زبان C

اگر سخنان بزرگان برنامه نویسی را مطالعه کرده باشید، یکی از موارد این بود:
" هیچگاه از gets و sprintf استفاده نکنید، در غیر اینصورت شیاطین به زودی به سراغ شما خواهند آمد! (FreeBSD Secure Programming Guidelines) "
به عبارت دیگر استفاده از توابع کتابخانه‌های استاندارد زبان C ، بدون ملاحظات لازم (یا همان برنامه نویسی کلاسیک به زبان C )، منشاء بسیاری از حملات Buffer overrun است، زیرا اکثر این توابع اندازه‌ی بافر یا رشته‌ی ورودی را بررسی نمی‌کنند.
برای رفع این مشکلات که هنوز که هنوز است قربانی می‌گیرد! ، The Safe C Library پدید آمده است. این کتابخانه بر اساس استاندارد ISO TR24731 تهیه گردیده و در آن یک سری توابع مکمل، جهت بالا بردن امنیت‌ برنامه‌های تهیه شده به زبان C مطابق استاندارد ISO/IEC 9899:1999 معرفی شده است.

برای مثال مطابق استاندارد ISO/IEC JTC1 SC22 WG14 N1172 ، تابع نا امن memcpy با تابع امن زیر باید جایگزین شود:
errno_t  memcpy_s(void *dest, rsize_t dmax, const void *src, rsize_t smax)

مستندات آن‌را در فایل safe_lib_html.tar پس از دریافت کتابخانه می‌توانید مشاهده نمائید.

همچنین اخیرا به عنوان مکمل این مجموعه، یک کتابخانه‌ی ریاضی امن نیز تهیه شده است.

پ.ن.
شبیه به همین مورد در اینترفیس پلاگین‌های IDA-Pro در نگارش‌های اخیر آن اعمال شده است و برنامه نویس را وادار می‌کند که از نمونه‌های معادل امن در آن محیط استفاده کند.
//pro.h
// We forbid using dangerous functions in IDA Pro
#ifndef USE_DANGEROUS_FUNCTIONS
#if defined(__BORLANDC__) && (__BORLANDC__ < 0x560 || __BORLANDC__ >= 0x580) // for BCB5 (YH)
#include <stdio.h>
#endif
#undef strcpy
#define strcpy dont_use_strcpy // use qstrncpy
#define stpcpy dont_use_stpcpy // use qstpncpy
#define strncpy dont_use_strncpy // use qstrncpy
#define strcat dont_use_strcat // use qstrncat
#define strncat dont_use_strncat // use qstrncat
#define gets dont_use_gets // use fgets
#define sprintf dont_use_sprintf // use qsnprintf
#define snprintf dont_use_snprintf // use qsnprintf
#define wsprintfA dont_use_wsprintf // use qsnprintf
#endif
برای مطالعه بیشتر: The Safe C Library

اشتراک‌ها
مایکروسافت برنده‌ی پروژه ۱۰ میلیارد دلاری سرویس‌های پردازش ابری پنتاگون

In the battle over cloud providers, the bid for the United States Department of Defense (DoD) Joint Enterprise Defense Infrastructure (JEDI) contract is a big deal. The DoD released on October 25, 2019 that they are awarding the JEDI contract worth up-to $10 Billion ($10,000,000,000) over the next 10 years to Microsoft. They have ultimately chosen Microsoft, and Microsoft Azure, as the cloud of choice to standardize on a single cloud vendor to build out their enterprise cloud.  

مایکروسافت برنده‌ی  پروژه ۱۰ میلیارد دلاری سرویس‌های پردازش ابری پنتاگون
اشتراک‌ها
طراحی تامین کننده مبتنی بر Filesystem برای سیستم Logging در ASP.NET Core

In this post I'll show how to create a logging provider that writes logs to the file system. In production, I'd recommended using a more fully-featured system like Serilog instead of this library, but I wanted to see what was involved to get a better idea of the process myself.

The code for the file logging provider is available on GitHub, or as the NetEscapades.Extensions.Logging.RollingFile package on NuGet. 

طراحی تامین کننده مبتنی بر Filesystem برای سیستم Logging در ASP.NET Core
اشتراک‌ها
یادگیری SASS در 15 دقیقه

If you write copious amounts of CSS, a pre-processor can greatly decrease your stress levels and save you a lot of precious time. Using tools such as Sass, Less, Stylus or PostCSS makes large and complicated stylesheets clearer to understand and easier to maintain. Thanks to features like variables, functions and mixins the code becomes more organized, allowing developers to work quicker and make less mistakes. 

یادگیری SASS در 15 دقیقه
اشتراک‌ها
معرفی IndexedDB در مرورگر

This article introduces you to the in-browser document database known as IndexedDB. With IndexedDB you can create, read, update, and delete large sets of records in much the same way you are accustomed to doing with server-side databases. To experiment with a working version of the code presented in this article, please go to , and the full source code is available via the GitHub repository found at .

معرفی IndexedDB در مرورگر
اشتراک‌ها
دوره 11 ساعته ساخت یک برنامه‌ی مدیریت اموال با Blazor

Full C# Project: Inventory Management System | ASP.NET Core Blazor, EF Core, SQL Server, Identity - YouTube 

00:00:00 Project Demo (ASP.Net Core Blazor Server)
00:05:26 View Inventories
00:14:29 Add Entity Framework Core
00:27:16 View Inventory Use Case
00:36:35 View Inventory Component (Blazor Component)
00:58:04 View Inventory Page
01:08:18 Adding new Inventory
01:34:46 Edit Inventory
02:10:26 View Products Use Case
02:45:52 Search Inventory Component
03:05:50 Add Product
03:52:39 Refactor Product Inventories
04:16:51 Validate Product Price
04:49:14 Edit Product
05:23:34 Delete Product
05:47:48 Purchase Inventory
07:07:40 Produce Products
07:36:29 UI of Producing Products
08:16:05 Sell Product
08:46:36 Inventory Transaction Report
09:43:48 Product Transaction Report
10:10:10 Print Reports
10:19:56 Switch to SQL Server
10:51:30 Add Authentication and Authorization with ASP.NET Core Identity
10:59:57 Look and Feel with Bootstrap 5 

دوره 11 ساعته ساخت یک برنامه‌ی مدیریت اموال با Blazor