Skip to content

Instantly share code, notes, and snippets.

View cust0m's full-sized avatar

Victor Farias cust0m

  • Brasil
View GitHub Profile
//Java.perform(hookInputStream);
function inJava(){
var MAGHttpClient = Java.use("com.ca.mas.core.http.MAGHttpClient");
MAGHttpClient.execute.overload('com.ca.mas.foundation.MASRequest', 'javax.net.ssl.SSLSocketFactory').implementation = function (a,b) {
console.log("===BEGIN REQUEST===");
var headers = a.getHeaders();
console.log(headers.$className);
console.log(headers.values());
@cust0m
cust0m / insecure.js
Created June 29, 2020 14:21
javascript
var encoded_priv_key =
hexToBytes("308204a30201000282vb56ab5106685aedas12123ebd577ec1e6f3648c11b7dd03eba10756ca");
var encoded_public_key =
hexToBytes("30820122300d312312306092a86483123128dba6dd8311150203010001");
function inJava() {
var MAGHttpClient = Java.use("com.ca.mas.core.http.MAGHttpClient");
MAGHttpClient.execute.overload('com.ca.mas.foundation.MASRequest',
'javax.net.ssl.SSLSocketFactory').implementation = function (a,b) {
var SSLSocketFactory = Java.use("android.net.SSLCertificateSocketFactory");
@cust0m
cust0m / self-signed-certificate-with-custom-ca.md
Created January 12, 2018 21:46 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
def MostPupularNumber array, size
return array[0] if size == 1
most_popular = nil
hash = {}
array.each do |item|
item_key = item.to_s
if hash.has_key?(item_key)
hash[item_key] += 1
else
hash[item_key] = 1
def isAlmostPalindrome word
return true if word == word.reverse
word.size.times do |index|
('a'..'z').each do |char|
modified_word = word.dup
modified_word[index] = char
return true if modified_word == modified_word.reverse
end
end
return false
def avegare_distance x1, y1, x2, y2, x3, y3
distance_1_2 = Math.sqrt(4)
distance_1_2 = Math.sqrt(((x1-y2)**2)+((y1-y2)**2))
distance_2_3 = Math.sqrt(((x2-y3)**2)+((y2-y3)**2))
distance_1_3 = Math.sqrt(((x1-y3)**2)+((y1-y3)**2))
(distance_1_2+distance_2_3+distance_1_3)/3
end
#include <SDL.h>
#include <stdio.h>
#include <time.h>
// Screen dimension constants
const int SCREEN_WIDTH = 160;
const int SCREEN_HEIGHT = 160;
// Registers
uint16_t pc;
// takeashot.cpp : Defines the entry point for the console application.
//
#include
<stdio.h>
#include
@cust0m
cust0m / phide2.c
Created September 8, 2015 19:48
phide2.c
/*++
Module Name:
phide2.c
Abstract:
ProcessHide2 engine.