Wednesday, December 13, 2017

Wechat: Transfer chat history/messages from Phone1 to Phone2 via Windows PC

WeChat chat history/messages transfer via phone1->Windows PC->phone2:

(1) Ensure all devices (phone1, PC, phone2) are on the same WiFi network
(2) download WeChat for windows from https://www.wechat.com/en/ 
e.g. WeChat_C1018.exe
(3) Run "WeChat_C1018.exe"
(4) PC login with QR Code: QR Code displays on PC's screen, scan QR Code with phone1 "WeChat > + > "Scan QR Code"
(5) On PC, press Menu icon on lower left (three horizontal strokes > "Backup and Restore" > "Back up on PC" > Select messages > press "OK" 
(6) Confirm on phone to start backup, press "Backup All" on phone1, and wait till backup is completed
(7) Messages are backed up to PC default directory C:\Users\<user>\Documents\WeChat Files\<wechat_id>\BackupFiles
(8) After backup completed, logout from WeChat on phone1 and PC
(9) Start wechat on PC, press "Switch Account" at the PC login screen
(10) PC login with QR Code: QR Code displays on PC's screen, scan QR Code with phone2 "WeChat > + > "Scan QR Code"
(11) phone2: uncheck "Auto sync messages to Windows after logging in", press "Enter"
(12) On PC, press Menu icon on lower left (three horizontal strokes > "Backup and Restore" > "Restore on Phone" > Select messages > press "OK"
(13) Confirm on phone2 to start restoring: press "Restore" on phone2, and wait till restoration completed
(14) Messages should show up on phone2 after restoration

Reference:

Friday, December 02, 2005

Converting pfx to pem - Converting MSFT certificate to PEM

For example:

To convert "x509.PFX.MSFT" provided by WSS4J into PEM (x509cert.pem):
$ keytool -export -alias 16c73ab6-b892-458f-abf5-2f875f74882e -keystore x509.PFX.MSFT -storetype pkcs12 -storepass security -rfc -file c:/temp/x509cert.pem

where "16c73ab6-b892-458f-abf5-2f875f74882e" is the value of "org.apache.ws.security.crypto.merlin.keystore.alias" in the crypto.properties

Friday, November 25, 2005

Junit on Ant

http://ant.apache.org/manual/OptionalTasks/junit.html
http://blog.ideoplex.com/software/java/antTutorial4.html
http://www.admc.com/blaine/howtos/junit/ch10.html
http://junit.sourceforge.net/doc/faq/faq.htm#running_5

- Junit
-- junit3.8.1 (junit.jar)
-- junit-addons-1.4.jar

copy "junit.jar" and "junit-addons-1.4.jar" to the lib directory where you have ant installed (eg. C:\Program Files\apache-ant-1.6.5-bin\lib\)

If you are running on Eclipse: Windows > Preferences > Ant > Runtime > Ant Home Entries > Add External JARs... > [locate and select "junit.jar" & "junit-addons-1.4.jar"]

Wednesday, October 19, 2005

Generate a self-signed certificate

(1) generate a certificate of 600 days validity of CN=dims

# ketytool -help# keytool -genkey -keyalg RSA -keysize 1024 -alias fookeystorealias -dname "CN=dims" -validity 600 -keypass password -keystore foo.p12 -storetype PKCS12 -storepass password

For example:
# keytool -genkey -keyalg RSA -keysize 1024 -alias "16c73ab6-b892-458f-abf5-2f875f74882e" -dname "CN=dims" -validity 600 -keypass security -keystore foo.p12 -storetype PKCS12 -storepass security


(2) print foo.p12 to PEM format

# openssl pkcs12 -help
# openssl pkcs12 -in foo.p12

(3) save PEM

# cat > foo.pem

copy and pasted output

-----BEGIN CERTIFICATE-----

-----END CERTIFICATE-----

from "openssl pkcs12 -in foo.p12" then save.


(4) print the pem to verify

# openssl x509 -in foo.pem -noout -text

Monday, September 05, 2005

ADFS

http://www.microsoft.com/WindowsServer2003/R2/Identity_Management/ADFSwhitepaper.mspx

SAML

http://xml.coverpages.org/WSS-SAMLProfileV15.pdf
Sender Vouches and Holder-of-Key:
http://java.sun.com/webservices/docs/1.6/tutorial/doc/XWS-SecuritySamples7.html
http://e-docs.bea.com/wls/docs90/webserv/sec_assert.html#1052527

Kerberos

http://www.cmf.nrl.navy.mil/CCS/people/kenh/kerberos-faq.html#whatis

Tuesday, August 30, 2005

Email Antispam - Sender-Vouches style

http://antispam.yahoo.com/domainkeys

Tuesday, August 23, 2005

Buffer Overflows Illustration

Buffer Overflows Illustration

Types of Overflows