Skip to content

Instantly share code, notes, and snippets.

@jakcron
jakcron / delete_git_submodule.md
Created October 31, 2020 01:26 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@jakcron
jakcron / RSA Test Vectors.txt
Last active October 25, 2020 10:11
RSA Test Vectors generated using MBEDTLS for RSA PKCS1, PSS, OAEP
RSA Test Vectors:
Message0: D1EFB44DD179C3691A74AE3AA46E2DC1
Message1: 12269A9630054F054E79A9BE10EC27DD4BED6A3435DE2B764BCDEDA173D14C16
OAEP Label: "This is my label"
RSA Keys:
1024:
N: A2A451678C1DFDB0A505DEC45FD34815054AEF603D8169B79743D8562D7F197021BBE7C9D07F67590E8B6720A6DB8C04CC52EAB90554F8F5CE903A820F9C50F7C09265DEEB5F2BFD8FC19A0A4BB6CD52129393AE09459BE75A8FCDA7C74D1CAF6506D121AD13B3CC595F0382EF896FA7569C223D330C1B4B0B4ECF4ADE8B18D3
D: 1E397113501BA6B0740A623A96203A6E059CC65D5930BA87AEA9A20369D30BD425C0B8B36D76AFAB0223EFD7468AD83B70091CABA38D05F3101F0770721C37837731039681CD536307AD3232C753485CCA60FC243E9CB2A388A79F2E8EA6CC13B912BAD042DAE58C72516D0AFDDB73579EBF095874DF2CF33129AB7BEA0121B1
2048:
N: DEBE4D3F6AA0C4B0F7B90FB132FF8ABAA98DE69FBDE58AABF0494E6C7327859A5C3638DA1236B2C23D92175AD1A74C72E30AEB539CC947CBE5ECB080ED45391FFA3DB93227EFF30804660782CF56E740DA584F677D96714823C6B1C31E719A2D479314A1E7A493D72909043580058C3AE8A17187140D0A6B60054435A1CBC01BE7DF0991ABF2
PBKDF2 HMAC-SHA1 Test Vectors
Input:
P = "password" (8 octets)
S = "salt" (4 octets)
c = 1
dkLen = 20
Output:
DK = 0c 60 c8 0f 96 1f 0e 71
@jakcron
jakcron / windows_hardening.cmd
Created May 10, 2020 07:53 — forked from mackwage/windows_hardening.cmd
Script to perform some hardening of Windows OS
:: Windows 10 Hardening Script
:: This is based mostly on my own personal research and testing. My objective is to secure/harden Windows 10 as much as possible while not impacting usability at all. (Think being able to run on this computer's of family members so secure them but not increase the chances of them having to call you to troubleshoot something related to it later on). References for virtually all settings can be found at the bottom. Just before the references section, you will always find several security settings commented out as they could lead to compatibility issues in common consumer setups but they're worth considering.
:: Thank you @jaredhaight for the Win Firewall config recommendations!
:: Thank you @ricardojba for the DLL Safe Order Search reg key!
:: Best script I've found for Debloating Windows 10: https://github.com/Sycnex/Windows10Debloater
::
::#######################################################################
::
:: Change file associations to protect against common ransomware
Retail NAND FIRM:
Perfect Signature:
B6724531C448657A2A2EE306457E350A10D544B42859B0E5B0BED27534CCCC2A4D47EDEA60A7DD99939950A6357B1E35DFC7FAC773B7E12E7C1481234AF141B31CF08E9F62293AA6BAAE246C15095F8B78402A684D852C680549FA5B3F14D9E838A2FB9C09A15ABB40DCA25E40A3DDC1F58E79CEC901974363A946E99B4346E8A372B6CD55A707E1EAB9BEC0200B5BA0B661236A8708D704517F43C6C38EE9560111E1405E5E8ED356C49C4FF6823D1219AFAEEB3DF3C36B62BBA88FC15BA8648F9333FD9FC092B8146C3D908F73155D48BE89D72612E18E4AA8EB9B7FD2A5F7328C4ECBFB0083833CBD5C983A25CEB8B941CC68EB017CE87F5D793ACA09ACF7
Exponentiated Message:
0002B31331C710412333A587890F9CF0B6A86E71C8A78F96B76082903B3E54EA9AB935978BBF2493BB829E9A5A6060B0C7811881176BCF9FE8B1C5C5E0A95327DB8B52EC178A884AD9CF28DB8BBF2922C05FD034AC81BD231AEB0CBEF6F7DE6F3A30812B9F9A83BF33251891BFA18FA38A64C6FF5F77DBE11C3780C23EA9F6D00F9C01D6FC8A878591D36C4F64ACA6B8D11BBEB21476103C6E86FF2196D465BA4DB78F81F1D3BCCA186BDDD56739A12DD36122F3F5B3DD518DDAC4FA29395EA4CD9DFD80AF8A399990F4FDD3CD6B07EC2122437CCFC3B62B1D1493A7DBB442003
@jakcron
jakcron / enable-xcode-debug-menu.sh
Created February 24, 2020 03:00 — forked from dsabanin/enable-xcode-debug-menu.sh
Enable internal Xcode debug menu in Xcode 11
defaults write com.apple.dt.Xcode ShowDVTDebugMenu -bool YES
sudo mkdir -p /Applications/Xcode.app/Contents/Developer/AppleInternal/Library/Xcode
sudo touch /Applications/Xcode.app/Contents/Developer/AppleInternal/Library/Xcode/AppleInternal.plist
# Don't forget to restart Xcode
@jakcron
jakcron / AutoLayout.md
Created February 5, 2020 20:07 — forked from NSExceptional/AutoLayout.md
The best damn AutoLayout guide I've ever seen

Edit Feb 4 5:16 PM: Skip to the bottom if you just want the article

It has been brought to my attention that rehosting someone else's content without asking them — even if you link to the original content — is not exactly polite. I did not ask the author before I rehosted his article, and while I feel I should have known better than to that, it just didn't occurr to me. It's not exactly plagarism, but it's still wrong on some level. I have reached out to him now about hosting it here publically, and if he says it's alright, I'll put it back.

You can find the original article here, on his site, and on his Medium page.