Skip to content

Instantly share code, notes, and snippets.

View pjbgf's full-sized avatar
🦎

Paulo Gomes pjbgf

🦎
View GitHub Profile
@pjbgf
pjbgf / ConcealedHijackingAppSettingsAndConnectionStrings.cs
Last active October 22, 2017 00:19
Dependencies being evil: 2 - Concealed hijacking appsettings and connectionstrings.
using System;
using System.Configuration;
using System.Text;
using System.Web;
using SecurityTrap.DoNotUse;
[assembly: PreApplicationStartMethod(typeof(EvilCode2), "RogueAction")]
namespace SecurityTrap.DoNotUse
{
@pjbgf
pjbgf / HijackingAppSettingsAndConnectionStrings.cs
Last active October 22, 2017 00:19
Dependencies being evil: 1 - Hijacking appsettings and connectionstrings.
using System;
using System.Configuration;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using System.Web;
using SecurityTrap.DoNotUse;
[assembly: PreApplicationStartMethod(typeof(EvilCode), "RogueAction")]
@pjbgf
pjbgf / EqualityTestShould.cs
Last active October 17, 2017 23:07
Assertion Equality Code Sample
using FluentAssertions;
using Xunit;
// To run this example you need to reference nuget packages: Xunit and FluentAssertions.
namespace EqualitySample
{
public class EqualityTestShould
{
[Fact]