Skip to content

Instantly share code, notes, and snippets.

View 0x333333's full-sized avatar
🏠
Working from home

Zhipeng Jiang 0x333333

🏠
Working from home
View GitHub Profile
@0x333333
0x333333 / aes_encryption.go
Created June 28, 2017 23:27 — forked from stupidbodo/aes_encryption.go
AES Encryption Example in Golang
// Playbook - http://play.golang.org/p/3wFl4lacjX
package main
import (
"bytes"
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"encoding/base64"
@0x333333
0x333333 / Permissions.java
Created February 25, 2017 12:43 — forked from preslavrachev/Permissions.java
Obtain a list of installed applications' permissions fromwithin an Android app: From http://stackoverflow.com/questions/7937794/how-to-get-installed-applications-permissions
PackageManager pm = getPackageManager();
List<ApplicationInfo> packages = pm.getInstalledApplications(PackageManager.GET_META_DATA);
for (ApplicationInfo applicationInfo : packages) {
Log.d("test", "App: " + applicationInfo.name + " Package: " + applicationInfo.packageName);
try {
PackageInfo packageInfo = pm.getPackageInfo(applicationInfo.packageName, PackageManager.GET_PERMISSIONS);
//Get Permissions