海运的博客

OpenWRT交叉编译非官方软件sshpass

发布时间:October 30, 2013 // 分类:OpenWrt // No Comments

安装编译环境:

apt-get install build-essential libncurses5-dev zlib1g-dev

下载交叉编译环境及sshpass源码:

wget http://downloads.openwrt.org/backfire/10.03.1/brcm63xx/OpenWrt-SDK-brcm63xx-for-Linux-i686-gcc-4.3.3%2bcs_uClibc-0.9.30.1.tar.bz2
tar jxvf OpenWrt-SDK-brcm63xx-for-Linux-i686-gcc-4.3.3+cs_uClibc-0.9.30.1.tar.bz2 
mkdir -p OpenWrt-SDK-brcm63xx-for-Linux-i686-gcc-4.3.3+cs_uClibc-0.9.30.1/package/sshpass
cd OpenWrt-SDK-brcm63xx-for-Linux-i686-gcc-4.3.3+cs_uClibc-0.9.30.1/package/sshpass
wget http://sourceforge.net/projects/sshpass/files/sshpass/1.05/sshpass-1.05.tar.gz
tar zxvf sshpass-1.05.tar.gz
mv sshpass-1.05 src

sshpass目录新建Makefile文件:

include $(TOPDIR)/rules.mk

# Name and release number of this package
PKG_NAME:=sshpass
PKG_RELEASE:=1.05

PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)

include $(INCLUDE_DIR)/package.mk

define Package/sshpass
    SECTION:=utils
    CATEGORY:=Utilities
    TITLE:=sshpass
endef

define Package/sshpass/description
    Sshpass is a tool for non-interactivly performing password authentication with SSH's
endef

# Specify what needs to be done to prepare for building the package.
define Build/Prepare
    mkdir -p $(PKG_BUILD_DIR)
    $(CP) ./src/* $(PKG_BUILD_DIR)/
endef


# Specify where and how to install the program.
define Package/sshpass/install
    $(INSTALL_DIR) $(1)/bin
    $(INSTALL_BIN) $(PKG_BUILD_DIR)/sshpass $(1)/bin/
endef

# This line executes the necessary commands to compile our program.
$(eval $(call BuildPackage,sshpass))

编译sshpass:

cd ../
make package/sshpass/compile

编译成功的程序文件:

ls bin/brcm63xx/packages/
Packages  Packages.gz  sshpass_1.05_brcm63xx.ipk

编译过程中如遇到以下错误:

staging_dir/toolchain-mips_r2_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/lib/libc.so: undefined reference to `_dl_app_init_array’

需修改:

TARGET_LDFLAGS:=-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib

为:

TARGET_LDFLAGS+= -L$(TOOLCHAIN_DIR)/usr/lib -L$(TOOLCHAIN_DIR)/lib -Wl,-rpath=$(TOOLCHAIN_DIR)/lib

OpenWRT安装配置PPTP VPN客户端

发布时间:October 28, 2013 // 分类:OpenWrt // No Comments

安装PPTP Client和MPPE加密模块:

opkg update
opkg install pptp
opkg install kmod-mppe

添加账号和密码至配置文件:

cat /etc/ppp/chap-secrets 
#USERNAME  PROVIDER  PASSWORD  IPADDRESS
haiyun.me vpn "haiyun.me" *

新建拨号配置文件:

cat /etc/ppp/peers/vpn 
pty "pptp www.haiyun.me --nolaunchpppd"
lock
noauth
nobsdcomp
nodeflate
name haiyun.me
remotename vpn
ipparam vpn
mppe required 
mppe stateless
file /etc/ppp/options.pptp

PPTP拨号连接服务器:

pppd call vpn

此内容被密码保护

发布时间:October 27, 2013 // 分类:网络工具 // No Comments

请输入密码访问

Windows7通过任务计划启动程序绕过UAC

发布时间:October 22, 2013 // 分类:Windows // No Comments

新建计划任务以最高权限运行,设置操作为启动相应程序
image75.png
通过快捷方式使用计划任务启动程序,启动时会有显示cmd窗口:

C:\Windows\System32\schtasks.exe /run /tn runregedit

使用VBS脚本隐藏CMD窗口:

set ws=createobject("wscript.shell")
ws.run """C:\Windows\System32\schtasks.exe"" /run /tn runregedit",vbHide
wscript.quit

Total commander和Everything整合

发布时间:October 21, 2013 // 分类:Total Commander // No Comments

Total commander中调用Everything搜索文件:
首先定义调用Everything.exe 命令及参数,编辑配置文件usercmd.ini添加以下:

[em_Everything]   
cmd=D:/Program Files/Everything/Everything.exe   
param="-search "%P ""  
#%P为在当前目录下,P后面空格包含子目录

设置相应快捷键调用上面定义的命令,编辑wincmd.ini在[Shortcuts]下添加:

A+F=em_Everything

Everything搜索结果中调用Total commander打开目录,编辑Everything.ini添加:

open_folder_path_command=$exec("D:/Program Files/totalcmd/TOTALCMD64.EXE" "/O" "/S" "/T" "$parent(%1)")   
open_folder_command=$exec("D:/Program Files/totalcmd/TOTALCMD64.EXE" "/O" "/S" "/T" "%1")  
#参数O只打开一个实例,N相反,参数T在新标签中打开,S在焦点窗口打开标签
分类
最新文章
最近回复
  • 404NTF: 交叉编译的作用是?
  • 404NTF: 请教一下 CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go ...
  • 小智: 安利个PHP开发以太坊区块链的教程: http://xc.hubwiz.com/course/...
  • 陈浩南: 您好,您教程中的 dev.openwrt.org.cn 现在似乎不可用了。请问现在应该在哪里下...
  • 斑马斑马: 怎么查看虚拟机CPU 内存使用情况
  • zzg: http://downloads.openwrt.org.cn/PandoraBox/rali...
  • xiongrui: 看图
  • 傻狍子: filebrowser好像和这功能一样? https://github.com/filebro...
  • 陶国文: 想看看能不能安装
  • 傻狍子: 服务端设置了用户名密码认证的话,在openwrt的openvpn客户端的配置文件当中该如何更改...
页面执行耗时:0.0348秒。-->