Skip to content

Instantly share code, notes, and snippets.

View vnwonah's full-sized avatar
🏠
Working from home

Vincent Nwonah vnwonah

🏠
Working from home
View GitHub Profile
@vnwonah
vnwonah / frida-extract-keystore.py
Created October 18, 2021 09:46 — forked from ceres-c/frida-extract-keystore.py
Automatically extract KeyStore objects and relative password from Android applications with Frida - Read more: http://ceres-c.it/frida-android-keystore/
#!/usr/bin/python3
'''
author: ceres-c
usage: ./frida-extract-keystore.py
Once the keystore(s) have been exported you have to convert them to PKCS12 using keytool
'''
import frida, sys, time
@vnwonah
vnwonah / Program.cs
Last active November 20, 2020 14:30
AES Encryptor
using System;
using System.Globalization;
using System.IO;
using System.Security.Cryptography;
using System.Text;
namespace AESEncryption{
internal static class Program
{
@vnwonah
vnwonah / Default.dothtml
Created September 20, 2020 12:45
Default View
@viewModel DotvvmWorkerServices.ViewModels.DefaultViewModel, DotvvmWorkerServices
@masterPage Views/MasterPage.dotmaster
<dot:Content ContentPlaceHolderID="MainContent">
<div ID="main-div">
<h1 style="margin-top: 30%;" class="cover-heading">Weather Information for Lagos, Nigeria.</h1>
<dot:GridView DataSource="{value: WeatherInfos}" class="table">
<Columns>
<dot:GridViewTextColumn ValueBinding="{value: DateTime}" HeaderText="Date / Time"/>
<dot:GridViewTextColumn ValueBinding="{value: Weather}" HeaderText="Weather" />
@vnwonah
vnwonah / DefaultViewModel.cs
Created September 20, 2020 12:43
DefaultViewModel
using DotVVM.Framework.ViewModel;
using DotvvmWorkerServices.Models;
using Microsoft.Extensions.Caching.Memory;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
@vnwonah
vnwonah / WeatherInfoDto.cs
Created September 20, 2020 12:42
Weather Info Data Transfer Object
using System;
namespace DotvvmWorkerServices.Models
{
public class WeatherInfoDto
{
public DateTime DateTime { get; set; }
public string Weather { get; set; }
public string Description { get; set; }
public double Temperature { get; set; }
@vnwonah
vnwonah / GetWeatherInfoBackgroundService.cs
Created September 20, 2020 12:39
Background Service Class to get weather information
using DotvvmWorkerServices.Models;
using DotvvmWorkerServices.Services;
using Microsoft.Extensions.Caching.Memory;
using Microsoft.Extensions.Hosting;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
@vnwonah
vnwonah / AppConfig.cs
Created September 20, 2020 12:27
Config file
namespace DotvvmWorkerServices
{
public class AppConfig
{
public const string WEATHER_INFOS_KEY = "WeatherInfosIdList";
}
}
@vnwonah
vnwonah / Startup.cs
Created September 20, 2020 12:04
Registering a typed Http Client in Startup.cs
services.AddHttpClient<WeatherInfoService>(client =>
{
client.BaseAddress = new Uri("https://community-open-weather-map.p.rapidapi.com");
client.DefaultRequestHeaders.Add("X-RapidAPI-Host", "community-open-weather-map.p.rapidapi.com");
client.DefaultRequestHeaders.Add("X-RapidAPI-Key", "YOUR - KEY - HERE");
});
@vnwonah
vnwonah / WeatherInfoService.cs
Created September 20, 2020 12:02
Service Class for API calls
using DotvvmWorkerServices.Models;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using System;
using System.Net.Http;
using System.Threading.Tasks;
namespace DotvvmWorkerServices.Services
{
@vnwonah
vnwonah / WeatherInfo.cs
Created September 20, 2020 11:59
WeatherInfo Class for Deserializing the API response
using System.Collections.Generic;
namespace DotvvmWorkerServices.Models
{
public partial class WeatherInfo
{
public Coord Coord { get; set; }
public List<Weather> Weather { get; set; }
public string Base { get; set; }