Bo's blog

Friday, July 15, 2011

print style

Use the print style to control the print content in the page, and page break.

<html>
	
<head>
	<style>
	/* Print Style Sheet */
	@media print {
		body { background:white; color:black; margin:0 }
		div {display:none;}
		.print {display:block;}
		.pageBreak { page-break-after: always }
	}
	
	div { font-weight: bold }
	</style>
</head>
<body>
<div ><a href="javascript:window.print()" rel="nofollow">Print This!</a> This is content that will not print if the user tries to print this page</div>
<div class="print">This will print because it have the class="print". Simple CSS is all it takes to setup something like this</div>
<div class="print pageBreak">This will also print</div>
<div class="print">This will also print, but in a new page</div>
<div >This will not print</div>
</body>

Wednesday, July 06, 2011

How to recover weblogic password.

1. for weblogic 10, AES

Put the SerializedSystemIni.dat in the current directory.

run java weblogic.WLST, and then type in the following lines

import weblogic.security.internal.SerializedSystemIni
import weblogic.security.internal.encryption.ClearOrEncryptedService

es=weblogic.security.internal.SerializedSystemIni.getEncryptionService(".")
ces=weblogic.security.internal.encryption.ClearOrEncryptedService(es)
ces.decrypt("{AES}9P7z/8D7ccvDWhBmqa0NEhR1b65BlFuBeVQ3WpwJHTI=")
'weblogic'
ces.decrypt("{AES}Tlxc7yoE4BGQS2k5XBsMX/Kx4XgEBAcPqzXH7PP5zSI=")
'weblogic22'

2. for weblogic 8,9, 3DES

http://gustlik.wordpress.com/2008/08/06/decryption-of-configuration-passwords-in-weblogic/