This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package util; | |
import java.security.InvalidKeyException; | |
import java.security.NoSuchAlgorithmException; | |
import javax.crypto.Mac; | |
import javax.crypto.spec.SecretKeySpec; | |
public class SignTools { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static String antixss(String input){ | |
//如果使用JDK5以上这里替换成StringBuilder | |
StringBuffer sb = new StringBuffer(); | |
char[] arr = input.toCharArray(); | |
for(int i=0,l=arr.length;i<l;i++){ | |
switch (arr[i]) { | |
case '&': | |
sb.append("&"); | |
break; | |
case '<': |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alert(window); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<parent> | |
<groupId>com.com.es</groupId> | |
<artifactId>es-parent</artifactId> | |
<version>1.0.0-SNAPSHOT</version> | |
</parent> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alert(/hello/); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global_defs { | |
notification_email { | |
} | |
notification_email_fromroot@localhost | |
smtp_server 127.0.0.1 | |
smtp_connect_timeout 30 | |
router_id LVS_DEVEL | |
} | |
vrrp_sync_group VG1 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global_defs { | |
notification_email { | |
root@localhost #设置报警邮件地址,可以设置多个,每行一个。 | |
} | |
router_id LVS_DEVEL #表示运行keepalived服务器的一个标识。发邮件时显示在邮件主题的信息 | |
} | |
vrrp_instance VI_1 { | |
state MASTER #指定keepalived的角色,MASTER表示此主机是主服务器,BACKUP表示此主机是备用服务器 | |
interface eth0 #指定HA监测网络的接口 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from weblogic.security.internal import * | |
from weblogic.security.internal.encryption import * | |
raw_input("Please make sure you have SerializedSystemIni.dat inside the current directory, if yes press ENTER to continue.") | |
# Encryption service | |
encryptionService = SerializedSystemIni.getEncryptionService(".") | |
clearOrEncryptService = ClearOrEncryptedService(encryptionService) | |
# Take encrypt password from user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package test; | |
import java.util.concurrent.CountDownLatch; | |
import java.util.concurrent.TimeUnit; | |
import org.apache.zookeeper.KeeperException; | |
import org.apache.zookeeper.WatchedEvent; | |
import org.apache.zookeeper.Watcher; | |
import org.apache.zookeeper.Watcher.Event.EventType; | |
import org.apache.zookeeper.ZooKeeper; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
pro='tcp' | |
cntip=$1 | |
cntport=$2 | |
hostip=$3 | |
hostport=$4 | |
sudo iptables -t nat -A PREROUTING -m $pro -p $pro --dport $hostport -j DNAT --to-destination $cntip:$cntport | |
sudo iptables -t nat -A POSTROUTING -m $pro -p $pro --dport $cntport -d $cntip -j SNAT --to-source $hostip |
OlderNewer