hw-1

raspperberry tor transport

##vim /etc/tor/torrc

1
2
3
4
5
6
7
8
Log notice file /var/log/tor/notices.log
VirtualAddrNetwork 10.192.0.0/10
AutomapHostsSuffixes .onion,.exit
AutomapHostsOnResolve 1
TransPort 9040
TransListenAddress 192.168.42.1
DNSPort 53
DNSListenAddress 192.168.42.1

##dns tcp trans

1
2
sudo iptables -t nat -A PREROUTING -i wlan0 -p udp --dport 53 -j REDIRECT --to-ports 53
sudo iptables -t nat -A PREROUTING -i wlan0 -p tcp --syn -j REDIRECT --to-ports 9040

performSelector may cause a leak because its selector is unknown

#performSelector may cause a leak because its selector is unknown
#How to get rid of the ‘undeclared selector’ warning

1
2
3
4
5
6
7
8
9
10
//performSelector may cause a leak because its selector is unknown
//#pragma clang diagnostic push
//#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
//... your code here ...
//#pragma clang diagnostic pop
//How to get rid of the 'undeclared selector' warning
//#pragma clang diagnostic push
//#pragma clang diagnostic ignored "-Wundeclared-selector"
//... your code here ...
//#pragma clang diagnostic pop

build http protal git server for xampp on osx

build http protal git server for xampp on osx

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
1,intsall xampp
2,add 'git.conf' to httpd.conf
//git.conf
<VirtualHost *:80>
SetEnv GIT_PROJECT_ROOT /home/leo/git/ #git目录
SetEnv GIT_HTTP_EXPORT_ALL
ScriptAlias / /usr/libexec/git-core/git-http-backend/ #将/上的请求转发给git
<Location "/">
DAV on #开启dav扩展
Order allow,deny
Allow from all
AuthType Basic #开启密码验证
AuthName "Git"
AuthUserFile /path/to/apache/conf/vhost/git.passwd
Require valid-user
</Location>
</VirtualHost>
3,create user and password for http access
/path/to/apache/bin/htpasswd -c git.passwd leo
4,create a simple git repo
mkdir -p /home/leo/git/leo_git_test
cd /home/leo/git/leo_git_test
git init --bare
git update-server-info
5,restart apache in xampp
6, test git
git clone http://local/path/leo_git_test

dumpdecrypted.dylib

dumpdecrypted.dylib

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
iPod:~ root# DYLD_INSERT_LIBRARIES=dumpdecrypted.dylib /var/mobile/Applications/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/Scan.app/Scan
mach-o decryption dumper
//
DISCLAIMER: This tool is only meant for security research purposes, not for application crackers.
//
[+] Found encrypted data at address 00002000 of length 1826816 bytes - type 1.
[+] Opening /private/var/mobile/Applications/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/Scan.app/Scan for reading.
[+] Reading header
[+] Detecting header type
[+] Executable is a FAT image - searching for right architecture
[+] Correct arch is at offset 2408224 in the file
[+] Opening Scan.decrypted for writing.
[-] Failed opening. Most probably a sandbox issue. Trying something different.
[+] Opening /private/var/mobile/Applications/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/tmp/Scan.decrypted for writing.
[+] Copying the not encrypted start of the file
[+] Dumping the decrypted data into the file
[+] Copying the not encrypted remainder of the file
[+] Closing original file
[+] Closing dump file

how to add xcode simulator manual

how to add xcode simulator manual

1
2
mkdir -p  ~/Library/Caches/com.apple.dt.Xcode/Downloads
cp simulator.pkg ~/Library/Caches/com.apple.dt.Xcode/Downloads

open Xcode -> compoments install simulator