Coding/.vscode/launch.json
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,15 @@ { // ä½¿ç¨ IntelliSense äºè§£ç¸å ³å±æ§ã // æ¬å以æ¥çç°æå±æ§çæè¿°ã // 欲äºè§£æ´å¤ä¿¡æ¯ï¼è¯·è®¿é®: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "name": "Python: å½åæä»¶", "type": "python", "request": "launch", "program": "${file}", "console": "integratedTerminal" } ] } Coding/192.168.31.254/haproxy.cfg
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,142 @@ #--------------------------------------------------------------------- # Example configuration for a possible web application. See the # full configuration options online. # # http://haproxy.1wt.eu/download/1.4/doc/configuration.txt # #--------------------------------------------------------------------- #--------------------------------------------------------------------- # Global settings #--------------------------------------------------------------------- global # to have these messages end up in /var/log/haproxy.log you will # need to: # # 1) configure syslog to accept network log events. This is done # by adding the '-r' option to the SYSLOGD_OPTIONS in # /etc/sysconfig/syslog # # 2) configure local2 events to go to the /var/log/haproxy.log # file. A line like the following can be added to # /etc/sysconfig/syslog # # local2.* /var/log/haproxy.log # log 127.0.0.1 local2 chroot /var/lib/haproxy pidfile /var/run/haproxy.pid maxconn 100000 user haproxy group haproxy daemon # turn on stats unix socket stats socket /var/lib/haproxy/stats #--------------------------------------------------------------------- # common defaults that all the 'listen' and 'backend' sections will # use if not designated in their block #--------------------------------------------------------------------- defaults mode http log global option httplog option dontlognull option http-server-close option forwardfor # option forwardfor except 127.0.0.0/8 option redispatch retries 3 timeout http-request 10s timeout queue 1m timeout connect 3s timeout client 1m timeout server 1m timeout http-keep-alive 10s timeout check 10s maxconn 3000 listen admin_stats bind *:8088 mode http option httplog maxconn 10 stats enable stats refresh 30s stats uri /stats stats realm Haproxy Manager stats auth admin:philips888_ stats hide-version listen mps_8888 bind *:8888 mode http maxconn 1000 balance source server 211 10.1.1.211:8888 weight 1 maxconn 3000 check inter 5000 # server 02 10.1.1.212:8888 weight 1 maxconn 3000 check inter 5000 # server 03 10.1.1.213:8888 weight 1 maxconn 3000 check inter 5000 # server 04 10.1.1.214:8888 weight 1 maxconn 3000 check inter 5000 listen comm_3099 bind *:3099 mode tcp option tcplog maxconn 50000 balance leastconn server 211 10.1.1.211:3099 weight 2 maxconn 15000 check inter 10000 # server 02 10.1.1.212:3099 weight 2 maxconn 15000 check inter 10000 # server 03 10.1.1.213:3099 weight 2 maxconn 15000 check inter 10000 # server 04 10.1.1.214:3099 weight 2 maxconn 15000 check inter 10000 listen ftp21 bind *:21 mode tcp option tcplog maxconn 40960 balance leastconn server 211 10.1.1.211 weight 3 maxconn 3000 check port 21 inter 3000s # server 212 10.1.1.212 weight 3 maxconn 3000 check port 21 inter 3000s # server 213 10.1.1.213 weight 3 maxconn 3000 check port 21 inter 3000s # server 214 10.1.1.214 weight 3 maxconn 3000 check port 21 inter 3000s listen ftp50000-52000 :50000-52000 mode tcp option tcplog maxconn 3000 server 211 10.1.1.211 # server 212 10.1.1.212 # server 213 10.1.1.213 # server 214 10.1.1.214 #--------------------------------------------------------------------- # main frontend which proxys to the backends #--------------------------------------------------------------------- #frontend main *:5000 # acl url_static path_beg -i /static /images /javascript /stylesheets # acl url_static path_end -i .jpg .gif .png .css .js # use_backend static if url_static # default_backend app #--------------------------------------------------------------------- # static backend for serving up images, stylesheets and such #--------------------------------------------------------------------- #backend static # balance roundrobin # server static 127.0.0.1:4331 check #--------------------------------------------------------------------- # round robin balancing between the various backends #--------------------------------------------------------------------- #backend app # balance roundrobin # server app1 127.0.0.1:5001 check # server app2 127.0.0.1:5002 check # server app3 127.0.0.1:5003 check # server app4 127.0.0.1:5004 check Coding/192.168.31.254/iptables
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,18 @@ # Firewall configuration written by system-config-firewall # Manual customization of this file is not recommended. *filter :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] -A INPUT -p tcp -m tcp --dport 50000:52000 -j ACCEPT -A INPUT -p tcp -m tcp --dport 20:21 -j ACCEPT -A INPUT -p tcp -m tcp --dport 3099 -j ACCEPT -A INPUT -p tcp -m tcp --dport 8088 -j ACCEPT -A INPUT -p tcp -m tcp --dport 8888 -j ACCEPT -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT -A INPUT -p icmp -j ACCEPT -A INPUT -i lo -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 2000 -j ACCEPT -A INPUT -j REJECT --reject-with icmp-host-prohibited -A FORWARD -j REJECT --reject-with icmp-host-prohibited COMMIT Coding/192.168.31.254/sshd_config
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,138 @@ # $OpenBSD: sshd_config,v 1.80 2008/07/02 02:24:18 djm Exp $ # This is the sshd server system-wide configuration file. See # sshd_config(5) for more information. # This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin # The strategy used for options in the default sshd_config shipped with # OpenSSH is to specify options with their default value where # possible, but leave them commented. Uncommented options change a # default value. Port 2000 #AddressFamily any #ListenAddress 0.0.0.0 #ListenAddress :: # Disable legacy (protocol version 1) support in the server for new # installations. In future the default will change to require explicit # activation of protocol 1 Protocol 2 # HostKey for protocol version 1 #HostKey /etc/ssh/ssh_host_key # HostKeys for protocol version 2 #HostKey /etc/ssh/ssh_host_rsa_key #HostKey /etc/ssh/ssh_host_dsa_key # Lifetime and size of ephemeral version 1 server key #KeyRegenerationInterval 1h #ServerKeyBits 1024 # Logging # obsoletes QuietMode and FascistLogging #SyslogFacility AUTH SyslogFacility AUTHPRIV #LogLevel INFO # Authentication: #LoginGraceTime 2m #PermitRootLogin yes #StrictModes yes #MaxAuthTries 6 #MaxSessions 10 #RSAAuthentication yes #PubkeyAuthentication yes #AuthorizedKeysFile .ssh/authorized_keys #AuthorizedKeysCommand none #AuthorizedKeysCommandRunAs nobody # For this to work you will also need host keys in /etc/ssh/ssh_known_hosts #RhostsRSAAuthentication no # similar for protocol version 2 #HostbasedAuthentication no # Change to yes if you don't trust ~/.ssh/known_hosts for # RhostsRSAAuthentication and HostbasedAuthentication #IgnoreUserKnownHosts no # Don't read the user's ~/.rhosts and ~/.shosts files #IgnoreRhosts yes # To disable tunneled clear text passwords, change to no here! #PasswordAuthentication yes #PermitEmptyPasswords no PasswordAuthentication yes # Change to no to disable s/key passwords #ChallengeResponseAuthentication yes ChallengeResponseAuthentication no # Kerberos options #KerberosAuthentication no #KerberosOrLocalPasswd yes #KerberosTicketCleanup yes #KerberosGetAFSToken no #KerberosUseKuserok yes # GSSAPI options #GSSAPIAuthentication no GSSAPIAuthentication yes #GSSAPICleanupCredentials yes GSSAPICleanupCredentials yes #GSSAPIStrictAcceptorCheck yes #GSSAPIKeyExchange no # Set this to 'yes' to enable PAM authentication, account processing, # and session processing. If this is enabled, PAM authentication will # be allowed through the ChallengeResponseAuthentication and # PasswordAuthentication. Depending on your PAM configuration, # PAM authentication via ChallengeResponseAuthentication may bypass # the setting of "PermitRootLogin without-password". # If you just want the PAM account and session checks to run without # PAM authentication, then enable this but set PasswordAuthentication # and ChallengeResponseAuthentication to 'no'. #UsePAM no UsePAM yes # Accept locale-related environment variables AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE AcceptEnv XMODIFIERS #AllowAgentForwarding yes #AllowTcpForwarding yes #GatewayPorts no #X11Forwarding no X11Forwarding yes #X11DisplayOffset 10 #X11UseLocalhost yes #PrintMotd yes #PrintLastLog yes #TCPKeepAlive yes #UseLogin no #UsePrivilegeSeparation yes #PermitUserEnvironment no #Compression delayed #ClientAliveInterval 0 #ClientAliveCountMax 3 #ShowPatchLevel no #UseDNS yes #PidFile /var/run/sshd.pid #MaxStartups 10:30:100 #PermitTunnel no #ChrootDirectory none # no default banner path #Banner none # override default of no subsystems Subsystem sftp /usr/libexec/openssh/sftp-server # Example of overriding settings on a per-user basis #Match User anoncvs # X11Forwarding no # AllowTcpForwarding no # ForceCommand cvs server Coding/61.129.251.135/haproxy.cfg
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,161 @@ #--------------------------------------------------------------------- # Example configuration for a possible web application. See the # full configuration options online. # # http://haproxy.1wt.eu/download/1.4/doc/configuration.txt # #--------------------------------------------------------------------- #--------------------------------------------------------------------- # Global settings #--------------------------------------------------------------------- global # to have these messages end up in /var/log/haproxy.log you will # need to: # # 1) configure syslog to accept network log events. This is done # by adding the '-r' option to the SYSLOGD_OPTIONS in # /etc/sysconfig/syslog # # 2) configure local2 events to go to the /var/log/haproxy.log # file. A line like the following can be added to # /etc/sysconfig/syslog # # local2.* /var/log/haproxy.log # log 127.0.0.1 local2 chroot /var/lib/haproxy pidfile /var/run/haproxy.pid maxconn 100000 user haproxy group haproxy daemon # turn on stats unix socket stats socket /var/lib/haproxy/stats #--------------------------------------------------------------------- # common defaults that all the 'listen' and 'backend' sections will # use if not designated in their block #--------------------------------------------------------------------- defaults mode http log global option httplog option dontlognull option http-server-close # option forwardfor except 127.0.0.0/8 option redispatch retries 3 timeout http-request 10s timeout queue 1m timeout connect 3s timeout client 1m timeout server 1m timeout http-keep-alive 10s timeout check 10s maxconn 3000 listen admin_stats bind *:8088 mode http option httplog maxconn 10 stats enable stats refresh 30s stats uri /stats stats realm Haproxy Manager stats auth admin:philips888_ stats hide-version listen mps_8888 bind *:8888 mode http maxconn 1000 balance source # server 132 61.129.251.132:8888 redir http://61.129.251.132:8888 weight 1 maxconn 3000 check inter 5000 # server 133 61.129.251.133:8888 redir http://61.129.251.133:8888 weight 1 maxconn 3000 check inter 5000 server 144 61.129.251.144:8888 weight 1 maxconn 3000 check inter 5000 # server 132 61.129.251.132:8888 weight 1 maxconn 3000 check inter 5000 # server 188 61.129.251.188:8888 weight 1 maxconn 3000 check inter 5000 #listen mps_8080 # bind 61.129.251.135:8080 # mode http # maxconn 1000 # balance source # server 132 61.129.251.132:8888 weight 1 maxconn 3000 check inter 5000 # server 133 61.129.251.133:8888 weight 1 maxconn 3000 check inter 5000 # server 144 61.129.251.144:8888 weight 1 maxconn 3000 check inter 5000 # server 145 61.129.251.145:8888 weight 1 maxconn 3000 check inter 5000 # server 253 61.129.251.188:8888 weight 1 maxconn 3000 check inter 5000 listen comm_3099 bind *:3099 mode tcp option tcplog maxconn 50000 balance leastconn # server 132 61.129.251.132:3099 weight 2 maxconn 15000 check inter 10000 # server 133 61.129.251.133:3099 weight 2 maxconn 15000 check inter 10000 server 144 61.129.251.144:3099 weight 2 maxconn 15000 check inter 10000 server 132 61.129.251.132:3099 weight 2 maxconn 15000 check inter 10000 # server 188 61.129.251.188:3099 weight 2 maxconn 15000 check inter 10000 listen ftp21 bind *:21 mode tcp option tcplog maxconn 40960 balance leastconn # server 132 61.129.251.132 weight 3 maxconn 3000 check port 21 inter 3000s # server 133 61.129.251.133 weight 3 maxconn 3000 check port 21 inter 3000s server 144 61.129.251.144 weight 3 maxconn 3000 check port 21 inter 3000s server 132 61.129.251.132 weight 3 maxconn 3000 check port 21 inter 3000s # server 188 61.129.251.188 weight 3 maxconn 3000 check port 21 inter 3000s # server 148 192.168.100.148 weight 3 maxconn 3000 check port 21 inter 3000s # server 188 192.168.100.188 weight 3 maxconn 3000 check port 21 inter 3000s listen ftp52 bind *:50000-52000 mode tcp option tcplog maxconn 3000 # server 132 61.129.251.132 # server 133 61.129.251.133 server 144 61.129.251.144 server 132 61.129.251.132 # server 188 61.129.251.188 # server 148 192.168.100.148 # server 188 192.168.100.188 #--------------------------------------------------------------------- # main frontend which proxys to the backends #--------------------------------------------------------------------- #frontend main *:5000 # acl url_static path_beg -i /static /images /javascript /stylesheets # acl url_static path_end -i .jpg .gif .png .css .js # use_backend static if url_static # default_backend app #--------------------------------------------------------------------- # static backend for serving up images, stylesheets and such #--------------------------------------------------------------------- #backend static # balance roundrobin # server static 127.0.0.1:4331 check #--------------------------------------------------------------------- # round robin balancing between the various backends #--------------------------------------------------------------------- #backend app # balance roundrobin # server app1 127.0.0.1:5001 check # server app2 127.0.0.1:5002 check # server app3 127.0.0.1:5003 check # server app4 127.0.0.1:5004 check Coding/Python/1.py
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,2 @@ name = input ('Please enter your name:') print (name) Coding/Python/c9-python-getting-started
¶Ô±ÈÐÂÎļþ @@ -0,0 +1 @@ Subproject commit f7d585aa0b2873e706ed4b5a5a7a497016665f02 Coding/Python/µÚÈýÅú
Coding/verysync-installer/etc/.DS_StoreBinary files differ
Coding/verysync-installer/etc/linux-init.d/verysync
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,112 @@ #!/bin/sh ### BEGIN INIT INFO # Provides: verysync # Required-Start: $network $local_fs $remote_fs # Required-Stop: $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: verysync services # Description: verysync services ### END INIT INFO DESC=verysync NAME=verysync DAEMON=/usr/bin/verysync/verysync PIDFILE=/var/run/$NAME.pid SCRIPTNAME=/etc/init.d/$NAME PATH="/usr/bin/verysync:$PATH" VSHOME="$HOME/.config/verysync" USER="root" DAEMON_OPTS="-gui-address :8886" # Exit if the package is not installed [ -x $DAEMON ] || exit 0 start_daemon () { if [[ -n "${VSHOME}" && -d "$VSHOME" ]]; then chown -R ${USER}:${USER} "${VSHOME}" fi #su - ${USER} -s "/bin/sh" -c "umask 000; PATH=${PATH} ${VERYSYNC} $VERYSYNC_OPTIONS" start-stop-daemon -b -o -c ${USER} -S -u ${USER} -k 002 -x env HOME="${VSHOME}" ${DAEMON} -- ${DAEMON_OPTS} } stop_daemon () { #kill `cat ${PID_FILE}` #wait_for_status 1 60 || kill -9 `cat ${PID_FILE}` #rm -f ${PID_FILE} start-stop-daemon -o -c ${USER} -K -u ${USER} -x ${DAEMON} wait_for_status 1 20 || start-stop-daemon -K -s 9 -q -x ${DAEMON} } daemon_status () { # if [ -f ${PID_FILE} ] && kill -0 `cat ${PID_FILE}` > /dev/null 2>&1; then # return # fi # rm -f ${PID_FILE} # return 1 start-stop-daemon -K -q -t -u ${USER} -x ${DAEMON} [ $? -eq 0 ] || return 1 } # wait_for_status () # { # counter=$2 # while [ ${counter} -gt 0 ]; do # daemon_status # [ $? -eq $1 ] && return # let counter=counter-1 # sleep 1 # done # return 1 # } wait_for_status () { counter=$2 while [ ${counter} -gt 0 ]; do daemon_status [ $? -eq $1 ] && return let counter=counter-1 sleep 1 done return 1 } case $1 in start) if daemon_status; then echo ${NAME} is already running else echo Starting ${NAME} ... start_daemon fi ;; stop) if daemon_status; then echo Stopping ${NAME} ... stop_daemon else echo ${NAME} is not running fi ;; status) if daemon_status; then echo ${NAME} is running exit 0 else echo ${NAME} is not running exit 1 fi ;; log) exit 1 ;; *) exit 1 ;; esac Coding/verysync-installer/etc/linux-systemd/.DS_StoreBinary files differ
Coding/verysync-installer/etc/linux-systemd/system/verysync.service
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,18 @@ [Unit] Description=Verysync - Verysync File Synchronization for %I After=network.target [Service] # User=verysync # Group=verysync User=root Group=root Type=simple ExecStart=/usr/bin/verysync/verysync -gui-address :8886 -no-browser __VSHOME_HOLDER__ Restart=on-failure SuccessExitStatus=3 4 RestartForceExitStatus=3 4 LimitNOFILE=200000 [Install] WantedBy=multi-user.target Coding/verysync-installer/etc/linux-systemv/verysync
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,152 @@ #!/bin/sh ### BEGIN INIT INFO # Provides: verysync # Required-Start: $network $local_fs $remote_fs # Required-Stop: $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Verysync services # Description: Verysync services ### END INIT INFO DESC=verysync NAME=verysync DAEMON=/usr/bin/verysync/verysync PIDFILE=/var/run/$NAME.pid SCRIPTNAME=/etc/init.d/$NAME VSHOME="" DAEMON_OPTS="-gui-address :8886 -no-browser -logflags=0" [ -n "$VSHOME" ] && DAEMON_OPTS="$DAEMON_OPTS -home $VSHOME" # Exit if the package is not installed [ -x $DAEMON ] || exit 0 # Read configuration variable file if it is present [ -r /etc/default/$NAME ] && . /etc/default/$NAME # Load the VERBOSE setting and other rcS variables . /lib/init/vars.sh # Define LSB log_* functions. # Depend on lsb-base (>= 3.0-6) to ensure that this file is present. . /lib/lsb/init-functions # # Function that starts the daemon/service # do_start() { mkdir -p /var/log/verysync # Return # 0 if daemon has been started # 1 if daemon was already running # 2 if daemon could not be started # 3 if configuration file not ready for daemon start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ || return 1 start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --background -m -- $DAEMON_OPTS \ || return 2 # Add code here, if necessary, that waits for the process to be ready # to handle requests from services started subsequently which depend # on this one. As a last resort, sleep for some time. } # # Function that stops the daemon/service # do_stop() { # Return # 0 if daemon has been stopped # 1 if daemon was already stopped # 2 if daemon could not be stopped # other if a failure occurred start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE RETVAL="$?" [ "$RETVAL" = 2 ] && return 2 # Wait for children to finish too if this is a daemon that forks # and if the daemon is only ever run from this initscript. # If the above conditions are not satisfied then add some other code # that waits for the process to drop all resources that could be # needed by services started subsequently. A last resort is to # sleep for some time. start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON [ "$?" = 2 ] && return 2 # Many daemons don't delete their pidfiles when they exit. rm -f $PIDFILE return "$RETVAL" } # # Function that sends a SIGHUP to the daemon/service # do_reload() { # # If the daemon can reload its configuration without # restarting (for example, when it is sent a SIGHUP), # then implement that here. # start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE return 0 } case "$1" in start) [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC " "$NAME" do_start case "$?" in 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; esac ;; stop) [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" do_stop case "$?" in 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; esac ;; status) status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? ;; reload|force-reload) # # If do_reload() is not implemented then leave this commented out # and leave 'force-reload' as an alias for 'restart'. # log_daemon_msg "Reloading $DESC" "$NAME" do_reload log_end_msg $? ;; restart|force-reload) # # If the "reload" option is implemented then remove the # 'force-reload' alias # log_daemon_msg "Restarting $DESC" "$NAME" do_stop case "$?" in 0|1) do_start case "$?" in 0) log_end_msg 0 ;; 1) log_end_msg 1 ;; # Old process is still running *) log_end_msg 1 ;; # Failed to start esac ;; *) # Failed to stop log_end_msg 1 ;; esac ;; *) #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 echo "Usage: $SCRIPTNAME {start|stop|status|reload|restart|force-reload}" >&2 exit 3 ;; esac Coding/verysync-installer/go-inst.sh
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,484 @@ #!/bin/bash # This file is accessible as https://install.direct/go.sh # If not specify, default meaning of return value: # 0: Success # 1: System error # 2: Application error # 3: Network error CUR_VER="" NEW_VER="" ARCH="" VDIS="amd64" ZIPFILE="/tmp/verysync/verysync.zip" VERYSYNC_RUNNING=0 CMD_INSTALL="" CMD_UPDATE="" SOFTWARE_UPDATED=0 SYSTEMCTL_CMD=$(command -v systemctl 2>/dev/null) SERVICE_CMD=$(command -v service 2>/dev/null) CHECK="" FORCE="" HELP="" VSHOME="" #######color code######## RED="31m" # Error message GREEN="32m" # Success message YELLOW="33m" # Warning message BLUE="36m" # Info message ######################### while [[ $# > 0 ]];do key="$1" case $key in -p|--proxy) PROXY="-x ${2}" shift # past argument ;; -h|--help) HELP="1" ;; -f|--force) FORCE="1" ;; -c|--check) CHECK="1" ;; --remove) REMOVE="1" ;; --version) VERSION="$2" shift ;; -l|--local) LOCAL="$2" LOCAL_INSTALL="1" shift ;; -d|--home) VSHOME="$2" shift ;; *) # unknown option ;; esac shift # past argument or value done ############################### colorEcho(){ COLOR=$1 echo -e "\033[${COLOR}${@:2}\033[0m" } sysArch(){ ARCH=$(uname -m) if [[ "$ARCH" == "i686" ]] || [[ "$ARCH" == "i386" ]]; then VDIS="386" elif [[ "$ARCH" == "x86_64" ]]; then VDIS="amd64" elif [[ "$ARCH" == *"armv7"* ]] || [[ "$ARCH" == "armv6l" ]]; then VDIS="arm" elif [[ "$ARCH" == *"armv8"* ]] || [[ "$ARCH" == "aarch64" ]]; then VDIS="arm64" elif [[ "$ARCH" == *"mips64le"* ]]; then VDIS="mips64le" elif [[ "$ARCH" == *"mips64"* ]]; then VDIS="mips64" elif [[ "$ARCH" == *"mipsle"* ]]; then VDIS="mipsle" elif [[ "$ARCH" == *"mips"* ]]; then VDIS="mips" elif [[ "$ARCH" == *"s390x"* ]]; then VDIS="s390x" fi return 0 } downloadVerysync(){ rm -rf /tmp/verysync mkdir -p /tmp/verysync colorEcho ${BLUE} "Downloading verysync." #DOWNLOAD_LINK="https://github.com/verysync/releases/releases/download/${NEW_VER}/verysync-linux-${VDIS}-${NEW_VER}.tar.gz" DOWNLOAD_LINK="http://releases-cdn.verysync.com/releases/${NEW_VER}/verysync-linux-${VDIS}-${NEW_VER}.tar.gz" curl ${PROXY} -L -H "Cache-Control: no-cache" -o ${ZIPFILE} ${DOWNLOAD_LINK} if [ $? != 0 ];then colorEcho ${RED} "Failed to download! Please check your network or try again." return 3 fi return 0 } installSoftware(){ COMPONENT=$1 if [[ -n `command -v $COMPONENT` ]]; then return 0 fi getPMT if [[ $? -eq 1 ]]; then colorEcho ${RED} "The system package manager tool isn't APT or YUM, please install ${COMPONENT} manually." return 1 fi if [[ $SOFTWARE_UPDATED -eq 0 ]]; then colorEcho ${BLUE} "Updating software repo" $CMD_UPDATE SOFTWARE_UPDATED=1 fi colorEcho ${BLUE} "Installing ${COMPONENT}" $CMD_INSTALL $COMPONENT if [[ $? -ne 0 ]]; then colorEcho ${RED} "Failed to install ${COMPONENT}. Please install it manually." return 1 fi return 0 } # return 1: not apt, yum, or zypper getPMT(){ if [[ -n `command -v apt-get` ]];then CMD_INSTALL="apt-get -y -qq install" CMD_UPDATE="apt-get -qq update" elif [[ -n `command -v yum` ]]; then CMD_INSTALL="yum -y -q install" CMD_UPDATE="yum -q makecache" elif [[ -n `command -v zypper` ]]; then CMD_INSTALL="zypper -y install" CMD_UPDATE="zypper ref" else return 1 fi return 0 } extract(){ colorEcho ${BLUE}"Extracting verysync package to /tmp/verysync." mkdir -p /tmp/verysync tar xzf $1 -C "/tmp/verysync/" if [[ $? -ne 0 ]]; then colorEcho ${RED} "Failed to extract verysync." return 2 fi return 0 } # 1: new verysync. 0: no. 2: not installed. 3: check failed. 4: don't check. getVersion(){ if [[ -n "$VERSION" ]]; then NEW_VER="$VERSION" return 4 else VER=`/usr/bin/verysync/verysync -version 2>/dev/null` RETVAL="$?" CUR_VER=`echo $VER | head -n 1 | cut -d " " -f2` #TAG_URL="https://api.github.com/repos/verysync/releases/releases/latest" TAG_URL="https://upgrades.verysync.cn/meta.json" NEW_VER=`curl ${PROXY} -k ${TAG_URL} --connect-timeout 10| grep 'tag_name' | cut -d\" -f4 | head -n 1` if [[ $? -ne 0 ]] || [[ $NEW_VER == "" ]]; then colorEcho ${RED} "Failed to fetch release information. Please check your network or try again." return 3 elif [[ $RETVAL -ne 0 ]];then return 2 elif [[ "$NEW_VER" != "$CUR_VER" ]];then return 1 fi return 0 fi } stopVerysync(){ colorEcho ${BLUE} "Shutting down verysync service." if [[ -n "${SYSTEMCTL_CMD}" ]] || [[ -f "/lib/systemd/system/verysync.service" ]] || [[ -f "/etc/systemd/system/verysync.service" ]]; then ${SYSTEMCTL_CMD} stop verysync elif [[ -n "${SERVICE_CMD}" ]] || [[ -f "/etc/init.d/verysync" ]]; then ${SERVICE_CMD} verysync stop fi if [[ $? -ne 0 ]]; then colorEcho ${YELLOW} "Failed to shutdown verysync service." return 2 fi return 0 } startVerysync(){ if [ -n "${SYSTEMCTL_CMD}" ] && [ -f "/lib/systemd/system/verysync.service" ]; then ${SYSTEMCTL_CMD} start verysync elif [ -n "${SYSTEMCTL_CMD}" ] && [ -f "/etc/systemd/system/verysync.service" ]; then ${SYSTEMCTL_CMD} start verysync elif [ -n "${SERVICE_CMD}" ] && [ -f "/etc/init.d/verysync" ]; then ${SERVICE_CMD} verysync start fi if [[ $? -ne 0 ]]; then colorEcho ${YELLOW} "Failed to start verysync service." return 2 fi return 0 } copyFile() { NAME=$1 ERROR=`cp "/tmp/verysync/verysync-linux-${VDIS}-${NEW_VER}/${NAME}" "/usr/bin/verysync/${NAME}" 2>&1` if [[ $? -ne 0 ]]; then colorEcho ${YELLOW} "${ERROR}" return 1 fi return 0 } makeExecutable() { chmod +x "/usr/bin/verysync/$1" } installVerysync(){ # Install verysync binary to /usr/bin/verysync if [[ -f /usr/bin/verysnc ]]; then rm -rf /usr/bin/verysync fi mkdir -p /usr/bin/verysync copyFile verysync if [[ $? -ne 0 ]]; then colorEcho ${RED} "Failed to copy verysync binary and resources." return 1 fi makeExecutable verysync # Install verysync server config to /etc/verysync # if [[ ! -f "/etc/verysync/config.json" ]]; then # mkdir -p /etc/verysync # mkdir -p /var/log/verysync # cp "/tmp/verysync/verysync-${NEW_VER}-linux-${VDIS}/vpoint_vmess_freedom.json" "/etc/verysync/config.json" # if [[ $? -ne 0 ]]; then # colorEcho ${YELLOW} "Failed to create verysync configuration file. Please create it manually." # return 1 # fi # let PORT=$RANDOM+10000 # UUID=$(cat /proc/sys/kernel/random/uuid) # # sed -i "s/10086/${PORT}/g" "/etc/verysync/config.json" # sed -i "s/23ad6b10-8d1a-40f7-8ad0-e3e35cd38297/${UUID}/g" "/etc/verysync/config.json" # # colorEcho ${BLUE} "PORT:${PORT}" # colorEcho ${BLUE} "UUID:${UUID}" # fi # return 0 } installInitScript(){ if [[ -n "${SYSTEMCTL_CMD}" ]];then if [[ ! -f "/etc/systemd/system/verysync.service" ]]; then if [[ ! -f "/lib/systemd/system/verysync.service" ]]; then #cp "/tmp/verysync/verysync-linux-${VDIS}-${NEW_VER}/etc/linux-systemd/system/verysync.service" "/etc/systemd/system/" cp "etc/linux-systemd/system/verysync.service" "/etc/systemd/system/" if [[ -n "$VSHOME" ]]; then sed -i "s#__VSHOME_HOLDER__#-home \"$VSHOME\"#" /etc/systemd/system/verysync.service else sed -i "s/__VSHOME_HOLDER__//" /etc/systemd/system/verysync.service fi systemctl enable verysync.service systemctl start verysync.service fi fi return elif [[ -n "${SERVICE_CMD}" ]] && [[ ! -f "/etc/init.d/verysync" ]]; then # installSoftware "daemon" # installSoftware "daemon" || return $? # cp "/tmp/verysync/verysync-linux-${VDIS}-${NEW_VER}/etc/linux-systemv/verysync" "/etc/init.d/verysync" # if [[ $? -ne 0 ]]; then # fi if [[ -n `command -v chkconfig` ]]; then #Centos if [[ ! -f "start-stop-daemon/$VDIS" ]]; then installSoftware "daemon" || return $? else cp "start-stop-daemon/$VDIS" /usr/bin/verysync/start-stop-daemon chmod +x /usr/bin/verysync/start-stop-daemon fi cp "etc/linux-init.d/verysync" "/etc/init.d/verysync" chmod +x "/etc/init.d/verysync" if [[ -n "$VSHOME" ]]; then sed -i "s#^VSHOME=#VSHOME=\"$VSHOME\"#" /etc/systemd/system/verysync.service fi chkconfig --add verysync service verysync start elif [[ -n `command -v update-rc.d` ]]; then #Debian/Centos installSoftware "daemon" || return $? cp "etc/linux-systemv/verysync" "/etc/init.d/verysync" chmod +x "/etc/init.d/verysync" if [[ -n "$VSHOME" ]]; then sed -i "s#^VSHOME=#VSHOME=\"$VSHOME\"#" /etc/systemd/system/verysync.service fi update-rc.d verysync defaults fi fi return } Help(){ echo "./go-installer.sh [-h] [-c] [--remove] [-p proxy] [-f] [--version vx.y.z] [-l file] [-d index location]" echo " -h, --help Show help" echo " -p, --proxy To download through a proxy server, use -p socks5://127.0.0.1:1080 or -p http://127.0.0.1:3128 etc" echo " -f, --force Force install" echo " --version Install a particular version, use --version v3.15" echo " -l, --local Install from a local file" echo " --remove Remove installed verysync" echo " -c, --check Check for update" echo " -d --home Verysync index data location, default ~/.config/verysync" return 0 } remove(){ if [[ -n "${SYSTEMCTL_CMD}" ]] && [[ -f "/etc/systemd/system/verysync.service" ]];then if pgrep "verysync" > /dev/null ; then stopVerysync fi systemctl disable verysync.service rm -rf "/usr/bin/verysync" "/etc/systemd/system/verysync.service" if [[ $? -ne 0 ]]; then colorEcho ${RED} "Failed to remove verysync." return 0 else colorEcho ${GREEN} "Removed verysync successfully." colorEcho ${BLUE} "If necessary, please remove configuration file and log file manually." return 0 fi elif [[ -n "${SYSTEMCTL_CMD}" ]] && [[ -f "/lib/systemd/system/verysync.service" ]];then if pgrep "verysync" > /dev/null ; then stopVerysync fi systemctl disable verysync.service rm -rf "/usr/bin/verysync/verysync" "/lib/systemd/system/verysync.service" if [[ $? -ne 0 ]]; then colorEcho ${RED} "Failed to remove verysync." return 0 else colorEcho ${GREEN} "Removed verysync successfully." colorEcho ${BLUE} "If necessary, please remove configuration file and log file manually." return 0 fi elif [[ -n "${SERVICE_CMD}" ]] && [[ -f "/etc/init.d/verysync" ]]; then if pgrep "verysync" > /dev/null ; then stopVerysync fi rm -rf "/usr/bin/verysync" "/etc/init.d/verysync" if [[ $? -ne 0 ]]; then colorEcho ${RED} "Failed to remove verysync." return 0 else colorEcho ${GREEN} "Removed verysync successfully." colorEcho ${BLUE} "If necessary, please remove configuration file and log file manually." return 0 fi else colorEcho ${YELLOW} "verysync not found." return 0 fi } checkUpdate(){ echo "Checking for update." VERSION="" getVersion RETVAL="$?" if [[ $RETVAL -eq 1 ]]; then colorEcho ${BLUE} "Found new version ${NEW_VER} for verysync.(Current version:$CUR_VER)" elif [[ $RETVAL -eq 0 ]]; then colorEcho ${BLUE} "No new version. Current version is ${NEW_VER}." elif [[ $RETVAL -eq 2 ]]; then colorEcho ${YELLOW} "No verysync installed." colorEcho ${BLUE} "The newest version for verysync is ${NEW_VER}." fi return 0 } main(){ #helping information [[ "$HELP" == "1" ]] && Help && return [[ "$CHECK" == "1" ]] && checkUpdate && return [[ "$REMOVE" == "1" ]] && remove && return [[ -n "$VSHOME" && -f "$VSHOME" ]] && colorEcho {$RED} "$VSHOME is not directory path" && return if [[ -n "$VSHOME" && ! -d "$VSHOME" ]]; then mkdir -p "$VSHOME" if [[ $? -ne 0 ]]; then colorEcho {$RED} "create $VSHOME fails" return 1 fi fi sysArch # extract local file if [[ $LOCAL_INSTALL -eq 1 ]]; then echo "Installing verysync via local file" installSoftware unzip || return $? rm -rf /tmp/verysync extract $LOCAL || return $? FILEVDIS=`ls /tmp/verysync |grep "verysync-linux-${VDIS}-v" |cut -d "-" -f3` SYSTEM=`ls /tmp/verysync |grep "verysync-linux-${VDIS}-v" |cut -d "-" -f2` if [[ ${SYSTEM} != "linux" ]]; then colorEcho ${RED} "The local verysync can not be installed in linux." return 1 elif [[ ${FILEVDIS} != ${VDIS} ]]; then colorEcho ${RED} "The local verysync can not be installed in ${ARCH} system." return 1 else NEW_VER=`ls /tmp/verysync |grep "verysync-linux-${VDIS}-v" |cut -d "-" -f4,5` fi else # download via network and extract installSoftware "curl" || return $? getVersion RETVAL="$?" if [[ $RETVAL == 0 ]] && [[ "$FORCE" != "1" ]]; then colorEcho ${BLUE} "Latest version ${NEW_VER} is already installed." return elif [[ $RETVAL == 3 ]]; then return 3 else colorEcho ${BLUE} "Installing verysync ${NEW_VER} on ${ARCH}" downloadVerysync || return $? installSoftware unzip || return $? extract ${ZIPFILE} || return $? fi fi if pgrep "verysync" > /dev/null ; then VERYSYNC_RUNNING=1 stopVerysync fi installVerysync || return $? installInitScript || return $? if [[ ${VERYSYNC_RUNNING} -eq 1 ]];then colorEcho ${BLUE} "Restarting verysync service." startVerysync fi colorEcho ${GREEN} "Verysync ${NEW_VER} is installed." rm -rf /tmp/verysync return 0 } main Coding/verysync-installer/go-install.sh
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,51 @@ #!/bin/bash VERSION=1.0 TARFILE=verysync-linux-installer-${VERSION}.tar TARURL=http://www.verysync.com/shell/verysync-linux-installer/$TARFILE CURL=`command -v curl 2>/dev/null` WGET=`command -v wget 2>/dev/null` #######color code######## RED="31m" # Error message GREEN="32m" # Success message YELLOW="33m" # Warning message BLUE="36m" # Info message colorEcho(){ COLOR=$1 echo -e "\033[${COLOR}${@:2}\033[0m" } if [[ "$CURL" == "" && "$WGET" == "" ]]; then colorEcho ${RED} "Did not find the wget or curl command" exit 1; fi if [[ "$CURL" == "" ]]; then CURL="$WGET -k -O-" else CURL="$CURL --connect-timeout 10 -k" fi colorEcho $GREEN "Downloading from $TARURL" $CURL $TARURL > $TARFILE if [[ $? -ne 0 ]]; then colorEcho ${RED} "Failed to fetch $TARURL Please check your network or try again." exit 3 fi colorEcho $GREEN "Extracting installer" mkdir -p verysync-installer cd verysync-installer && tar xf "../$TARFILE" if [[ $? -ne 0 ]]; then colorEcho ${RED} "Failed to extract verysync-installer." exit 4 fi colorEcho $GREEN "Processing ..." ./go-inst.sh $@ Coding/verysync-installer/start-stop-daemon/amd64Binary files differ
Coding/verysync-installer/start-stop-daemon/armBinary files differ
Coding/verysync-installer/start-stop-daemon/arm64Binary files differ
Coding/verysync-installer/start-stop-daemon/i386Binary files differ
ConnectionStrings.config
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,9 @@ <?xml version="1.0" encoding="utf-8"?> <connectionStrings> <remove name="sqlserver" /> <remove name="mysql" /> <remove name="oracle" /> <add name="sqlserver" connectionString="Server=S908406;User Id=user;Pwd=Whir_ezEIP5_shxyxx201709122601;DataBase=Whir_ezEIP5_shxyxx201709122601; Persist Security Info=True;" providerName="System.Data.SqlClient"/> <add name="mysql" connectionString="server=192.168.1.201;database=whir_ezeip_dev;user id=netuser;password=netuser2008;Allow User Variables=true;CharSet=utf8;" providerName="MySql" /> <add name="oracle" connectionString="Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.201)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl)));User Id=ezeip;Password=123456;" providerName="Oracle" /> </connectionStrings> bmw-login.xml
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,299 @@ <%@page import="org.apache.struts2.components.Include"%> <%@ page language="java" pageEncoding="UTF-8"%> <%@ taglib uri="/struts-tags" prefix="s" %> <% if(session.getAttribute("userId") != null){ out.print("<script>window.location='index.jsp';</script>"); } %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <% response.setHeader("Pragma","No-cache"); response.setHeader("Cache-Control","no-cache"); response.setDateHeader("Expires", -10); %> <link rel="icon" href="image/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="image/favicon.ico" type="image/x-icon" /> <title><s:property value="%{getText('login.title')}"/></title> <meta http-equiv="X-UA-Compatible" content="IE=11; IE=10; IE=9; IE=EDGE" /> <meta http-equiv="keywords" content='<s:property value="%{getText(\'login.keywords\')}"/>' /> <meta http-equiv="description" content='<s:property value="%{getText(\'login.description')}"/>' /> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <link rel="stylesheet" type="text/css" href="css/pepperGrinder/easyui.css" /> <link rel="stylesheet" type="text/css" href="css/color.css" /> <link rel="stylesheet" type="text/css" href="css/icon.css" /> <script type="text/javascript" src="js/jquery.min.js"></script> <script type="text/javascript" src="js/jquery.easyui.min.js"></script> <script type="text/javascript" src="js/locale/easyui-lang-zh_CN.js"></script> <style> body { font-family:Verdana, Arial, Helvetica, sans-serif; } </style> <script type="text/javascript" src="js/common.js" ></script> <script type="text/javascript" src="js/jquery.md5.js"></script> <style type="text/css"> .body-style{ -moz-user-select: none; /*ç«ç*/ -webkit-user-select: none; /*webkitæµè§å¨*/ -ms-user-select: none; /*IE10*/ -khtml-user-select: none; /*æ©ææµè§å¨*/ user-select: none; } .bg { filter: url(blur.svg#blur); -webkit-filter: blur(3px); -moz-filter: blur(3px); -ms-filter: blur(3px); filter: blur(3px); filter: progid:DXImageTransform.Microsoft.Blur(PixelRadius=3, MakeShadow=false); /* IE6~IE9 */ } .title{ text-shadow:#000 5px 5px 5px; } .apanel-style{ padding: 16px; background: #F7F7F7; opacity:0.8; width:300px; border-radius:10px; text-align:center; margin:0 auto; text-align:center; } .panel-style{ padding: 16px; background: #F7F7F7; opacity:0.8; width:300px; height:250px; border-radius:10px; text-align:center; margin:0 auto; text-align:center; } .form-style{ font: 95% Microsoft YaHei; max-width: 300px; margin: 0 auto; padding: 16px; } </style> <script type="text/javascript"> $(function() { var url = window.location.href; if(url.indexOf("mmp.lingyue-digital.com")<=0){ $("#text1Div").animate({ top: '12%', opacity: 0.9 }, 300, function(){ $("#text2Div").animate({ top: '26%', opacity: 0.9 }, 300, function(){ $("#registerDiv").hide(); $("#loginDiv").hide(); $("#redirectDiv").animate({ top: '42%', opacity: 1 }, 300); }); }); return; } setInterval("ChangeBackground()",10000); $.ajax({ type: "post", url: 'validateCdkeysAjax', success: function (data) { $("#text1Div").animate({ top: '12%', opacity: 0.9 }, 300, function(){ $("#text2Div").animate({ top: '26%', opacity: 0.9 }, 300, function(){ if(data.flag == "1"){ $("#type").val("1"); $("#registerDiv").hide(); $("#loginDiv").animate({ top: '42%', opacity: 1 }, 300); }else{ $("#type").val("2"); $("#loginDiv").hide(); $("#registerDiv").animate({ top: '42%', opacity: 1 }, 300); } }); }); } }); if ("undefined" == typeof(document.body.style.maxHeight)) { var info = '<s:property value="%{getText('login.browseSupportInfo')}"/>'; $("#browseSupportInfo").html(info); } $("#account").textbox('textbox').bind('keydown', function(e){ if (e.keyCode == 13){ $("#account").textbox('setValue', $(this).val()); } }); $("#passwordTb").textbox('textbox').bind('keydown', function(e){ if (e.keyCode == 13){ $("#passwordTb").textbox('setValue', $(this).val()); } }); $("#cdkey").textbox('textbox').bind('keydown', function(e){ if (e.keyCode == 13){ $("#cdkey").textbox('setValue', $(this).val()); } }); }); $(document).keydown(function(event){ var mykeyCode = event.which; if (/msie/.test(navigator.userAgent.toLowerCase())){ mykeyCode = event.keyCode; } switch(mykeyCode) { case 13: if($("#type").val() == "1"){ login(); } if($("#type").val() == "2"){ register(); } } }); function login(){ var account = $("#account").textbox("getValue"); var password = $("#passwordTb").textbox("getValue"); var cdkey = $("#cdkey").textbox("getValue"); if($.trim(account) == ""){ $('#messageDiv').html('<s:property value="%{getText(\'login.accountHint\')}"/>'); $('#account').next().find('input').focus(); return; } if($.trim(password) == ''){ $('#messageDiv').html('<s:property value="%{getText(\'login.passwordHint\')}"/>'); $('#password').next().find('input').focus(); return; } if($.trim(cdkey) == ''){ $('#messageDiv').html('<s:property value="%{getText(\'login.cdkeyHint\')}"/>'); $('#cdkey').next().find('input').focus(); return; } $("#loginBtn").linkbutton('disable'); $("#loginBtn").linkbutton({text: 'ç»å½ä¸ããã'}); console.log(password) $("#password").val($.md5(password)); $("#loginForm").submit(); } function register(){ var code = $("#code").textbox("getValue"); if($.trim(code) == ""){ $('#registerMessageDiv').html('<s:property value="%{getText(\'login.codeHint\')}"/>'); $('#code').next().find('input').focus(); return; } $("#registerBtn").linkbutton('disable'); $("#registerBtn").linkbutton({text: '注åä¸ããã'}); $("#registerForm").submit(); } function changeCdkey(){ $("#cdkeyImg").attr("src","<%="image.jsp"%>?rnd=" + Math.random()); } var backImage = new Array("image/bg.jpg", "image/bg1.jpg", "image/bg2.jpg"); var backImageIndex = 0; function ChangeBackground(){ $("#backgroundImage").fadeTo(2000, 0.1, function(){ if( ++backImageIndex >= backImage.length) { backImageIndex=0; } $("#backgroundImage").attr('src',backImage[backImageIndex]).fadeTo(2000, 1); }); } function gotoNewWeb(){ window.location.href = 'https://mmp.lingyue-digital.com/' } </script> </head> <body style="margin:0;padding:0;overflow:hidden;background:#aaaaaa;" class="body-style"> <input type="hidden" id="type" /> <div id="backgroundImage" style="background-image:url(image/bg.jpg);background-size:cover;background-repeat:no-repeat;background-position:center;width:100%;position:absolute;z-index:-9999;left:0; right:0; top:0; bottom:0;margin:auto;height:100%;" class="bg"></div> <div id="bmLogo" style="border:background-repeat:no-repeat;position:absolute;z-index:1;right:10px;top:10px;"><img src="image/bm_logo.png" style="height:200px;" /></div> <div id="text1Div" class="title" style="position:absolute;;text-align:center;margin:0 auto;width:100%;top:10%;opacity:0;"> <h1 style="color: #ffffff;font-size: 55px;font-weight: blod;line-height: 60px;letter-spacing: 10px;font-family:Microsoft YaHei;">BMWå¤åªä½æ¨éå¹³å°</h1> </div> <div id="text2Div" class="title" style="position:absolute;text-align:center;margin:0 auto;width:100%;top:24%;opacity:0;"> <p style="color: #ffffff;font-size: 25px;font-weight: bold;margin-top: 20px;line-height: 2;">BMW Multi-Media Post System</p> </div> <div id="registerDiv" style="text-align:center;margin: 0 auto;width:100%;top:38%; position:absolute;opacity:0;"> <div class="form-style panel-style" style="height:100px"> <s:form id="registerForm" action="register" theme="simple"> <div id="registerMessageDiv" style="height:25px;margin-bottom:5px;margin-left:2px;color:red;"> </div> <div style="margin-bottom:15px"> <input id="code" name="cdkeyBean.code" class="easyui-textbox" style="width:100%;height:170px;padding:11px" data-options="multiline:true,prompt:'<s:property value="%{getText(\'login.registerPlaceholder\')}"/>'" /> </div> <div> <a id="registerBtn" class="easyui-linkbutton" data-options="iconCls:'icon-ok'" style="padding:5px 0px;width:100%;" onclick="register()"> <span style="font-size:14px;"><s:property value="%{getText('login.register')}"/></span> </a> </div> </s:form> </div> </div> <div id="loginDiv" style="text-align:center;margin: 0 auto;width:100%;top:38%; position:absolute;opacity:0;"> <div class="form-style panel-style"> <s:form id="loginForm" action="login" theme="simple"> <div id="messageDiv" style="height:25px;margin-bottom:5px;margin-left:2px;color:red;"> ${userBean.errorMsg} </div> <div style="margin-bottom:15px"> <input id="account" name="userBean.account" class="easyui-textbox" style="width:100%;height:40px;padding:11px" data-options="prompt:'<s:property value="%{getText(\'login.accountPlaceholder\')}"/>',iconCls:'icon-man',iconWidth:38" /> </div> <div style="margin-bottom:15px"> <input id="passwordTb" class="easyui-textbox" type="password" style="width:100%;height:40px;padding:12px" autocomplete="off" data-options="prompt:'<s:property value="%{getText(\'login.passwordPlaceholder\')}"/>',iconCls:'icon-lock',iconWidth:38" /> <input id="password" name="userBean.password" type="hidden" /> </div> <div style="margin-bottom:15px"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td width="50%"><input id="cdkey" name="userBean.cdkey" class="easyui-textbox" style="width:100%;height:40px;padding:12px" data-options="prompt:'<s:property value="%{getText(\'login.cdkeyPlaceholder\')}"/>'" /></td> <td width="30%"><img id="cdkeyImg" onclick="changeCdkey()" style="vertical-align:middle;margin-left:10px;cursor:pointer;" src="<%="image.jsp"%>" /></td> </tr> </table> </div> <div> <a id="loginBtn" class="easyui-linkbutton" data-options="iconCls:'icon-ok'" style="padding:5px 0px;width:100%;" onclick="login()"> <span style="font-size:14px;"><s:property value="%{getText(\'login.login\')}"/></span> </a> </div> </s:form> </div> </div> <div id="redirectDiv" style="text-align:center;margin: 0 auto;width:100%;top:38%; position:absolute;opacity:0;"> <div class="form-style apanel-style"> <div> <a class="easyui-linkbutton" data-options="iconCls:'icon-ok'" style="padding:5px 0px;width:100%;" onclick="gotoNewWeb()"> <span style="font-size:14px;">ç½å已忴ï¼ç¹å»è·³è½¬</span> </a> </div> </div> </div> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" style="position: fixed; left: -1000px; height: -1000px;"> <defs> <filter id="blur"> <feGaussianBlur stdDeviation="10" /> </filter> </defs> </svg> </body> </html> bmw-server.xml
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,160 @@ <?xml version='1.0' encoding='utf-8'?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <!-- Note: A "Server" is not itself a "Container", so you may not define subcomponents such as "Valves" at this level. Documentation at /docs/config/server.html --> <Server port="8005" shutdown="SHUTDOWN"> <Listener className="org.apache.catalina.startup.VersionLoggerListener" /> <!-- Security listener. Documentation at /docs/config/listeners.html <Listener className="org.apache.catalina.security.SecurityListener" /> --> <!--APR library loader. Documentation at /docs/apr.html --> <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" /> <!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html --> <Listener className="org.apache.catalina.core.JasperListener" /> <!-- Prevent memory leaks due to use of particular java/javax APIs--> <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" /> <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" /> <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" /> <!-- Global JNDI resources Documentation at /docs/jndi-resources-howto.html --> <GlobalNamingResources> <!-- Editable user database that can also be used by UserDatabaseRealm to authenticate users --> <Resource name="UserDatabase" auth="Container" type="org.apache.catalina.UserDatabase" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" pathname="conf/tomcat-users.xml" /> </GlobalNamingResources> <!-- A "Service" is a collection of one or more "Connectors" that share a single "Container" Note: A "Service" is not itself a "Container", so you may not define subcomponents such as "Valves" at this level. Documentation at /docs/config/service.html --> <Service name="Catalina"> <!--The connectors can use a shared executor, you can define one or more named thread pools--> <!-- <Executor name="tomcatThreadPool" namePrefix="catalina-exec-" maxThreads="150" minSpareThreads="4"/> --> <!-- A "Connector" represents an endpoint by which requests are received and responses are returned. Documentation at : Java HTTP Connector: /docs/config/http.html (blocking & non-blocking) Java AJP Connector: /docs/config/ajp.html APR (HTTP/AJP) Connector: /docs/apr.html Define a non-SSL HTTP/1.1 Connector on port 8888 --> <Connector port="8888" protocol="HTTP/1.1" connectionTimeout="5000" server="seeyoo" redirectPort="8888" URIEncoding="UTF-8" /> <!-- A "Connector" using the shared thread pool--> <!-- <Connector executor="tomcatThreadPool" port="8888" protocol="HTTP/1.1" connectionTimeout="8000" redirectPort="8888" /> --> <!-- Define a SSL HTTP/1.1 Connector on port 8443 This connector uses the BIO implementation that requires the JSSE style configuration. When using the APR/native implementation, the OpenSSL style configuration is required as described in the APR/native documentation protocol="org.apache.coyote.http11.Http11NioProtocol" org.apache.coyote.http11.Http11Protocol ciphers="TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_256_CBC_SHA256" --> <Connector port="443" protocol="org.apache.coyote.http11.Http11NioProtocol" maxThreads="150" SSLEnabled="true" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" keystoreFile="digital.pfx" keystoreType="PKCS12" keystorePass="bmwmmp" connectionTimeout="5000" server="seeyoo" URIEncoding="UTF-8" ciphers="TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_256_CBC_SHA256" /> <!-- Define an AJP 1.3 Connector on port 8889 <Connector port="8889" protocol="AJP/1.3" redirectPort="8443" /> --> <!-- An Engine represents the entry point (within Catalina) that processes every request. The Engine implementation for Tomcat stand alone analyzes the HTTP headers included with the request, and passes them on to the appropriate Host (virtual host). Documentation at /docs/config/engine.html --> <!-- You should set jvmRoute to support load-balancing via AJP ie : <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1"> --> <Engine name="Catalina" defaultHost="mmp.lingyue-digital.com"> <!--For clustering, please take a look at documentation at: /docs/cluster-howto.html (simple how to) /docs/config/cluster.html (reference documentation) --> <!-- <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/> --> <!-- Use the LockOutRealm to prevent attempts to guess user passwords via a brute-force attack --> <Realm className="org.apache.catalina.realm.LockOutRealm"> <!-- This Realm uses the UserDatabase configured in the global JNDI resources under the key "UserDatabase". Any edits that are performed against this UserDatabase are immediately available for use by the Realm. --> <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/> </Realm> <Host name="mmp.lingyue-digital.com" appBase="webapps" unpackWARs="true" autoDeploy="true"> <!-- SingleSignOn valve, share authentication between web applications Documentation at: /docs/config/valve.html --> <!-- <Valve className="org.apache.catalina.authenticator.SingleSignOn" /> --> <Context docBase="D:\DS\Tomcat\webapps\mps" path="" reloadable="false" /> <!-- Access log processes all example. Documentation at: /docs/config/valve.html Note: The pattern used is equivalent to using pattern="common" --> <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access_log." suffix=".txt" pattern="%h %l %u %t "%r" %s %b" /> </Host> </Engine> </Service> </Server> login.jsp
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,299 @@ <%@page import="org.apache.struts2.components.Include"%> <%@ page language="java" pageEncoding="UTF-8"%> <%@ taglib uri="/struts-tags" prefix="s" %> <% if(session.getAttribute("userId") != null){ out.print("<script>window.location='index.jsp';</script>"); } %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <% response.setHeader("Pragma","No-cache"); response.setHeader("Cache-Control","no-cache"); response.setDateHeader("Expires", -10); %> <link rel="icon" href="image/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="image/favicon.ico" type="image/x-icon" /> <title><s:property value="%{getText('login.title')}"/></title> <meta http-equiv="X-UA-Compatible" content="IE=11; IE=10; IE=9; IE=EDGE" /> <meta http-equiv="keywords" content='<s:property value="%{getText(\'login.keywords\')}"/>' /> <meta http-equiv="description" content='<s:property value="%{getText(\'login.description')}"/>' /> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <link rel="stylesheet" type="text/css" href="css/pepperGrinder/easyui.css" /> <link rel="stylesheet" type="text/css" href="css/color.css" /> <link rel="stylesheet" type="text/css" href="css/icon.css" /> <script type="text/javascript" src="js/jquery.min.js"></script> <script type="text/javascript" src="js/jquery.easyui.min.js"></script> <script type="text/javascript" src="js/locale/easyui-lang-zh_CN.js"></script> <style> body { font-family:Verdana, Arial, Helvetica, sans-serif; } </style> <script type="text/javascript" src="js/common.js" ></script> <script type="text/javascript" src="js/jquery.md5.js"></script> <style type="text/css"> .body-style{ -moz-user-select: none; /*ç«ç*/ -webkit-user-select: none; /*webkitæµè§å¨*/ -ms-user-select: none; /*IE10*/ -khtml-user-select: none; /*æ©ææµè§å¨*/ user-select: none; } .bg { filter: url(blur.svg#blur); -webkit-filter: blur(3px); -moz-filter: blur(3px); -ms-filter: blur(3px); filter: blur(3px); filter: progid:DXImageTransform.Microsoft.Blur(PixelRadius=3, MakeShadow=false); /* IE6~IE9 */ } .title{ text-shadow:#000 5px 5px 5px; } .apanel-style{ padding: 16px; background: #F7F7F7; opacity:0.8; width:300px; border-radius:10px; text-align:center; margin:0 auto; text-align:center; } .panel-style{ padding: 16px; background: #F7F7F7; opacity:0.8; width:300px; height:250px; border-radius:10px; text-align:center; margin:0 auto; text-align:center; } .form-style{ font: 95% Microsoft YaHei; max-width: 300px; margin: 0 auto; padding: 16px; } </style> <script type="text/javascript"> $(function() { var url = window.location.href; <!--if(url.indexOf("mmp.lingyue-digital.com")<=0){ $("#text1Div").animate({ top: '12%', opacity: 0.9 }, 300, function(){ $("#text2Div").animate({ top: '26%', opacity: 0.9 }, 300, function(){ $("#registerDiv").hide(); $("#loginDiv").hide(); $("#redirectDiv").animate({ top: '42%', opacity: 1 }, 300); }); }); return; }--> setInterval("ChangeBackground()",10000); $.ajax({ type: "post", url: 'validateCdkeysAjax', success: function (data) { $("#text1Div").animate({ top: '12%', opacity: 0.9 }, 300, function(){ $("#text2Div").animate({ top: '26%', opacity: 0.9 }, 300, function(){ if(data.flag == "1"){ $("#type").val("1"); $("#registerDiv").hide(); $("#loginDiv").animate({ top: '42%', opacity: 1 }, 300); }else{ $("#type").val("2"); $("#loginDiv").hide(); $("#registerDiv").animate({ top: '42%', opacity: 1 }, 300); } }); }); } }); if ("undefined" == typeof(document.body.style.maxHeight)) { var info = '<s:property value="%{getText('login.browseSupportInfo')}"/>'; $("#browseSupportInfo").html(info); } $("#account").textbox('textbox').bind('keydown', function(e){ if (e.keyCode == 13){ $("#account").textbox('setValue', $(this).val()); } }); $("#passwordTb").textbox('textbox').bind('keydown', function(e){ if (e.keyCode == 13){ $("#passwordTb").textbox('setValue', $(this).val()); } }); $("#cdkey").textbox('textbox').bind('keydown', function(e){ if (e.keyCode == 13){ $("#cdkey").textbox('setValue', $(this).val()); } }); }); $(document).keydown(function(event){ var mykeyCode = event.which; if (/msie/.test(navigator.userAgent.toLowerCase())){ mykeyCode = event.keyCode; } switch(mykeyCode) { case 13: if($("#type").val() == "1"){ login(); } if($("#type").val() == "2"){ register(); } } }); function login(){ var account = $("#account").textbox("getValue"); var password = $("#passwordTb").textbox("getValue"); var cdkey = $("#cdkey").textbox("getValue"); if($.trim(account) == ""){ $('#messageDiv').html('<s:property value="%{getText(\'login.accountHint\')}"/>'); $('#account').next().find('input').focus(); return; } if($.trim(password) == ''){ $('#messageDiv').html('<s:property value="%{getText(\'login.passwordHint\')}"/>'); $('#password').next().find('input').focus(); return; } if($.trim(cdkey) == ''){ $('#messageDiv').html('<s:property value="%{getText(\'login.cdkeyHint\')}"/>'); $('#cdkey').next().find('input').focus(); return; } $("#loginBtn").linkbutton('disable'); $("#loginBtn").linkbutton({text: 'ç»å½ä¸ããã'}); console.log(password) $("#password").val($.md5(password)); $("#loginForm").submit(); } function register(){ var code = $("#code").textbox("getValue"); if($.trim(code) == ""){ $('#registerMessageDiv').html('<s:property value="%{getText(\'login.codeHint\')}"/>'); $('#code').next().find('input').focus(); return; } $("#registerBtn").linkbutton('disable'); $("#registerBtn").linkbutton({text: '注åä¸ããã'}); $("#registerForm").submit(); } function changeCdkey(){ $("#cdkeyImg").attr("src","<%="image.jsp"%>?rnd=" + Math.random()); } var backImage = new Array("image/bg.jpg", "image/bg1.jpg", "image/bg2.jpg"); var backImageIndex = 0; function ChangeBackground(){ $("#backgroundImage").fadeTo(2000, 0.1, function(){ if( ++backImageIndex >= backImage.length) { backImageIndex=0; } $("#backgroundImage").attr('src',backImage[backImageIndex]).fadeTo(2000, 1); }); } function gotoNewWeb(){ window.location.href = 'https://mmp.lingyue-digital.com/' } </script> </head> <body style="margin:0;padding:0;overflow:hidden;background:#aaaaaa;" class="body-style"> <input type="hidden" id="type" /> <div id="backgroundImage" style="background-image:url(image/bg.jpg);background-size:cover;background-repeat:no-repeat;background-position:center;width:100%;position:absolute;z-index:-9999;left:0; right:0; top:0; bottom:0;margin:auto;height:100%;" class="bg"></div> <div id="bmLogo" style="border:background-repeat:no-repeat;position:absolute;z-index:1;right:10px;top:10px;"><img src="image/bm_logo.png" style="height:200px;" /></div> <div id="text1Div" class="title" style="position:absolute;;text-align:center;margin:0 auto;width:100%;top:10%;opacity:0;"> <h1 style="color: #ffffff;font-size: 55px;font-weight: blod;line-height: 60px;letter-spacing: 10px;font-family:Microsoft YaHei;">BMWå¤åªä½æ¨éå¹³å°</h1> </div> <div id="text2Div" class="title" style="position:absolute;text-align:center;margin:0 auto;width:100%;top:24%;opacity:0;"> <p style="color: #ffffff;font-size: 25px;font-weight: bold;margin-top: 20px;line-height: 2;">BMW Multi-Media Post System</p> </div> <div id="registerDiv" style="text-align:center;margin: 0 auto;width:100%;top:38%; position:absolute;opacity:0;"> <div class="form-style panel-style" style="height:100px"> <s:form id="registerForm" action="register" theme="simple"> <div id="registerMessageDiv" style="height:25px;margin-bottom:5px;margin-left:2px;color:red;"> </div> <div style="margin-bottom:15px"> <input id="code" name="cdkeyBean.code" class="easyui-textbox" style="width:100%;height:170px;padding:11px" data-options="multiline:true,prompt:'<s:property value="%{getText(\'login.registerPlaceholder\')}"/>'" /> </div> <div> <a id="registerBtn" class="easyui-linkbutton" data-options="iconCls:'icon-ok'" style="padding:5px 0px;width:100%;" onclick="register()"> <span style="font-size:14px;"><s:property value="%{getText('login.register')}"/></span> </a> </div> </s:form> </div> </div> <div id="loginDiv" style="text-align:center;margin: 0 auto;width:100%;top:38%; position:absolute;opacity:0;"> <div class="form-style panel-style"> <s:form id="loginForm" action="login" theme="simple"> <div id="messageDiv" style="height:25px;margin-bottom:5px;margin-left:2px;color:red;"> ${userBean.errorMsg} </div> <div style="margin-bottom:15px"> <input id="account" name="userBean.account" class="easyui-textbox" style="width:100%;height:40px;padding:11px" data-options="prompt:'<s:property value="%{getText(\'login.accountPlaceholder\')}"/>',iconCls:'icon-man',iconWidth:38" /> </div> <div style="margin-bottom:15px"> <input id="passwordTb" class="easyui-textbox" type="password" style="width:100%;height:40px;padding:12px" autocomplete="off" data-options="prompt:'<s:property value="%{getText(\'login.passwordPlaceholder\')}"/>',iconCls:'icon-lock',iconWidth:38" /> <input id="password" name="userBean.password" type="hidden" /> </div> <div style="margin-bottom:15px"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td width="50%"><input id="cdkey" name="userBean.cdkey" class="easyui-textbox" style="width:100%;height:40px;padding:12px" data-options="prompt:'<s:property value="%{getText(\'login.cdkeyPlaceholder\')}"/>'" /></td> <td width="30%"><img id="cdkeyImg" onclick="changeCdkey()" style="vertical-align:middle;margin-left:10px;cursor:pointer;" src="<%="image.jsp"%>" /></td> </tr> </table> </div> <div> <a id="loginBtn" class="easyui-linkbutton" data-options="iconCls:'icon-ok'" style="padding:5px 0px;width:100%;" onclick="login()"> <span style="font-size:14px;"><s:property value="%{getText(\'login.login\')}"/></span> </a> </div> </s:form> </div> </div> <div id="redirectDiv" style="text-align:center;margin: 0 auto;width:100%;top:38%; position:absolute;opacity:0;"> <div class="form-style apanel-style"> <div> <a class="easyui-linkbutton" data-options="iconCls:'icon-ok'" style="padding:5px 0px;width:100%;" onclick="gotoNewWeb()"> <span style="font-size:14px;">ç½å已忴ï¼ç¹å»è·³è½¬</span> </a> </div> </div> </div> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" style="position: fixed; left: -1000px; height: -1000px;"> <defs> <filter id="blur"> <feGaussianBlur stdDeviation="10" /> </filter> </defs> </svg> </body> </html> markdown/SY2209iBP6EXBASY(0551)-14.022.71.007 2020.11.18.md
markdown/ÊÛÒ©.md