Skip to content

Instantly share code, notes, and snippets.

#include <stdio.h>
int main(int argc, char *argv[]) {
char *process_name = "aaa\0";
memcpy((void *)argv[0], process_name, sizeof(process_name));
sleep(100);
return 0;
}
#include <jni.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <android/log.h>
#include <unistd.h>
#include <sys/inotify.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/types.h>
#include <jni.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <android/log.h>
#include <unistd.h>
#include <sys/inotify.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/types.h>
#include <jni.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <android/log.h>
#include <unistd.h>
#include <sys/inotify.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/types.h>
@lingyfh
lingyfh / Sha.java
Created November 11, 2013 11:29 — forked from avilches/Sha.java
import java.security.*;
public class Sha {
public static String hash256(String data) throws NoSuchAlgorithmException {
MessageDigest md = MessageDigest.getInstance("SHA-256");
md.update(data.getBytes());
return bytesToHex(md.digest());
}
public static String bytesToHex(byte[] bytes) {
StringBuffer result = new StringBuffer();
for (byte byt : bytes) result.append(Integer.toString((byt & 0xff) + 0x100, 16).substring(1));
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import sched, time
from threading import Thread, Timer
import subprocess
s = sched.scheduler(time.time, time.sleep)
class Job(Thread):