Skip to content

Instantly share code, notes, and snippets.

View Aaltuj's full-sized avatar

Alex Knijf Aaltuj

View GitHub Profile
@Aaltuj
Aaltuj / patch_apk_for_sniffing.md
Created October 15, 2022 17:37 — forked from unoexperto/patch_apk_for_sniffing.md
How to patch Android app to sniff its HTTPS traffic with self-signed certificate

How to patch Android app to sniff its HTTPS traffic with self-signed certificate

  • Download apktool from https://ibotpeaches.github.io/Apktool/
  • Unpack apk file: java -jar /home/expert/work/tools/apktool.jar d [email protected]
  • Modify AndroidManifest.xml by adding android:networkSecurityConfig="@xml/network_security_config" attribute to application element.
  • Create file /res/xml/network_security_config.xml with following content:
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
    <base-config>
@Aaltuj
Aaltuj / Index.razor
Last active September 20, 2020 11:23
Markdium-Simple to use dynamic form-generator powered by Blazor
<EditForm Model="poco" OnValidSubmit="HandleValidSubmit">
<RenderFormElements></RenderFormElements>
<button type="submit">Submit</button>
</EditForm>
@Aaltuj
Aaltuj / ValidationMessageBase.cs
Last active September 20, 2020 11:23
Markdium-Simple to use dynamic form-generator powered by Blazor
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Forms;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
namespace VxFormGenerator.Validation
{
///
@Aaltuj
Aaltuj / InputCheckboxMultipleWithChildren.cs
Last active September 20, 2020 11:24
Markdium-Simple to use dynamic form-generator powered by Blazor
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Forms;
using Microsoft.AspNetCore.Components.Rendering;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Reflection;
using System.Text;
namespace VxFormGenerator.Components.Plain
@Aaltuj
Aaltuj / VxFormElementLoader.cs
Last active September 20, 2020 11:24
Markdium-Simple to use dynamic form-generator powered by Blazor
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Forms;
using Microsoft.AspNetCore.Components.Rendering;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Text;
using VxFormGenerator.Components.Plain;
namespace VxFormGenerator
@Aaltuj
Aaltuj / FormGenerator.razor
Last active September 20, 2020 11:25
Markdium-Simple to use dynamic form-generator powered by Blazor
@typeparam TValue
@inherits FormGeneratorComponent<TValue>
<EditForm Model="@DataContext"
OnValidSubmit="@(context => OnValidSubmit.InvokeAsync(context))">
<DataAnnotationsValidator />
<ValidationSummary />
@foreach (var field in Properties)
{
@Aaltuj
Aaltuj / BootstrapInputText.razor
Last active September 20, 2020 11:26
Markdium-Simple to use dynamic form-generator powered by Blazor
@inherits VxFormGenerator.Components.Bootstrap.BootstrapInputTextComponent
<!-- temporary workaround for bootstrap validation classes
until https://github.com/dotnet/aspnetcore/pull/24835 is accepted and merged-->
<InputText Value="@Value" ValueChanged="@ValueChanged" ValueExpression="@ValueExpression"
class="@ValidationHelpers.FixClassNames(CssClass)"></InputText>
@Aaltuj
Aaltuj / FormElement.razor
Last active September 20, 2020 11:26
Markdium-Simple to use dynamic form-generator powered by Blazor
@typeparam TFormElement
@inherits FormElementComponent
@if (!string.IsNullOrWhiteSpace(Label))
{
@Label
}
@CreateComponent()
@Aaltuj
Aaltuj / BootstrapInputCheckbox.razor.cs
Last active September 20, 2020 11:26
Markdium-Simple to use dynamic form-generator powered by Blazor
using System.Collections.Generic;
using VxFormGenerator.Components.Plain;
namespace VxFormGenerator.Components.Bootstrap
{
public class BootstrapInputCheckbox : VxInputCheckbox
{
public BootstrapInputCheckbox()
{
ContainerCss = "custom-control custom-checkbox line-height-checkbox";
@Aaltuj
Aaltuj / ValidationHelpers.cs
Last active September 20, 2020 11:27
Markdium-Simple to use dynamic form-generator powered by Blazor
namespace VxFormGenerator.Components.Bootstrap
{
public static class ValidationHelpers
{
public static string FixClassNames(string inputClassNames)
{
//NOTE: Notice the space in front of the class name, this is to ensure we get
// the suffix to our existing form-control class set from the mark up and NOT
// half of an invalid tag. We could use a reg-ex but that might be a bit
// too slow for the UI renedering to stay smooth.