很早的的时候一边在论坛寻求帮助,一边不断地google 百度终于写好了Pentie等开发的山寨版神州数码的认证程序zdcclient的openwrt的makefile。很早就写好了但是由于一些原因没有放出来,期间也有恩山的网友放出来过make的写法,所以也就没有放出来了。去年由于学校认证系统认证方式有了一点点微调导致,我的zdclint认证不上,后来通过找各种有关神州数码的资料,通过抓包对比原版软件认证和 zdclient 的包正了这个问题。但是这个相比于锐捷的第三方认证端尤其是在openwrt上设置账号密码什么的很麻烦一般不玩路由的人真不懂,身边需要用的人却不懂。所以就想着写一个luci,于是又是各种找资料学着各种客户端的 luci 的写法终于写出了zdclient的luci 。由于学习时间比较紧张这些工作就没有放出来,这段时间完善了以一下makefile,尤其是对libpcap的依赖,让整个编译方便起来。想想肯定有很多网友特别是各地大学的也是用神州数码,所以就利用一个空余的时间将代码重新上传到github,并写下这一篇帖子。因为时间不是很多所以就不能做出一个完整的编译教程,只是把一些代码发到这里与大家分享一下,可能代码里边还存在着许多bug,希望大家谅解。
这个是Makefile
#Zdclient
#Author:pentie
#zdclient for openwrt with luci
#Author:ouyang
include $(TOPDIR)/rules.mk
PKG_NAME:=zdclient
PKG_VERSION:=1.2.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://raw.githubusercontent.com/ouyangshiliang/zdclient-luci-openwrt/master/
PKG_INSTALL:=1
PKG_CAT:=zcat
include $(INCLUDE_DIR)/package.mk
define Package/zdclient
SECTION:=net
CATEGORY:=Network
SUBMENU:=CERNET
DEPENDS:=+bash +libpcap +libstdcpp +libiconv-full +libintl-full
TITLE:=zdclient is digitalchina client.
endef
define Package/zdclient/description
If you can¡*t figure out what this program does, you¡*re probably
brain-dead and need immediate medical attention.
endef
define Build/Prepare
tar -zxvf $(TOPDIR)/dl/$(PKG_NAME)-$(PKG_VERSION).tar.gz -C $(BUILD_DIR)
$(CP) $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/src/* $(PKG_BUILD_DIR)/
endef
define Package/zdclient/install
$(INSTALL_DIR) $(1)/usr/sbin
$(CP) $(PKG_BUILD_DIR)/zdclient $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/init.d
$(CP) $(PKG_BUILD_DIR)/files/zdclient $(1)/etc/init.d/zdclient
$(INSTALL_DIR) $(1)/usr/sbin/
$(CP) $(PKG_BUILD_DIR)/files/runzdclient $(1)/usr/sbin/runzdclient
endef
$(eval $(call BuildPackage,zdclient))
复制代码
这个是Makefile
#Zdclient
#Author:pentie
#zdclient for openwrt with luci
#Author:ouyang
include $(TOPDIR)/rules.mk
PKG_NAME:=zdclient
PKG_VERSION:=1.2.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://raw.githubusercontent.com/ouyangshiliang/zdclient-luci-openwrt/master/
PKG_INSTALL:=1
PKG_CAT:=zcat
include $(INCLUDE_DIR)/package.mk
define Package/zdclient
SECTION:=net
CATEGORY:=Network
SUBMENU:=CERNET
DEPENDS:=+bash +libpcap +libstdcpp +libiconv-full +libintl-full
TITLE:=zdclient is digitalchina client.
endef
define Package/zdclient/description
If you can¡*t figure out what this program does, you¡*re probably
brain-dead and need immediate medical attention.
endef
define Build/Prepare
tar -zxvf $(TOPDIR)/dl/$(PKG_NAME)-$(PKG_VERSION).tar.gz -C $(BUILD_DIR)
$(CP) $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/src/* $(PKG_BUILD_DIR)/
endef
define Package/zdclient/install
$(INSTALL_DIR) $(1)/usr/sbin
$(CP) $(PKG_BUILD_DIR)/zdclient $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/init.d
$(CP) $(PKG_BUILD_DIR)/files/zdclient $(1)/etc/init.d/zdclient
$(INSTALL_DIR) $(1)/usr/sbin/
$(CP) $(PKG_BUILD_DIR)/files/runzdclient $(1)/usr/sbin/runzdclient
endef
$(eval $(call BuildPackage,zdclient))
复制代码