海运的博客

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在焦点窗口打开标签
分类
最新文章
最近回复
  • 海运: 你是编译不成功呢?还是编译后不能运行呢?还是运行后不能访问web界面呢?
  • 白墨: 可能不清楚就是编译安装后启动后访问不了web界面
  • 白墨: 你好博主按照你的教程是编译安装不了的,在centos7版本下,我在开源镜像站下载centos7...
  • 感谢: 好的谢谢。
  • 海运: 可在github选择指定的branch或tag查看Makefile文件内核版本git指定bra...
  • 感谢: 请问一下“git checkout 20181012”这条命令是什么意思,没有google到。...
  • 海运: 抱歉,我没用蓝牙,现在N1在稳定挂PT中,没法折腾了。
  • hxhw: 大神能弄一個N1盒子開啟藍芽的教程不?我目前的藍芽識別不了似的(BD Address: 00:...
  • 海运: 抱歉,没用过wireguard,不了解具体情况。看错误提示是创建虚拟网卡的类型wireguar...
  • zhu tie: 本人小白我想在n1上装wireguard,安装后错误信息如下:wg-quick up wg0[...
页面执行耗时:0.0692秒。-->