-----------------------------
<script type="text/javascript" language="javascript">
function RunFile() {
WshShell = new ActiveXObject("WScript.Shell");
WshShell.Run("c:/windows/explorer.exe ftp://support.localdomain.au/isd-bbs", 1, false);
}
</script>
<p><IMG SRC="image-sign.gif" HEIGHT=30 WIDTH=30 ALIGN=ABSCENTER><b><font face="Verdana, Arial, Helvetica"><font size=-1><a href="input type="button" value="Run File Explorer" onclick="RunFile();" onMouseOver = "window.status='For any downloading problem contact Kiran on 55231 or Call Call-Centre 58877 !!'; return true;" onMouseOut = "window.status=' '; return true;"> Win10-Download </a></font></font></b></p>
The ActiveX control has to be enabled. It will prompt for ActiveX control. I have disabled it with the following switches in Internet Options ==> Security ==>Local Intranet ==> Custom Level
i. Automatic prompting for ActriveX controls - disable
ii. Initialize and script ActiveX controls not marked as safe for scripting - enable
----------------------------
以下的方式未確認是否OK
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOTftp]
Source Filter={E436EBB6-524F-11CE-9F53-0020AF0BA770}
ShellFolder={63da6ec0-2e98-11cf-8d82-444553540000}
@=URLFile Transfer Protocol
AppUserModelID=Microsoft.InternetExplorer.Default
EditFlags=dword00000002
URL Protocol=
FriendlyTypeName=@CWindowsSystem32ieframe.dll,-905
[HKEY_CLASSES_ROOTftpDefaultIcon]
@=CWindowsSystem32url.dll,0
[HKEY_CLASSES_ROOTftpshell]
[HKEY_CLASSES_ROOTftpshellopen]
[HKEY_CLASSES_ROOTftpshellopencommand]
@=CProgram Files (x86)Internet Exploreriexplore.exe %1
[HKEY_CLASSES_ROOTftpshellopenddeexec]
@=hex(2)22,00,25,00,31,00,22,00,2c,00,2c,00,2d,00,31,00,2c,00,30,00,2c,00,2c,
00,2c,00,2c,00,00,00
NoActivateHandler=
[HKEY_CLASSES_ROOTftpshellopenddeexecApplication]
@=IExplore
[HKEY_CLASSES_ROOTftpshellopenddeexecIfExec]
@=
[HKEY_CLASSES_ROOTftpshellopenddeexecTopic]
@=WWW_OpenURL
2017年8月4日 星期五
2017年7月27日 星期四
vim 設定 TAB 為四格空白
set tabstop=4 " The width of a TAB is set to 4.
" Still it is a \t. It is just that
" Vim will interpret it to be having
" a width of 4.
set shiftwidth=4 " Indents will have a width of 4
set softtabstop=4 " Sets the number of columns for a TAB
set expandtab " Expand TABs to spaces
$ vim ~/.vimrc
tabstopThe width of a hard tabstop measured in "spaces" -- effectively the (maximum) width of an actual tab character.
shiftwidthThe size of an "indent". It's also measured in spaces, so if your code base indents with tab characters then you wantshiftwidthto equal the number of tab characters timestabstop. This is also used by things like the=,>and<commands.
softtabstopSetting this to a non-zero value other thantabstopwill make the tab key (in insert mode) insert a combination of spaces (and possibly tabs) to simulate tab stops at this width.
expandtabEnabling this will make the tab key (in insert mode) insert spaces instead of tab characters. This also affects the behavior of theretabcommand.
smarttabEnabling this will make the tab key (in insert mode) insert spaces or tabs to go to the next indent of the next tabstop when the cursor is at the beginning of a line (i.e. the only preceding characters are whitespace).For more details on any of these see:help 'optionname'in vim (e.g.:help 'tabstop')
2017年5月3日 星期三
QNAP Virtualization Station
QNAP 說明
https://www.qnap.com/zh-hk/how-to/tutorial/article/如何使用-virtualization-station-虛擬機工作站
SSH進去
https://wiki.qnap.com/wiki/How_to_SSH_into_your_QNAP_device
操作 virsh
https://forum.qnap.com/viewtopic.php?t=90425
ssh 或 telnet 進去之後
export LD_LIBRARY_PATH=/KVM/opt/lib:/KVM/opt/lib64/
export PATH=$PATH:/KVM/opt/bin/:/KVM/opt/sbin/
[~] # virsh list --all
[~] # virsh shutdown W7_FR_KVM // shutdown "gracefully" of a V.M.
2017年4月2日 星期日
Start VirtualBox VM from CLI
http://askubuntu.com/questions/445284/how-to-start-a-virtualbox-machine-via-command-line-without-gui
Only needed:
VBoxManage startvm "VM name" --type headless
For example:
VBoxManage startvm ubuservloc --type headless
Additionally, if your VM uses 3D acceleration, it makes sense to (temporarily) disable it, as it'll prevent the VM from starting in headless mode.2017年3月9日 星期四
VSFTP
yum install vsftpd
--anon
anonymous_enable=NO
-- chroot
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd/chroot_list --在這裡面加上需要的帳號 --注意deny 有沒有開
-- Iptables
iptables -I INPUT -s {IP}/32 -p tcp -m state --state NEW -m tcp --dport 21 -j ACCEPT
-- SELINUX
setsebool -P allow_ftpd_full_access=1setsebool -P ftp_home_dir=1
ref
http://shaocian.blogspot.tw/2012/07/centos-vsftpd.html
http://download.ithome.com.tw/article/index/id/2389
----
http://blog.xuite.net/jbass0805/blog/68277061-CentOS+6+FTP+Server+(vsftpd)+and+Secure
http://wuhaoshu.blog.51cto.com/845270/489292
----
http://blog.xuite.net/jbass0805/blog/68277061-CentOS+6+FTP+Server+(vsftpd)+and+Secure
編輯/etc/vsftpd/vsftpd.conf新增以下幾條
pasv_enable=YES
pasv_min_port=3000
pasv_max_port=3005
3000~3005是我設定的port range
當然設定完成iptables也要新增一條
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3000:3005 -j ACCEPT
然後重啟iptables
vsftpd passive設定完成
----http://wuhaoshu.blog.51cto.com/845270/489292
被动模式 下,客户连接 TCP/21,客户再通过其他端口连接服务器的随机端口,卡住的原因,是因为服务器在被动模式下没有打开临时端口让 client 连过来。
临时打洞的方法:
优点:不影响ftp配置;缺点: 客户会感觉到连接有些延迟。原因参见ip_conntract的实现原理
在/etc/modprobe.conf中添加
alias ip_conntrack ip_conntract_ftp ip_nat_ftp
在/etc/rc.local中添加
/sbin/modprobe ip_conntract
/sbin/modprobe ip_conntrack_ftp
/sbin/modprobe ip_nat_ftp
限制被动模式连接端口的方法:
- 优点:对连接速度没有影响。缺点: 限制了客户端并发连接的数量。
在/etc/vsftpd/vsftpd.conf中添加
pasv_enable=YES
pasv_min_port=2222
pasv_max_port=2225
pasv_max_port=2225
iptables中开放这段端口
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 21 -j ACCEPT
-A INPUT -p tcp --dport 2222:2225 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 21 -j ACCEPT
-A INPUT -p tcp --dport 2222:2225 -j ACCEPT
訂閱:
文章 (Atom)