Skip to content

Instantly share code, notes, and snippets.

@Yegorov
Yegorov / ya.py
Created January 13, 2018 16:08
Download file from Yandex.Disk through share link
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# https://toster.ru/q/72866
# How to
# wget http://gist.github.com/...
# chmod +x ya.py
# ./ya.py download_url path/to/directory
import os, sys, json
@bmaupin
bmaupin / free-backend-hosting.md
Last active May 14, 2024 04:25
Free backend hosting
@cskonopka
cskonopka / readCSV.go
Created May 6, 2019 18:06
Basic example how to read a CSV file and add it's contents to a new data object in Go.
package main
import (
"encoding/csv"
"fmt"
"os"
)
type CsvLine struct {
Column1 string
# gruvbox-dark colorscheme for kitty
# snazzy theme used as base
foreground #ebdbb2
background #272727
selection_foreground #655b53
selection_background #ebdbb2
url_color #d65c0d
# black
@Softwave
Softwave / README.md
Last active May 14, 2024 04:19
Fibonacci Program

Fib

Simple fibonacci number calculator.

Usage: fib nth Fibonacci number

@christoofar
christoofar / main.md
Last active May 14, 2024 04:16
Wrapping a C library call in a defensive Go routine
This study focuses on the strategies used by the "xz backdoor", an extremely
complex piece of malware that contains its own x64 disassembler inside of it 
to find critical locations in your code and hijacks it by swapping out your 
code with its own as it runs.  Because this a machine-code based attack,
all code written in any program language can be attacked and is vulnerable.

Instead of targeting sshd directly, the xz 
backdoor injects itself in the parent systemd process then hijacks the 
GNU Dynamic Linker (ld), before sshd is even started or libcrypto.so is 
@ctlllll
ctlllll / longest_chinese_tokens_gpt4o.py
Created May 13, 2024 19:53
Longest Chinese tokens in gpt4o
import tiktoken
import langdetect
T = tiktoken.get_encoding("o200k_base")
length_dict = {}
for i in range(T.n_vocab):
try:
length_dict[i] = len(T.decode([i]))
except:
@davidlares
davidlares / ANDROID.md
Last active May 14, 2024 04:14
Backdooring Android Apps with FatRat and Metasploit Framework

Backdooring Android Apps with FatRat and Metasploit Framework

We have to set a point, mobile applications are a HUGE market today. Many entrepreneurs left behind web-based experiences for building disruptive mobile solutions. The battle of smart-phones remains today between IOs and Android. Both have pros and cons, they are designed and configured with default security settings that maybe not the ideal for non-experienced people.

This writing demonstrates a practical and simple example on how to generate a Reverse TCP back-door on an existing APK file.

This is a pretty common "Social Engineering Attack", and it's focused on generating a reverse TCP connection, where the attacker easily can generate shell access to your Android phone in the time you are using the infected application and do some harmful stuff or access your private information without any concern.

And when a mean “Social Engineering Attacks” is because the way it propagates, I’ll explain in a bit how are the

@mshivam019
mshivam019 / ScreenWebview.jsx
Created February 14, 2024 19:21
A feature rich webview for react native
import {useState, useEffect, useRef, useCallback} from 'react';
import {View,Text,BackHandler, Share as RNshare, Platform} from 'react-native';
import {WebView} from 'react-native-webview';
import {useRoute, useNavigation} from '@react-navigation/native';
import {useFocusEffect, useIsFocused} from '@react-navigation/native';
import Share from 'react-native-share';
import ReactNativeBlobUtil from 'react-native-blob-util';
import styled from 'styled-components/native';
import axios from 'axios';
import HeaderComponentWithBackButton from '../components/HeaderComponentWithBackButton';
@devd123
devd123 / recursive function
Created April 14, 2017 10:43
Parent Child Tree PHP Recursion
public function getresultTree(array $elements, $parentId = 0) {
$branch = array();
foreach ($elements as $element) {
if ($element['parent_id'] == $parentId) {
$children = getresultTree($elements, $element['id']);
if ($children) {