Skip to content

Instantly share code, notes, and snippets.

View FacuM's full-sized avatar

Facundo Montero FacuM

View GitHub Profile
@FacuM
FacuM / copy400.bat
Last active July 9, 2019 02:10
Not working, missing delayed expansion support.
@echo off
rem COUNT
set c=0
rem FOLDER ID
set f=0
mkdir folder%f%
echo Copiando a folder%f%...
@FacuM
FacuM / rsa_settings.vb
Last active July 2, 2019 06:33
A small snippet to encrypt any VB.Net WinForms application using the RSA algorithm. Decryption is handled automatically on runtime, due to the proper implementation.
Dim Configuration As Configuration = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.PerUserRoamingAndLocal) ' Take the configuration file in %APPDATA%\..\Local\<Application.Info.Title>\<Version>\user.config
Dim Section As ConfigurationSection = Configuration.GetSection("userSettings/" & My.Application.Info.Title & ".My.MySettings") ' Take the sections group of the file called userSettings and select the section <Application.Info.Title>.My.Settings (i.e.: WindowsApplication1.My.Settings).
If Not Section.SectionInformation.IsProtected Then ' If it's not encrypted...
Section.SectionInformation.ProtectSection("RsaProtectedConfigurationProvider") ' Encrypt it. Note the selection of the proper provider "RsaProtectedConfigurationProvider".
End If
Section.SectionInformation.ForceSave = True ' Force save, it might not work else because it might think it shouldn't be saved (i.e.: already protected, but with changes).
Configuration.Save(ConfigurationSaveMode.Full) ' Force saving the full configur
@FacuM
FacuM / kraken_harpia.xml
Last active May 19, 2019 07:30
Kraken Pie manifest.
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<!-- Device -->
<project name="Harpia-development/device_motorola_harpia" path="device/motorola/harpia" remote="github" revision="kraken_9" />
<project name="Harpia-development/device_motorola_msm8916-common" path="device/motorola/msm8916-common" remote="github" revision="9" />
<project name="Harpia-development/kernel_motorola_msm8916" path="kernel/motorola/msm8916" remote="github" revision="pie_cust" />
<project name="Harpia-development/vendor_motorola" path="vendor/motorola" remote="github" revision="pie" />
@FacuM
FacuM / cosp_harpia.xml
Last active June 1, 2019 22:48
COSP Pie manifest
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<!-- Device -->
<project name="Harpia-development/device_motorola_harpia" path="device/motorola/harpia" remote="github" revision="cosp_9" />
<project name="Harpia-development/device_motorola_msm8916-common" path="device/motorola/msm8916-common" remote="github" revision="9_testing" />
<project name="Harpia-development/kernel_motorola_msm8916" path="kernel/motorola/msm8916" remote="github" revision="pie_cust" />
<project name="Harpia-development/vendor_motorola" path="vendor/motorola" remote="github" revision="pie_testing" />
@FacuM
FacuM / somefeakos_harpia.xml
Last active February 27, 2019 01:57
SomeFeaK OS Pie preview manifest.
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<!-- Device -->
<project name="Harpia-development/device_motorola_harpia" path="device/motorola/harpia" remote="github" revision="somefeakos_9" />
<project name="Harpia-development/device_motorola_msm8916-common" path="device/motorola/msm8916-common" remote="github" revision="9" />
<project name="Harpia-development/kernel_motorola_msm8916" path="kernel/motorola/msm8916" remote="github" revision="pie_cust" />
<project name="Harpia-development/vendor_motorola" path="vendor/motorola" remote="github" revision="pie" />
</manifest>
@FacuM
FacuM / buildrom_ee.sh
Last active January 18, 2019 04:37
buildrom.sh easter egg, glad you found it h4x0r.
echo "Honeycomb? Feeling like the soul of the party already? There ya go, I'm closing your shell."
sleep 5
exit 0
@FacuM
FacuM / dot_harpia.xml
Last active January 11, 2019 07:57
DotOS manifest for the Moto G4 Play (harpia), untested.
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<!-- GitHub -->
<remote name="github"
fetch="https://github.com/" />
<!-- Device -->
<project name="Harpia-development/device_motorola_harpia" path="device/motorola/harpia" remote="github" revision="dot-p" />
<project name="Harpia-development/device_motorola_msm8916-common" path="device/motorola/msm8916-common" remote="github" revision="9" />
@FacuM
FacuM / carbon_harpia.xml
Last active January 16, 2019 03:30
CarbonROM 7.0 (Android 9.0) Pie manifest, everything working.
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<!-- GitHub -->
<remote name="github"
fetch="https://github.com/" />
<!-- Device -->
<project name="Harpia-development/device_motorola_harpia" path="device/motorola/harpia" remote="github" revision="cr-7.0" />
<project name="Harpia-development/device_motorola_msm8916-common" path="device/motorola/msm8916-common" remote="github" revision="9" />
@FacuM
FacuM / aosp-caf_harpia.xml
Last active January 3, 2019 00:57
AOSP CAF Pie preview manifest (WIP), not buildable.
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<!-- GitHub -->
<remote name="github"
fetch="https://github.com/" />
<!-- Device -->
<project name="Harpia-development/device_motorola_harpia" path="device/motorola/harpia" remote="github" revision="aosp-caf_9" />
<project name="Harpia-development/device_motorola_msm8916-common" path="device/motorola/msm8916-common" remote="github" revision="9" />
@FacuM
FacuM / posp_harpia.xml
Last active December 4, 2018 07:40
POSP harpia manifest, untested.
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<!-- Device -->
<project name="Harpia-development/device_motorola_harpia" path="device/motorola/harpia" remote="github" revision="baked_posp" />
<project name="Harpia-development/device_motorola_msm8916-common" path="device/motorola/msm8916-common" remote="github" revision="9" />
<project name="Harpia-development/kernel_harpia.git" path="kernel/motorola/msm8916" remote="github" revision="9" />
<project name="Harpia-development/vendor_harpia" path="vendor/motorola" remote="github" revision="9" />