diff --git a/amule-dlp/Makefile b/amule-dlp/Makefile deleted file mode 100644 index d99a1b04b..000000000 --- a/amule-dlp/Makefile +++ /dev/null @@ -1,118 +0,0 @@ -# -# Copyright (C) 2007-2021 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v3. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=aMule-DLP -PKG_VERSION:=2.3.3 -PKG_RELEASE:=16 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/persmule/amule-dlp.git -PKG_SOURCE_DATE:=2021-01-30 -PKG_SOURCE_VERSION:=78a95e54e976c612fde6eb49390807df7870f26a -PKG_MIRROR_HASH:=skip - -PKG_CONFIG_DEPEDS:= CONFIG_AMULE_CRYPTOPP_STATIC_LINKING - -PKG_FIXUP:=autoreconf -PKG_BUILD_DEPENDS:=libcryptopp libgd -PKG_BUILD_PARALLEL:=1 -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk - -define Package/amule-dlp - SUBMENU:=P2P - SECTION:=net - CATEGORY:=Network - TITLE:=A multi-platform eMule-like ed2k client - URL:=http://www.amule.org/ - DEPENDS:=+antileech +libpng +libpthread +libncurses +libreadline +libwxbase \ - +libupnp +libbfd $(ICONV_DEPENDS) $(INTL_DEPENDS) \ - +!AMULE_CRYPTOPP_STATIC_LINKING:libcryptopp -endef - -define Package/amule-dlp/config - config AMULE_CRYPTOPP_STATIC_LINKING - bool "Link libcryptopp statically" - default n -endef - -define Download/AmuleWebUI - URL:=https://github.com/MatteoRagni/AmuleWebUI-Reloaded/archive - URL_FILE:=master.zip - FILE:=AmuleWebUI.zip - HASH:=skip -endef - -define Build/Prepare - $(call Build/Prepare/Default) - unzip $(DL_DIR)/AmuleWebUI.zip -d $(PKG_BUILD_DIR) - -endef - -TARGET_LDFLAGS+= -liconv - -CONFIGURE_ARGS+= \ - --disable-static \ - --disable-rpath \ - --with-gnu-ld \ - --disable-ccache \ - --enable-optimize \ - --disable-profile \ - --disable-monolithic \ - --enable-amule-daemon \ - --enable-amulecmd \ - --enable-webserver \ - --disable-amule-gui \ - --disable-cas \ - --disable-wxcas \ - --disable-ed2k \ - --disable-alc \ - --disable-alcc \ - --disable-fileview \ - --disable-plasmamule \ - --without-wxdebug \ - --enable-dlp \ - --enable-upnp \ - --with-zlib="$(STAGING_DIR)/usr" \ - --with-gdlib-prefix="$(STAGING_DIR)/usr" \ - --with-libpng-prefix="$(STAGING_DIR)/usr" \ - --with-wx-prefix="$(STAGING_DIR)/usr" \ - --with-crypto-prefix="$(STAGING_DIR)/usr" \ - --with-libiconv-prefix="$(ICONV_PREFIX)" \ - --with-libintl-prefix="$(INTL_PREFIX)" \ - --with-libupnp-prefix="$(STAGING_DIR)/usr" \ - --without-x \ - --disable-debug - -MAKE_FLAGS += HOSTCC="$(HOSTCC)" - -define Build/Configure - cd $(PKG_BUILD_DIR); $(SHELL) autogen.sh - $(call Build/Configure/Default) -ifeq ($(CONFIG_AMULE_CRYPTOPP_STATIC_LINKING),y) - $(SED) 's;^CRYPTOPP_LIBS.*;CRYPTOPP_LIBS \= "$(STAGING_DIR)/usr/lib/libcryptopp.a";g' \ - $(PKG_BUILD_DIR)/src/Makefile -endif -endef - -define Package/amule-dlp/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/amulecmd $(1)/usr/bin/amulecmd - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/amuled $(1)/usr/bin/amuled - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/amuleweb $(1)/usr/bin/amuleweb - - $(INSTALL_DIR) $(1)/usr/share - $(CP) $(PKG_INSTALL_DIR)/usr/share/amule-dlp $(1)/usr/share/ - $(CP) $(PKG_BUILD_DIR)/AmuleWebUI-Reloaded-master $(1)/usr/share/amule-dlp/webserver/AmuleWebUI-Reloaded -endef - -$(eval $(call Download,AmuleWebUI)) -$(eval $(call BuildPackage,amule-dlp)) diff --git a/amule-dlp/patches/001_fix_empty_wxcharbuffer.patch b/amule-dlp/patches/001_fix_empty_wxcharbuffer.patch deleted file mode 100644 index 89931eb9e..000000000 --- a/amule-dlp/patches/001_fix_empty_wxcharbuffer.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 0a9c99fe35b68725036ed7109954327dffc31323 Mon Sep 17 00:00:00 2001 -From: kiddin9 <48883331+kiddin9@users.noreply.github.com> -Date: Sun, 12 Sep 2021 05:31:27 +0800 -Subject: [PATCH] Update Path.cpp - ---- - src/libs/common/Path.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/libs/common/Path.cpp b/src/libs/common/Path.cpp -index b70e937f2..0e162bbc3 100644 ---- a/src/libs/common/Path.cpp -+++ b/src/libs/common/Path.cpp -@@ -230,7 +230,7 @@ CPath::CPath(const wxString& filename) - } - - wxCharBuffer fn = filename2char(filename); -- if (fn.data() && fn.length()) { -+ if (fn.data()) { - // Filename is valid in the current locale. This means that - // it either originated from a (wx)system-call, or from a - // user with a properly setup system. diff --git a/amule-dlp/patches/002_enable_upnp_cross_compile.patch b/amule-dlp/patches/002_enable_upnp_cross_compile.patch deleted file mode 100644 index f6bccb9a1..000000000 --- a/amule-dlp/patches/002_enable_upnp_cross_compile.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/m4/libupnp.m4 -+++ b/m4/libupnp.m4 -@@ -57,7 +57,6 @@ dnl Test for --with-libupnp-prefix - ]) - - dnl Check for libupnp >= MIN_LIBUPNP_VERSION -- AS_IF([test $cross_compiling = no], [ - AC_MSG_CHECKING([for libupnp version >= MIN_LIBUPNP_VERSION]) - AS_IF([test -n "$PKG_CONFIG"], [ - AS_IF([$PKG_CONFIG libupnp --exists], [ -@@ -84,11 +83,6 @@ dnl Check for libupnp >= MIN_LIBUPNP_VER - ]) - AC_MSG_RESULT([$result$resultstr]) - libupnp_error="libupnp >= MIN_LIBUPNP_VERSION not found$resultstr" -- ], [ --dnl Currently cross-compilation with libupnp is not supported. -- result=no -- libupnp_error="cross compiling" -- ]) - - dnl Execute the right action. - AS_IF([test ${result:-no} = yes], [$2], [$3]) diff --git a/amule-dlp/patches/003_BanLowID.patch b/amule-dlp/patches/003_BanLowID.patch deleted file mode 100644 index 8b115a821..000000000 --- a/amule-dlp/patches/003_BanLowID.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff --git a/src/DLP.cpp b/src/DLP.cpp -index 7016598..d06c2d0 100644 ---- a/src/DLP.cpp -+++ b/src/DLP.cpp -@@ -62,6 +62,7 @@ bool DLP::DLPCheck(CUpDownClient* c){ - CString clientver(c->GetClientVerString()); - CString uname(c->GetUserName()); - CString uhash(wxString(c->GetUserHash().EncodeSTL().c_str(), wxConvUTF8)); -+ CString fullip(Uint32_16toStringIP_Port(c->GetConnectIP(),c->GetUserPort())); - - //CheckGhostMod - if(prefs & PF_GHOSTMOD) { -@@ -89,7 +90,6 @@ bool DLP::DLPCheck(CUpDownClient* c){ - } - } - -- - // Check VeryCD eMule - if ((prefs & PF_VERYCDEMULE) && (tmp == NULL)) { - if(modver.Find(wxT("VeryCD")) != wxNOT_FOUND){ -@@ -97,11 +97,16 @@ bool DLP::DLPCheck(CUpDownClient* c){ - tmp = ret.c_str(); - } - } -- -+ -+ if (c->HasLowID() && (tmp == NULL)) { -+ ret = _("Ban Low ID"); -+ tmp = ret.c_str(); -+ } -+ - if (tmp != NULL) { - ret = tmp; - wxString wxInfo; -- wxInfo.Printf(wxT("[%s] %s"), ret.c_str(), c->GetClientFullInfo().c_str()); -+ wxInfo.Printf(wxT("_%s_%s_%s_%s_%s"), uhash.c_str(), ret.c_str(), fullip.c_str(), clientver.c_str(), uname.c_str()); - c->Ban(); - theApp->AddDLPMessageLine(wxInfo); - return true; diff --git a/amule-dlp/patches/003_gcc_11.patch b/amule-dlp/patches/003_gcc_11.patch deleted file mode 100644 index 95a1ae654..000000000 --- a/amule-dlp/patches/003_gcc_11.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/src/libs/common/MuleDebug.cpp -+++ b/src/libs/common/MuleDebug.cpp -@@ -56,6 +56,7 @@ - - #include - -+#include - - /** - * This functions displays a verbose description of diff --git a/antileech/Makefile b/antileech/Makefile deleted file mode 100644 index fdac36d5c..000000000 --- a/antileech/Makefile +++ /dev/null @@ -1,58 +0,0 @@ -# -# Copyright (C) 2007-2021 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v3. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=antileech -PKG_VERSION:=2.3.2 -PKG_RELEASE:=15 - -#PKG_SOURCE:=antileech-2.3.1.tar.gz -#PKG_SOURCE_URL:=@SF/amule -#PKG_MD5SUM:=skip - -PKG_BUILD_DEPENDS:=libgd - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk - -define Package/antileech - SUBMENU:=P2P - SECTION:=net - CATEGORY:=Network - TITLE:=AntiLeech for amule - URL:=http://www.amule.org/ - DEPENDS:=+libc +libwxbase -endef - -TARGET_LDFLAGS += \ - -define Build/Prepare - mkdir -p $(PKG_BUILD_DIR) - $(CP) ./src/* $(PKG_BUILD_DIR)/ -endef - -define Build/Configure - sed -i "s:^AC_CHECK_PROG.WXCONFIG,.*::g" $(PKG_BUILD_DIR)/configure.ac - sed -i "s:wx-config --cppflags:$(STAGING_DIR)/usr/bin/wx-config --cppflags:g" $(PKG_BUILD_DIR)/configure.ac - cd $(PKG_BUILD_DIR) && sh ./autogen.sh - $(call Build/Configure/Default) -endef - -define Build/Compile - $(MAKE) -k -C $(PKG_BUILD_DIR) \ - HOSTCC="$(HOSTCC)" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install -endef - -define Package/antileech/install - $(INSTALL_DIR) $(1)/usr/share/amule - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/amule/libantiLeech.so $(1)/usr/share/amule -endef - -$(eval $(call BuildPackage,antileech)) diff --git a/antileech/src/CString_wx.h b/antileech/src/CString_wx.h deleted file mode 100644 index 30bf05187..000000000 --- a/antileech/src/CString_wx.h +++ /dev/null @@ -1,63 +0,0 @@ -/** - * Author: Bill Lee - * License: GNU GPL - */ -//--------------------- -#ifndef CSTRING_WX_H -#define CSTRING_WX_H - -//#include -#include - -class CString : public wxString{ - public: - CString(){} - CString(wxChar c, size_t n=1): wxString(c, n){} - CString(const wxChar* str): wxString(str){} - CString(const wxString& str): wxString(str){} - CString(const CString& str): wxString(str){} - //--------------------- - CString& operator=(const wxChar* str){ - wxString::operator=(str); - return *this; - } - //operator*() from wxString; - size_t GetLength()const{ return Length(); } - wxChar GetAt(size_t nIndex)const{ return GetChar(nIndex); } - //IsEmpty() from wxString; - CString& TrimLeft(wxChar c){ - size_t pos = find_first_not_of(c); - if(pos == 0) - return *this; - erase(0, pos); - return *this; - } - CString& TrimRight(wxChar c){ - size_t pos = find_last_not_of(c) + 1; - if(pos == Length()) - return *this; - erase(pos, Length() - pos); - return *this; - } - CString Trim(){ - CString ret(*this); - ret.wxString::Trim(false); /* wxString::Trim(bool fromright = true) */ - ret.wxString::Trim(true); - return ret; - } - //Find(wxChar) and Find(wxChar*) from wxString; - int Find(const CString& str)const{ return wxString::Find(str.c_str()); } - int ReverseFind(const wxChar c)const{ return wxString::Find(c, true); } - int ReverseFind(const wxChar* str)const{ return rfind(str); } - int ReverseFind(const CString& str)const{ return rfind(str); } - CString Right(size_t len)const{ return wxString::Right(len); } - CString Left(size_t len)const{ return wxString::Left(len); } -#if wxCHECK_VERSION(2, 9, 0) - CString Mid(size_t first, size_t count = wxString::npos)const{ -#else - CString Mid(size_t first, size_t count = wxSTRING_MAXLEN)const{ -#endif - return wxString::Mid(first, count); - } -}; -#endif diff --git a/antileech/src/Interface.cpp b/antileech/src/Interface.cpp deleted file mode 100644 index 7dae76584..000000000 --- a/antileech/src/Interface.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* - * ===================================================================================== - * - * Filename: Interface.cpp - * - * Description: A part of aMule DLP - * - * Created: 2011-02-24 19:49 - * - * Author: Bill Lee , bill.lee.y@gmail.com - * - * Copyright (c) 2011, Bill Lee - * License: GNU General Public License - * - * ===================================================================================== - */ - -/* ##### HEADER FILE INCLUDES ################################################### */ -#include "antiLeech.h" - -/* ##### FUNCTION DEFINITIONS - EXPORTED FUNCTIONS ############################ */ -extern "C" IantiLeech* createAntiLeechInstant(){ - return new CantiLeech; -} -extern "C" int destoryAntiLeechInstant(IantiLeech* ptr){ - delete ptr; - return 0; -} diff --git a/antileech/src/Makefile.am b/antileech/src/Makefile.am deleted file mode 100644 index 696a1bb2a..000000000 --- a/antileech/src/Makefile.am +++ /dev/null @@ -1,16 +0,0 @@ -AUTOMAKE_OPTIONS = foreign - -pkgdir = $(datadir)/amule -ACLOCAL_AMFLAGS = -I m4 - -pkg_LTLIBRARIES = libantiLeech.la -libantiLeech_la_CPPFLAGS = ${ANTILEECH_CPPFLAGS} -libantiLeech_la_LDFLAGS = ${ANTILEECH_LDFLAGS} -module -avoid-version --no-la-files -libantiLeech_la_SOURCES = \ - antiLeech.h \ - antiLeech_wx.h \ - CString_wx.h \ - antiLeech.cpp \ - antiLeech_wx.cpp \ - Interface.cpp - diff --git a/antileech/src/antiLeech.cpp b/antileech/src/antiLeech.cpp deleted file mode 100644 index 42a173e88..000000000 --- a/antileech/src/antiLeech.cpp +++ /dev/null @@ -1,1733 +0,0 @@ -//DLP = Dynamic Leecher Protection -//this code is part of Xtreme-Mod -//author: Xman - -//This program is free software; you can redistribute it and/or -//modify it under the terms of the GNU General Public License -//as published by the Free Software Foundation; either -//version 2 of the License, or (at your option) any later version. -// -//This program is distributed in the hope that it will be useful, -//but WITHOUT ANY WARRANTY; without even the implied warranty of -//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//GNU General Public License for more details. -// -//You should have received a copy of the GNU General Public License -//along with this program; if not, write to the Free Software -//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - -#include "CString_wx.h" -#include "antiLeech.h" -#define __declspec(var) CantiLeech:: -#define SPECIAL_DLP_VERSION -#define ALL_VERYCD_MOD - -#ifdef _DEBUG -#define new DEBUG_NEW -#endif - -//>>> eWombat [SNAFU_V3] -LPCTSTR apszSnafuTag[]= -{ - _T("[DodgeBoards]"), //0 - _T("[DodgeBoards & DarkMule eVorteX]"), //1 - _T("[DarkMule v6 eVorteX]"), //2 - _T("[eMuleReactor]"), //3 - _T("[Bionic]"), //4 - _T("[LSD7c]"), //5 - _T("[0x8d] unknown Leecher - (client version:60)"), //6 - _T("[RAMMSTEIN]"), //7 - _T("[MD5 Community]"), //8 - _T("[new DarkMule]"), //9 - _T("[OMEGA v.07 Heiko]"), //10 - _T("[eMule v0.26 Leecher]"), //11 - _T("[Hunter]"), //12 - _T("[Bionic 0.20 Beta]"), //13 - _T("[Rumata (rus)(Plus v1f)]"), //14 - _T("[Fusspi]"), //15 - _T("[donkey2002]"), //16 - _T("[md4]"), //17 - _T("[SpeedMule]"), //18 Xman - _T("[pimp]") //19 Xman - ,_T("[Chinese Leecher]") //20 SquallATF - //,_T("[eChanblardNext]") //21 zz_fly -}; - -const DWORD CantiLeech::DLPVersion = 4405; - -//deactivate M$WIN-specific codes -#if 0 -BOOL WINAPI DllMain ( - HANDLE hModule, - DWORD dwFunction, - LPVOID lpNot) -{ - switch (dwFunction) - { - case DLL_PROCESS_ATTACH: - case DLL_THREAD_ATTACH: - case DLL_THREAD_DETACH: - case DLL_PROCESS_DETACH: - break; - } - - return TRUE; -} - - -void __declspec(dllexport) TestFunc() -{ - ::MessageBox(NULL,_T("Inside the DLL!"),_T("Nix"),0); -} -#endif - -//old versions just to keep compatible -/* //drop old version support -LPCTSTR __declspec(dllexport) DLPCheckModstring(LPCTSTR modversion, LPCTSTR clientversion) -{ - if(modversion==NULL || clientversion==NULL) - return NULL; - - if (StrStrI(modversion,_T("Freeza"))|| - StrStrI(modversion,_T("d-unit"))|| - //StrStrI(modversion,_T("NOS"))|| //removed for the moment - StrStrI(modversion,_T("imperator"))|| - StrStrI(modversion,_T("SpeedLoad"))|| - StrStrI(modversion,_T("gt mod"))|| - StrStrI(modversion,_T("egomule"))|| - StrStrI(modversion,_T("aldo"))|| - StrStrI(modversion,_T("darkmule"))|| - StrStrI(modversion,_T("LegoLas"))|| - StrStrI(modversion,_T("dodgethis"))|| //Updated - StrStrI(modversion,_T("DM-"))|| - StrStrI(modversion,_T("|X|"))|| - StrStrI(modversion,_T("eVorte"))|| - StrStrI(modversion,_T("Mison"))|| - StrStrI(modversion,_T("father"))|| - StrStrI(modversion,_T("Dragon"))|| - StrStrI(modversion,_T("booster"))|| //Temporaly added, must check the tag - StrStrI(modversion,_T("$motty"))|| - StrStrI(modversion,_T("Thunder"))|| - StrStrI(modversion,_T("BuzzFuzz"))|| - StrStrI(modversion,_T("Speed-Unit"))|| - StrStrI(modversion,_T("Killians"))|| - StrStrI(modversion,_T("Element"))|| - StrStrI(modversion,_T("§¯Å]"))|| - StrStrI(modversion,_T("Rappi"))|| - StrStrI(modversion,_T("EastShare")) && StrStrI(clientversion,_T("0.29"))|| - StrStrI(modversion,_T("eChanblard v7.0")) || - //StrStrI(modversion,_T("ACAT")) || - StrStrI(modversion,_T("!FREEANGEL!")) || - StrStrI(modversion,_T(" ")) || - StrStrI(modversion,_T("Stonehenge")) || - StrStrI(modversion,_T("@RAPTOR")) || - StrStrI(modversion,_T("pwNd muLe")) || - StrStrI(modversion,_T("HARDPAW")) || - StrStrI(modversion,_T("XXL")) || - StrStrI(modversion,_T("LSD")) || - StrStrI(modversion,_T("Rockesel")) || //WiZaRd - StrStrI(modversion,_T("Bad Donkey")) || //WiZaRd - StrStrI(modversion,_T("DSL-Light-Client")) || //WiZaRd - StrStrI(modversion,_T("Elben")) || //WiZaRd - StrStrI(modversion,_T("PROeMule")) || //WiZaRd - StrStrI(modversion,_T("OO.de")) || //WiZaRd - StrStrI(modversion,_T("00.de")) || //WiZaRd - StrStrI(modversion,_T("OOde")) || //WiZaRd - StrStrI(modversion,_T("00de")) || - StrStrI(modversion,_T("Devil")) || - StrStrI(modversion,_T("Elfen")) || - StrStrI(modversion,_T("Ef-mod ")) || //Xman this mod can be abused as a full leecher - StrStrI(modversion,_T("HARDMULE")) || - StrStrI(modversion,_T("Xtreme Xtended")) || //Xman 15.08.05 - StrStrI(modversion, _T("MirageMod"))|| // " - StrStrI(modversion, _T("SpeedX"))|| - StrStrI(modversion, _T("AIDEADSL"))|| - StrStrI(modversion, _T("Hypnotix"))|| - StrStrI(modversion, _T("blackviper"))|| - StrStrI(modversion, _T("BlackAngel"))|| - StrStrI(modversion, _T("Community"))|| - StrStrI(modversion, _T("rabbit"))|| - StrStrI(modversion, _T("rabb_it"))|| - StrStrI(modversion, _T("Speedmule"))|| - StrStrI(modversion, _T("Raptor"))|| - StrStrI(modversion, _T("Hawkstar"))|| - StrStrI(modversion, _T("ServerClient"))|| - StrStrI(modversion, _T("Love-Angel"))|| - StrStrI(modversion, _T("SuperKiller"))|| - StrStrI(modversion, _T("Ultimativ"))|| - StrStrI(modversion, _T("uptempo"))|| - StrStrI(modversion, _T("ZamBoR"))|| - StrStrI(modversion, _T("Arabella"))|| - StrStrI(modversion,_T("Morph")) && (StrStrI(modversion,_T("Max")) || StrStrI(modversion,_T("+")) || StrStrI(modversion,_T("×"))) || - StrStrI(modversion, _T("Morph XT"))|| //very bad mod (MPAA ?) - StrStrI(modversion, _T("BlueHex"))|| - StrStrI(modversion, _T("FlowerPower"))|| - StrStrI(modversion, _T("Fincan"))|| - StrStrI(modversion, _T("Heartbreaker"))|| - StrStrI(modversion, _T("Administrator"))|| - StrStrI(modversion, _T("B@d-D3vi7"))|| - StrStrI(modversion, _T("CryptedSpeed"))|| - StrStrI(modversion, _T("DarkDragon"))|| - StrStrI(modversion, _T("OS_"))|| //Xman most are found via other checks, but not all - _tcslen(modversion) > 0 && (StrStrI(clientversion,_T("edonkey")) || modversion[0]==_T('[')) || //1. donkey user with modstring, 2. modstring begins with [ this is a known leecher - (StrStrI(modversion, _T("Xtreme")) && StrStrI(modversion, _T("]"))) //bad Xtreme mod - ) - return _T("Bad MODSTRING"); - - return NULL; -} - -LPCTSTR __declspec(dllexport) DLPCheckUsername(LPCTSTR username) -{ - if(username==NULL) - return NULL; - - if (StrStrI(username,_T("$GAM3R$"))|| - StrStrI(username,_T("G@m3r"))|| - StrStrI(username,_T("$WAREZ$"))|| - //StrStrI(username,_T("RAMMSTEIN"))||// //Xman 21.06.05 SNAFU should filter the right ones out - //StrStr(username,_T("toXic"))|| //Xman 19.10.05 too old - StrStrI(username,_T("Leecha"))|| - StrStr(username,_T("eDevil"))|| - StrStrI(username,_T("darkmule"))|| - //StrStrI(username,_T("phArAo"))|| //Xman 19.10.05 too old - //StrStrI(username,_T("dodgethis"))|| //Xman 21.06.05 not seen for a long time - StrStrI(username,_T("Reverse"))|| - //StrStrI(username,_T("eVortex"))|| //Xman didn't see it for a long time - //StrStrI(username,_T("|eVorte|X|"))|| //" - //StrStrI(username,_T("Chief"))|| //Xman 17.5.08 old and no more needed - StrStrI(username,_T("$motty"))|| - StrStrI(username,_T("emule-speed"))|| - StrStrI(username,_T("celinesexy"))|| - StrStrI(username,_T("Gate-eMule"))|| - StrStrI(username,_T("energyfaker"))|| - StrStrI(username,_T("BuzzFuzz"))|| - StrStrI(username,_T("Speed-Unit"))|| - StrStrI(username,_T("Killians"))|| - StrStrI(username,_T("pubsman"))|| - StrStrI(username,_T("emule-element"))|| - StrStrI(username,_T("00de.de"))|| - StrStrI(username,_T("00de")) || - StrStrI(username,_T("OO.de"))|| - StrStrI(username,_T("OOde")) || - StrStrI(username,_T("emule")) && StrStrI(username,_T("booster")) || - StrStrI(username,_T("Rappi")) || - StrStrI(username,_T("Ketamine")) || - StrStrI(username,_T("HARDMULE")) || - StrStrI(username,_T("emuleech")) || - //Xman 15.08.05 - StrStrI(username, _T("SchlumpMule"))|| //" - StrStrI(username, _T("Safty´s"))|| - StrStrI(username, _T("UnKnOwN pOiSoN"))|| - StrStrI(username, _T("ElfenPower"))|| - StrStrI(username, _T("eMule Cow"))|| - StrStrI(username, _T("Freezamule"))|| - StrStr(username, _T("EGOmule"))|| - StrStrI(username, _T("-=EGOist=-"))|| - StrStrI(username, _T("FreezaVamp"))|| - StrStrI(username, _T("Muli_Checka"))|| - StrStr(username, _T("PrOjEcT-SaNdStOrM"))|| - StrStr(username, _T("NotHer eDitiOn"))|| - StrStrI(username, _T("eSl@d3vil"))|| - StrStrI(username, _T(" AgentSmith"))|| - StrStrI(username, _T("rabb_it"))|| - StrStrI(username, _T("ServerClient"))|| - StrStrI(username, _T(">>Power-Mod"))|| - StrStr(username, _T("DM_X"))|| //darkmule - StrCmpI(username, _T("Muse"))==0 || //ketamine mod - StrStr(username, _T("ZamBoR"))|| - StrStr(username, _T("emule.razorback3.com"))|| - - StrStrI(username,_T("[LSD.19")) //Xman 21.06.2005 definitive not a good mod, with protocol bugs - ) - return _T("Bad USERNAME"); - - //bad mods, where every second sign is - //enough to check two places - - if(_tcslen(username) >=4 - && username[3]<=0x1F - && username[1]<=0x1F - ) - return _T("Leecher-Username"); - - return NULL; -} - -LPCTSTR __declspec(dllexport) DLPCheckNameAndHash(CString username, CString& userhash) -{ - if(username.IsEmpty() || userhash.IsEmpty()) - return NULL; - - //community check - if(username.GetLength()>=7 && username.Right(1)==_T("]")) - { - //check for gamer - //two checks should be enough. - if(username.Right(6).Left(1)==userhash.Mid(5,1) - && username.Right(3).Left(1)==userhash.Mid(7,1) - ) - return _T("Gamers"); - //check for snake - int find=username.ReverseFind(_T('[')); - if(find>=0) - { - CString addon=username.Mid(find+1); - int endpos=addon.GetLength()-1; - for(int i=0; i=_T('0') && addon.GetAt(i)<=_T('9')) ) - { - i=endpos+1; - } - } - if(i==endpos) - return _T("Snake"); - } - } - - return NULL; -} -*/ -//end old version ------------------------------------------ - -bool CantiLeech::IsTypicalHex(const CString& addon) -{ - if(addon.GetLength()>25 || addon.GetLength()<5) - return false; - short bigalpha=0; - short smallalpha=0; - short numeric=0; - - int endpos=addon.GetLength(); - int i = 0; - for(i=0;i=_T('0') && addon.GetAt(i)<=_T('9')) ) - numeric++; - else if( (addon.GetAt(i)>=_T('A') && addon.GetAt(i)<=_T('F')) ) - bigalpha++; - else if( (addon.GetAt(i)>=_T('a') && addon.GetAt(i)<=_T('f')) ) - smallalpha++; - else - break; - } - if(i==endpos) - { - if(numeric>0 && - (smallalpha>0 && bigalpha==0 || smallalpha==0 && bigalpha>0) - ) - return true; - } - return false; -} - -LPCTSTR __declspec(dllexport) DLPCheckUserhash(const PBYTE userhash) -{ - // No more AJ check - return NULL; -} - -//new versions -LPCTSTR __declspec(dllexport) DLPCheckModstring_Hard(LPCTSTR modversion, LPCTSTR clientversion) -{ - if(modversion==NULL || clientversion==NULL) - return NULL; - - if(_tcsstr(clientversion, L"eMule Compat v0.26.2")) - return L"Flashget"; - - if ( -//Chinese Leecher - http://forum.emule-project.net/index.php?showtopic=134097&hl= - _tcsstr(modversion,L"TM0910") || -//Chinese Leecher - http://forum.emule-project.net/index.php?showtopic=134097&hl= - //StrStrI(modversion,_T("Freeza"))|| - StrStrI(modversion,_T("FXeMule"))|| - StrStrI(modversion,_T("FX eMule"))|| - StrStrI(modversion,_T("RIAA"))|| - //StrStrI(modversion,_T("d-unit"))|| - //StrStrI(modversion,_T("NOS"))|| //removed for the moment - //StrStrI(modversion,_T("imperator"))|| - StrStrI(modversion,_T("SpeedLoad"))|| - //StrStrI(modversion,_T("gt mod"))|| //outdated - //StrStrI(modversion,_T("egomule"))|| //outdated - //StrStrI(modversion,_T("aldo"))|| //outdated - //StrStrI(modversion,_T("darkmule"))|| //outdated - //StrStrI(modversion,_T("LegoLas"))|| - //StrStrI(modversion,_T("dodgethis"))|| //Updated - //StrStrI(modversion,_T("DM-"))|| - //StrStrI(modversion,_T("|X|"))|| - //StrStrI(modversion,_T("eVorte"))|| - //StrStrI(modversion,_T("Mison"))|| - //StrStrI(modversion,_T("father"))|| - //StrStrI(modversion,_T("Dragon"))|| - //StrStrI(modversion,_T("$motty"))|| - //StrStrI(modversion,_T("Thunder"))|| - //StrStrI(modversion,_T("BuzzFuzz"))|| - //StrStrI(modversion,_T("Speed-Unit"))|| - //StrStrI(modversion,_T("Killians"))|| - StrStrI(modversion,_T("Element"))|| - //StrStrI(modversion,_T("§¯Å]"))|| //outdated - StrStrI(modversion,_T("Rappi"))|| - StrStrI(modversion,_T("EastShare")) && StrStrI(clientversion,_T("0.29"))|| - StrStrI(modversion,_T("eChanblard v7.0")) || - //StrStrI(modversion,_T("ACAT")) || - //StrStrI(modversion,_T("!FREEANGEL!")) || - StrStrI(modversion,_T(" ")) || - //StrStrI(modversion,_T("Stonehenge")) || - StrStrI(modversion,_T("@RAPTOR")) || - StrStr(modversion,_T("pwNd muLe")) || - StrStrI(modversion,_T("HARDPAW")) || - //StrStrI(modversion,_T("XXL")) || - StrStrI(modversion,_T("LSD")) || - StrStrI(modversion,_T("Bad Donkey")) || //WiZaRd - StrStrI(modversion,_T("DSL-Light-Client")) || //WiZaRd - StrStrI(modversion,_T("Elben")) || //WiZaRd - StrStr(modversion,_T("PROeMule")) || //WiZaRd - StrStrI(modversion,_T("Devil")) || - StrStrI(modversion,_T("Elfen")) || - StrStrI(modversion,_T("Ef-mod 2.0 ")) || //Xman this mod can be abused as a full leecher - StrStrI(modversion,_T("Xtreme Xtended")) || //Xman 15.08.05 - StrStrI(modversion, _T("MirageMod"))|| // " - StrStrI(modversion, _T("SpeedX"))|| - StrStrI(modversion, _T("AIDEADSL"))|| - StrStrI(modversion, _T("Hypnotix"))|| - StrStrI(modversion, _T("BLACKMULE"))|| - StrStrI(modversion, _T("blackviper"))|| - StrStrI(modversion, _T("BlackAngel"))|| - StrStrI(modversion, _T("rabbit"))|| - StrStrI(modversion, _T("rabb_it"))|| - StrStrI(modversion, _T("Raptor"))|| - StrStrI(modversion, _T("Hawkstar"))|| - StrStrI(modversion, _T("ServerClient"))|| - StrStrI(modversion, _T("Love-Angel"))|| - StrStrI(modversion, _T("SuperKiller"))|| - StrStrI(modversion, _T("ZamBoR"))|| - StrStrI(modversion,_T("Morph")) && (StrStrI(modversion,_T("Max")) || StrStrI(modversion,_T("+")) || StrStrI(modversion,_T("×"))) || - StrStrI(modversion, _T("Morph XT"))|| //very bad mod (MPAA ?) - StrStrI(modversion, _T("Mørph"))|| - StrStrI(modversion, _T("BlueHex"))|| - StrStrI(modversion, _T("FlowerPower"))|| - StrStrI(modversion, _T("Fincan"))|| - StrStrI(modversion,_T("OO.de")) || //WiZaRd - StrStrI(modversion,_T("00.de")) || //WiZaRd - StrStrI(modversion,_T("OOde")) || //WiZaRd - StrStrI(modversion,_T("00de")) || - StrStrI(modversion, _T("OS_")) || //Xman most are found via other checks, but not all - StrStrI(modversion, _T("Heartbreaker"))|| - StrStrI(modversion, _T("Arabella"))|| - StrStrI(modversion, _T("Administrator"))|| - StrStrI(modversion, _T("B@d-D3vi7"))|| - StrStrI(modversion, _T("Dying Angel"))|| - StrStrI(modversion, _T("FREAK MOD VENOM"))|| - StrStrI(modversion, _T("CryptedSpeed"))|| - StrStrI(modversion, _T("h34r7b34k3r"))|| - StrStrI(modversion, _T("Exorzist"))|| - StrStrI(modversion, _T("A.i.d.e-A.D.S.L"))|| - StrStrI(modversion, _T("albaR"))|| - StrStrI(modversion, _T("AngelDr"))|| //5/2006 - StrStrI(modversion, _T("Tombstone Reloaded"))|| //5/2006 - StrStrI(modversion, _T("Tombstone Next"))|| //10/2006 - StrStrI(modversion, _T("pP.r8b"))|| //5/2006 - StrStrI(modversion, _T("x0Rz!$T"))|| //E/€xorzist - StrStrI(modversion, _T("€xORz!§T"))|| - _tcsstr(clientversion,_T("eMule Compat v0.40")) || //7/2006 - _tcsstr(clientversion,_T("eMule Compat v127.")) || //8/2006 - StrStrI(modversion, _T("No Ratio"))|| //based on scarangel 7/2006 - StrStrI(modversion, _T("DeathAngel"))|| //based on Xtreme 8/2006 - StrStrI(modversion, _T("PROemule"))|| //9/2006 - StrStrI(modversion, _T("Simple Leecher"))|| //9/2006 - StrStrI(modversion, _T("oFF *+*"))|| //10/2006 - StrStrI(modversion, _T("0FF "))|| //6/2007 - StrStrI(modversion, _T("SmartMuli"))|| //12/2006 - StrStrI(modversion, _T("D10T"))|| //12/2006 - StrStrI(modversion, _T("the fonz"))|| //12/2006 - StrStrI(modversion, _T("TurkMule"))|| //1/2007 - StrStrI(modversion, _T("Hyperdrive"))|| //1/2007 - StrStrI(modversion, _T("NextEvolution"))|| //1/2007 - StrStrI(modversion, _T("Pimp"))|| //3/2007 - StrStrI(modversion, _T("XDP "))|| //6/2007 - StrStrI(modversion, _T("AeOnFlux"))|| //8/2007 - //8/2007 from dlarge: - StrStrI(modversion, _T("Final Fight"))|| //added dlarge - StrStrI(modversion, _T("Fireball"))|| //added dlarge "standart String" - StrStrI(modversion, _T("SunPower"))|| //added dlarge "standart String" - StrStrI(modversion, _T("SuperKiller"))|| //added dlarge - StrStrI(modversion, _T("X-Cite"))|| //added dlarge - StrStrI(modversion, _T("waZZa"))|| //added dlarge - StrStrI(modversion, _T("Merza"))|| //added dlarge - StrStrI(modversion, _T("K.O.T."))|| //added dlarge - StrStrI(modversion, _T("Licokine"))|| //added dlarge - StrStrI(modversion, _T("BlackStar"))|| //added dlarge - StrStrI(modversion, _T("nEwLoGic"))|| //added dlarge - //end - StrStrI(modversion, _T("Applejuice"))|| //6/2007 now ban instead score reduce -//more AJ modstrings - StrStrI(modversion, L"Wikinger") || - StrStrI(modversion, L"ROCKFORCE") || - StrStrI(modversion, L"RC-ATLANTIS") || -//more AJ modstrings -//zz_fly Start - //modstring of XL - _tcsstr(modversion, _T("20071122")) || _tcsstr(modversion, _T("20080228")) || - _tcsstr(modversion, _T("080620")) || _tcsstr(modversion, _T("080307")) || - _tcsstr(modversion, _T("080509")) || _tcsstr(modversion, _T("20080505")) || - _tcsstr(modversion, _T("v 080828")) || _tcsstr(modversion, _T("XL8828")) || - _tcsstr(modversion, _T("build 11230")) || _tcsstr(modversion, _T("20080923")) || - _tcsstr(modversion, _T("ZZULL")) || _tcsstr(modversion, _T("XunaLei")) || - _tcsstr(modversion, _T("XunL")) || _tcsstr(modversion, _T("Xthunder")) || - _tcsstr(modversion, _T("xl build")) || - //end - _tcsstr(modversion, _T("FreeCD")) || //BitComet, changed to hardban - _tcsstr(modversion, _T("PlayMule")) || //PlayMule - ( !CString(modversion).IsEmpty() && CString(modversion).Trim().IsEmpty() ) || //pruma, korean leecher, modversion is a space - _tcsstr(modversion,_T("VMULE")) || //israel - StrStrI(modversion,_T("Goop.co.il")) || - StrStrI(modversion,_T("Razorback")) || - StrStrI(modversion,_T("UlTiMaTiC ")) || //based on MA 3.5 - StrStrI(modversion,_T("Peizheng")) || //gpl-breaker - _tcsstr(modversion,_T("amule")) || //fake version, amule never write a modstring here - _tcsstr(modversion,_T("Amule")) || - //2010/5/29 - _tcsstr(modversion,_T("miniMule")) || //a compatible client, but without share file option. - StrStrI(modversion,_T("EYE888")) || //compatible client in china, but no src - StrStrI(modversion,_T("WebeSo")) || //compatible client in china, but no src //Chengr28 - (_tcsstr(modversion,_T(" 091113")) && !_tcsstr(modversion,_T("VeryCD"))) || //compatible client in china, but no src //tetris - StrStrI(modversion,_T("Unbuyi")) || //a client announced that it is based on a its framework, but in fact it just copy VeryCD's code //Chengr28 - //2010/12/11 - _tcsstr(modversion, _T("easyMule2")) || //protocol bug, lack maintaince, ban -//zz_fly End - _tcsstr(modversion, _T("Neo-R")) || - _tcsstr(modversion, _T("Neo-RS")) || - StrStrI(modversion, _T("Apace")) || - StrStrI(modversion, _T("L!()Netw0rk")) || - StrStrI(modversion, _T("L!ONetwork")) || - StrStrI(modversion, _T("l!onet"))|| - StrStrI(modversion, _T("l!0net"))|| - StrStrI(modversion, _T("lionet"))|| - StrStrI(modversion, _T("li0net"))|| - StrStrI(modversion, _T("li()net"))|| - StrStrI(modversion, _T("L!()Net"))|| - StrStrI(modversion, _T("800STER")) || - StrStrI(modversion, _T("8OOSTER")) || - StrStrI(modversion, _T("BOO$T")) || - StrStrI(modversion, _T("B00ST")) || - StrStrI(modversion, _T("T-L-N BO0ST")) || //by briandgwx - StrStrI(modversion, _T("T L N B O O S T")) || //by taz-me - StrStrI(modversion, _T("iberica")) || //by briandgwx -//from **Riso64Bit** - _tcsstr(modversion, _T("Thor ")) || - _tcsstr(modversion, _T("DeSfAlko")) || - _tcsstr(modversion, _T("The Killer Bean")) || - _tcsstr(modversion, _T("ZZ-R ")) || - _tcsstr(modversion, _T("ZZ-RS ")) || - _tcsstr(modversion, _T("Reptil-Crew-3")) || - _tcsstr(modversion, _T("Anonymous Mod")) || - StrStrI(modversion, _T("NFO.Co.iL")) || - _tcsstr(modversion, _T("Down.co.il")) || - _tcsstr(modversion, _T("Red Projekt")) || - _tcsstr(modversion, _T("centraldivx.com")) || //no source - StrStrI(modversion, _T("emule.co.il")) || - StrStrI(modversion, _T("Fire eMule")) || - StrStrI(modversion, _T("PirateMule")) || - StrStrI(modversion, _T("HighTime")) || - StrStrI(modversion, _T("GPS2Crew")) || - StrStrI(modversion, _T("TLN eMule")) || - StrStrI(modversion, _T("DVD-RS")) || - _tcsstr(modversion, _T("ZZULtimativ-R")) || - _tcsstr(modversion, _T("Div eMule")) || - _tcsstr(modversion, _T("Pwr eMule")) || - //_tcsstr(modversion, _T("VipeR")) || //it become good - _tcsstr(modversion, _T("Methadone")) || - _tcsstr(modversion, _T("Titandonkey")) || - _tcsstr(modversion, _T("SpeedShare")) || - _tcsstr(modversion, _T("Wodan")) || - _tcsstr(modversion, _T("Sikombious")) || - _tcsstr(modversion, _T("HyperTraxx")) || - _tcsstr(modversion, _T("Div pro")) || - _tcsstr(modversion, _T("GangBang")) || - _tcsstr(modversion, _T("WarezFaw")) || - _tcsstr(modversion, _T("Rastak")) || - _tcsstr(modversion, _T("Okinawa")) || - _tcsstr(modversion, _T("Hiroshima")) || - _tcsstr(modversion, _T("Kamikaze")) || - _tcsstr(modversion, _T("Yotoruma")) || - _tcsstr(modversion, _T("Nagasaki")) || - _tcsstr(modversion, _T("Addiction")) || - _tcsstr(modversion, _T("Bondage")) || - _tcsstr(modversion, _T("eMuleLife")) || - StrStrI(modversion, _T("PP-edition")) || - StrStrI(modversion, _T("ZZULtra")) || - _tcsstr(modversion, _T("eMulix")) || - _tcsstr(modversion, _T("BigBang")) || - _tcsstr(modversion, _T("PR0 ")) || //0(zero) - _tcsstr(modversion, _T("PRO ")) || //o - _tcsstr(modversion, _T("LoCMuLe")) || - _tcsstr(modversion, _T("Flux ")) || - //_tcsstr(modversion, _T("Aurora")) || - //_tcsstr(modversion, _T("Alias")) || //although it is the base-version of leechermods, but it has no leecher function, unban it - //_tcsstr(modversion, _T("R-Mod"))|| //same as Alias - _tcsstr(modversion, _T("UniATeam")) || - StrStrI(modversion, _T("Torenkey")) || - StrStrI(modversion, _T("RSVCD")) || - _tcsstr(modversion, _T("BlueEarth")) || - _tcsstr(modversion, _T("RocketMule")) || - _tcsstr(modversion, _T("eMule 0.4")) || //some bad mods write clientversion in modstring - _tcsstr(modversion, _T("Emule")) || - _tcsstr(modversion, _T("eMule v")) || - _tcsstr(modversion, _T("OrAnGe")) || - StrStrI(modversion, _T("Evil Mod")) || - StrStrI(modversion, _T("StulleMule v")) || //real modstring is "StulleMule #.#", no 'v' - StrStrI(modversion, _T("X-Ray v")) || - StrStrI(modversion, _T("Ulti F"))|| - StrStrI(modversion, _T("ChímÊrÂ"))|| - StrStrI(modversion, _T("ÇhïmerÀ"))|| - StrStrI(modversion, _T("Plus Plus"))|| //some of them did not banned in bin - _tcsstr(modversion, _T("UMatic"))|| - _tcsstr(modversion, _T("BRAZILINJAPAN"))|| //no source - StrStrI(modversion, _T("Pigpen"))|| - _tcsstr(modversion, _T("TCMod"))|| - StrStrI(modversion, _T("UltiMatiX"))|| - _tcsstr(modversion, _T("Perestroika"))|| - _tcsstr(modversion, _T("Ebola")) || - StrStrI(modversion, _T("StulleMule Plus")) || - _tcsstr(modversion, _T("DVD-START.COM")) || - (_tcsicmp(clientversion, _T("eMule"))==0) || //the client did not send client version - _tcsstr(modversion, _T("Penthotal")) || - _tcsstr(clientversion,_T("eMule Compat v2.1")) || //+Ultra - //_tcsstr(modversion, _T("TSmod")) || - _tcsstr(modversion, _T("Okaemule")) || - _tcsstr(modversion, _T("Okamula")) || - _tcsstr(modversion, _T("Potenza")) || - _tcsstr(modversion, _T("AntraX MoD")) || - //_tcsstr(modversion, _T("Picapica")) || - //_tcsstr(modversion, _T("PeaceMule")) || - _tcsstr(modversion, _T("0.49b")) || - _tcsstr(modversion, _T("0.49c")) || - _tcsstr(modversion, _T("Metha")) || - //_tcsstr(modversion, _T("XTreme")) || move to fake area - //newlines 2009/11/8 - _tcsstr(modversion, _T("UMatiX-45a")) || - StrStrI(modversion, _T("maultierpower")) || // maultier-power.com sponsorize applejuice - StrStrI(modversion, _T("PoWeR MoD")) || - StrStrI(modversion, _T("UltiAnalyzer")) || - StrStrI(modversion, _T("UBR-Mod")) || - //2009/11/29 - StrStrI(modversion, _T("UltraFast")) || //thl - //2010/4/4 - _tcsstr(modversion, _T("Devils Mod")) || - StrStrI(modversion, _T("-XDP-")) || - //2010/6/6 - _tcsstr(modversion, _T("Sharinghooligan")) || -//end -//from XRAY antileecher start - StrStrI(modversion, L"SPEED EMULE") || //MyTh - StrStrI(modversion, L"SPIKE2 +") || //MyTh hard leecher - //StrStrI(modversion, L"Adunanza") || //MyTh italian ISP-spec com user - StrStrI(modversion, L"Asiklar") || //MyTh apple-com - StrStrI(modversion, L"Shadow") || //MyTh - StrStrI(modversion, L"EPB") || //MyTh - StrStrI(modversion, L"Tyrantmule") || //MyTh - StrStrI(modversion, L"APRC") || //MyTh - StrStrI(modversion, L"Hardstyle") || //MyTh - StrStrI(modversion, L"pP.r12b") || //MyTh - StrStrI(modversion, L"Simple Life") || //MyTh - StrStrI(modversion, L"TYRANUS") || //MyTh - StrStrI(modversion, _T("[OO.de-L33CH4")) || //Stulle - ( StrStrI(modversion, _T("sivka v12e8")) && StrStrI(clientversion, L"0.42e") ) || //m_nClientVersion != MAKE_CLIENT_VERSION(0, 42, 4) // added - Stulle - StrStrI(modversion, L"RapCom") || //added dlarge - StrStrI(modversion, L"SBI leecher") || //added dlarge - StrStrI(modversion, L"TS Next Lite") || //added dlarge -//from XRAY antileecher end - StrStrI(modversion, L"Dein Modstring") || // JvA: moved up from soft because also used by Applejuice - StrStrI(modversion, L"Angelmule") || // JvA: no sources, no changelog, community username,... - StrStrI(modversion, L"TR-P2P-MoD") || // JvA: bad client - StrStrI(modversion, L"Esekci") || // JvA: no sources, no changelog, ... - StrStrI(modversion, L"MaGiX") || // default modstring if activated and unchanged - StrStrI(modversion, L"MorphJC") || // bad 'Justice CS' and PBF for incomplete files - _tcslen(modversion) > 0 && (StrStrI(clientversion,_T("edonkey")) || modversion[0]==_T('[')) || //1. donkey user with modstring, 2. modstring begins with [ this is a known leecher - (StrStrI(modversion, _T("Xtreme")) && StrStrI(modversion, _T("]"))) //bad Xtreme mod - ) - return _T("Bad MODSTRING"); - if(_tcsstr(modversion, _T("xtreme")) || _tcsstr(modversion, _T("XTreme"))) //case sensitive! - return _T("Fake Xtreme"); - -//zz_fly :: fake modstring area -//move some entries from above - if(((_tcsstr(modversion, _T("MorphXT v9.6")) || _tcsstr(modversion, _T("Xtreme 7")) || _tcsstr(modversion, _T("ZZUL Plus 1"))) && _tcsstr(clientversion, _T("0.48a"))) || //should not 0.48a - _tcsstr(modversion, _T("NetF WARP 9")) || //should be NetF WARP 0.3a.9 - _tcsstr(modversion, _T("VeryCD 080126")) || //Fake VeryCD - _tcsstr(modversion, _T("VeryCD 080730")) || //Fake VeryCD - _tcsstr(modversion, _T("VeryCD 080509")) || //Fake VeryCD - _tcsstr(modversion, _T("VeryCD 080606")) || //Fake VeryCD - _tcsstr(modversion, _T("VeryCD 080624")) || //Fake VeryCD - _tcsstr(modversion, _T("VeryCD 080630")) || //Fake VeryCD - (_tcsstr(modversion, _T("easyMule 10")) && _tcsstr(clientversion,_T("0.48a"))) || //easymule 10#### are not based on .48a - (_tcsstr(modversion, _T("VeryCD 080919")) && _tcsstr(clientversion,_T("0.49b"))) //fake clientversion, should be 0.48a - ) - return _T("Fake MODSTRING"); -//zz_fly :: end - - //WiZaRd Bad Modstring Scheme - CString strMod = CString(modversion); - if( strMod.IsEmpty() || - (strMod.Find(_T("CHN "))==0 && strMod.GetLength() > 8) || - (strMod.Find(_T("Apollo"))==0) || //Apollo is a Portugal Mod - (strMod.Find(_T("sivka"))==0) || - (strMod.Find(_T("aMule CVS"))==0) - ) - { - ;//do nothing - } - else - { - if(_tcsstr(clientversion, _T("eMule v")) && (strMod.GetLength() <= 4)) //most of them are fincan - return L"Bad Modstring Scheme"; - int iNumberFound = -1; - _TINT ch; - bool bBad = false; - bool bNotEnd = false; - for(int i = 0; i < strMod.GetLength() && bBad == false; ++i) - { - ch = strMod.GetAt(i); - if( ch == L'.' || ch == L' ' ) - { - bNotEnd = true; //these chars should not be the end of modstring - iNumberFound = -1; //this is a simple hack to not punish mods like TK4 or Spike2 :) - continue; //skip "legal" chars - } - if( ch == L'-' /*|| ch == L'+'*/ ) //connector characters, connect two string or two numbers - { - bNotEnd = true; //these chars should not be the end of modstring - if(iNumberFound != -1) - iNumberFound++; //exclude some modstring like v#.#-a1 - continue; - } - if( _istpunct(ch) || _istspace(ch)) - bBad = true; //illegal punctuation or whitespace character - else if(_istcntrl(ch)) - bBad = true; //control character in modstring!? - else - { - bNotEnd = false; - if( _istdigit(ch) ) - iNumberFound = i; - else if ( (iNumberFound == i-1) && _istxdigit(ch) ) //abcdef is legal in the end of version number, also exclude bowlfish tk4 and so on - { - ;//do nothing - } - else if(iNumberFound != -1) - bBad = true; //that is: number out of row, e.g. not MorphXT v11.9 but Morph11XT.9 - } - } - if(bBad || bNotEnd) - return L"Bad Modstring Scheme"; - } - //WiZaRd - -//SDC Added -//Some Bad MODSTRING check - if (_tcsstr(modversion, _T("eMule-GIFC")) || //GPL-Breaker [DragonD] - _tcsstr(clientversion, _T("0.49c")) && _tcsstr(modversion, _T("X-Ray 2.")) || //Fake X-Ray Mod [**Riso64Bit**] - _tcsstr(clientversion, _T("0.48a")) && _tcsstr(modversion, _T("MorphCA")) || //Fake MorphCA [DargonD] - _tcsstr(modversion, _T("0.50a")) || //It should be a ClientVersion, not a ModString [DargonD] - _tcsstr(clientversion, _T("4.0h")) || //New SpeedyP2P client - _tcsstr(modversion, _T("OS")) || //GPL-Breaker [ieD2k] - _tcsstr(modversion, _T("THC")) || //Fake queues client [Bill Lee] - _tcsstr(modversion, _T("EggAche")) || //Custom ModString - _tcsstr(modversion, _T("DarkSky"))) //Custom ModString - return _T("[SDC]Bad MODSTRING"); - -//SDC Advanced -//Non-Standard ModString check - int Client_Data[] = {(int)strMod.GetLength(), 0, 0}; - if (Client_Data[0] < 1 || - _tcsstr(modversion, _T("eserver")) || //eServer - _tcsstr(modversion, _T("Apollo")) || //Apollo Mod - _tcsstr(modversion, _T("CHN ")) && Client_Data[0] > 8) //CN Mod - { - ; - } - else if (_tcsstr(modversion, _T(" ")) || _tcsstr(modversion, _T("."))) - { - for (Client_Data[1] = 0;Client_Data[1] < Client_Data[0];Client_Data[1]++) - { - int NS_Date = (int)strMod[Client_Data[1]]; - if (NS_Date > 64 && NS_Date < 91 || NS_Date > 96 && NS_Date < 123) //Letter words in ModString - Client_Data[2] = 1; - if (Client_Data[2] == 0 && (Client_Data[1] == 0 || Client_Data[1] == Client_Data[0] - 1) || NS_Date == 91 || NS_Date == 93) //"[" and "]" in ModString - return _T("[SDC]Non-Standard ModString"); - if (Client_Data[2] == 1 || NS_Date == 32 || NS_Date == 40 || NS_Date == 41 || NS_Date == 43 || //" ", "(", ")" or "+" in ModString - NS_Date == 45 || NS_Date == 46 || //"-" or "." in Modstring - NS_Date > 47 && NS_Date < 58) //Number in ModString - { - ; - } - else { - return _T("[SDC]Non-Standard ModString"); - } - } - } - else { - return _T("[SDC]Non-Standard ModString"); //" " or "." in ModString - } - -//End - - return NULL; -} - -LPCTSTR __declspec(dllexport) DLPCheckModstring_Soft(LPCTSTR modversion, LPCTSTR clientversion) -{ - if(modversion==NULL || clientversion==NULL) - return NULL; - - if ( - StrStrI(modversion,_T("Rockesel")) || - StrStrI(modversion,_T("HARDMULE")) || - StrStrI(modversion, _T("Community"))|| - StrStrI(modversion,_T("IcE-MoD"))|| - StrStrI(modversion,_T("a-eDit"))|| - StrStrI(modversion, _T("Ultimativ"))|| - StrStrI(modversion, _T("Ultimate"))|| - //StrStrI(modversion, _T("Ulti F"))|| //move to hard ban - StrStrI(modversion, _T("Enter MoD Name"))|| -// StrStrI(modversion, _T("Dein Modstring"))|| // 3/2007 - //StrStrI(modversion, _T("choose your modstring"))|| // 3/2007 - StrStrI(modversion, _T("La tua Modstring"))|| //italian - //8/2007 from dlarge: - //StrStrI(modversion, _T("Enter Your Modstring"))|| //added dlarge - StrStrI(modversion, _T("Your Modstring")) || - StrStrI(modversion, _T("C-E-R-E-B-R-O")) || //added dlarge - //end - StrStrI(modversion, _T("NewMule"))|| - StrStrI(modversion, _T("smart- muli"))|| - StrStrI(modversion, _T("TCMatic 3"))|| //1/2007 //version 3 is the public version and used as leecher - //StrStrI(clientversion, _T("eMule v2.0")) || //6/2007 fake Xtreme / GPL-breaker - StrStrI(modversion, _T("uptempo")) -//zz_fly Start - ||_tcsstr(clientversion, _T("eMule v0.95g")) //korea - ||_tcsstr(clientversion, _T("eMule v0.47f")) - ||_tcsstr(modversion, _T("Bowlfish")) //international filter, change to softban. - ||StrStrI(modversion, _T("BLACKMULE")) //no completely source, but it seems it do not have leecher functions. - ||_tcsstr(clientversion, _T("eMule v1.")) //ban all version number >= 1.0 - ||_tcsstr(clientversion, _T("eMule v2.")) - //||_tcsstr(clientversion, _T("eMule v3.")) - ||_tcsstr(clientversion, _T("Shareaza v6.")) //Shareaza's current version is 2.5.2 - ||_tcsstr(clientversion, _T("Shareaza v5.")) - ||_tcsstr(clientversion, _T("Shareaza v4.")) - ||_tcsstr(clientversion, _T("Shareaza v3.")) - ||StrStrI(modversion, _T(".COM")) //no domain name in modstring - ||StrStrI(modversion, _T(".ORG")) - ||StrStrI(modversion, _T(".NET")) - ||StrStrI(modversion, _T(".BIZ")) - ||StrStrI(modversion, _T(".INFO")) -//zz_fly End - ||(_tcsstr(clientversion, _T("lphant v2.01")) && _tcsstr(modversion, _T("Plus"))) //www.lphantplus.com, no src - ) - return _T("Bad MODSTRING"); - -//SDC Main -#if All_VeryCD_Mod //All-VeryCD-Mod check - if (_tcsstr(modversion, _T("VeryCD")) && - !_tcsstr(modversion, _T("VeryCD 090304"))) //This version has been checked in DLPCheckNameAndHashAndMod() - return _T("[SDC]All-VeryCD-Mod"); -#endif - -#if VeryCD_EasyMule_Mod //VeryCD-EasyMule-Mod check - if (_tcsstr(modversion, _T("easyMule")) || //New versions - (_tcsstr(modversion, _T("VeryCD")) && - //Old versions released in 2007 and 2008 - ((_tcsstr(modversion, _T(" 07")) && - (_tcsstr(modversion, _T("1109")) || _tcsstr(modversion, _T("1207")) || _tcsstr(modversion, _T("1229")))) || - (_tcsstr(modversion, _T(" 08")) && - (_tcsstr(modversion, _T("0125")) || _tcsstr(modversion, _T("0202")) || _tcsstr(modversion, _T("0227")) || - _tcsstr(modversion, _T("0320")) || _tcsstr(modversion, _T("0401")) || _tcsstr(modversion, _T("0506")) || - _tcsstr(modversion, _T("0514")) || _tcsstr(modversion, _T("0701")) || _tcsstr(modversion, _T("0701")) || - _tcsstr(modversion, _T("0722")) || _tcsstr(modversion, _T("0815")) || _tcsstr(modversion, _T("0905")) || - _tcsstr(modversion, _T("0905")) || _tcsstr(modversion, _T("0928")) || _tcsstr(modversion, _T("1015")) || - _tcsstr(modversion, _T("1023")) || _tcsstr(modversion, _T("1023")) || _tcsstr(modversion, _T("1113")) || - _tcsstr(modversion, _T("1121")) || _tcsstr(modversion, _T("1122")) || _tcsstr(modversion, _T("1205")) || - _tcsstr(modversion, _T("1218"))))))) - return _T("[SDC]VeryCD-EasyMule-Mod"); -#endif - -//End - - return NULL; -} - -LPCTSTR __declspec(dllexport) DLPCheckUsername_Hard(LPCTSTR username) -{ - if(username==NULL) - return NULL; - - if ( -//Chinese Leecher - http://forum.emule-project.net/index.php?showtopic=134097&hl= - _tcsstr(username,L"dianlei.com") || - _tcsstr(username,L"[eMuleBT]") || - _tcsstr(username,L"[PPMule]") || - StrStrI(username,L"TUOTU") || - _tcsstr(username,L"kaggo.com") || - _tcsstr(username,L"[Chinfo]") || - _tcsstr(username,L"vgo.21cn") || -//Chinese Leecher - http://forum.emule-project.net/index.php?showtopic=134097&hl= - //StrStrI(username,_T("$WAREZ$"))|| - //StrStrI(username,_T("Leecha"))|| - //StrStrI(username,_T("Reverse"))|| - //StrStrI(username,_T("$motty"))|| - StrStrI(username,_T("emule-speed"))|| - StrStrI(username,_T("Intuition"))|| - //StrStrI(username,_T("W.I.P."))|| //outdated - //StrStrI(username,_T("celinesexy"))|| - //StrStrI(username,_T("Gate-eMule"))|| - //StrStrI(username,_T("energyfaker"))|| - //StrStrI(username,_T("BuzzFuzz"))|| - //StrStrI(username,_T("Speed-Unit"))|| - //StrStrI(username,_T("Killians"))|| - //StrStrI(username,_T("pubsman"))|| - StrStrI(username,_T("emule-element"))|| - //StrStrI(username,_T("emule")) && StrStrI(username,_T("booster")) || - //StrStrI(username,_T("Rappi")) || - StrStrI(username,_T("Ketamine")) || - StrStrI(username,_T("emuleech.com")) || - //StrStrI(username, _T("SchlumpMule"))|| //" - //StrStrI(username, _T("Safty´s"))|| - StrStr(username, _T("UnKnOwN pOiSoN"))|| - //StrStrI(username, _T("ElfenPower"))|| - //StrStrI(username, _T("eMule Cow"))|| - //StrStrI(username, _T("Freezamule"))|| - StrStrI(username, _T("EGOmule"))|| - StrStrI(username, _T("-=EGOist=-"))|| - //StrStrI(username, _T("FreezaVamp"))|| - StrStrI(username, _T("Muli_Checka"))|| - StrStrI(username,_T("00de.de"))|| - //StrStrI(username,_T("00de")) || - //StrStrI(username,_T("OO.de"))|| - //StrStrI(username,_T("OOde")) || - //StrStrI(username, _T("PrOjEcT-SaNdStOrM"))|| - //StrStrI(username, _T("NotHer eDitiOn"))|| - //StrStrI(username, _T("eSl@d3vil"))|| - //StrStrI(username, _T(" AgentSmith"))|| - //StrStrI(username, _T("rabb_it"))|| - //StrStrI(username, _T("ServerClient"))|| - StrCmpI(username, _T("Muse"))==0 || //ketamine mod - //StrStr(username, _T("ZamBoR"))|| - //StrStrI(username,_T("HARDMULE")) || - StrStrI(username,_T("futurezone-reloaded")) || - StrStrI(username,_T("Gate-To-Darkness.com")) || - StrStrI(username,_T("Razorback")) || - StrStrI(username,_T("Titanesel.tk")) || - StrStrI(username,_T("bigbang.to")) || - StrStrI(username,_T("leecherclients.org")) || //Xman 10/06 - StrStrI(username,_T("futuremods.de")) || //Xman 10/06 - StrStrI(username,_T(".::Stenoco-Zone::.")) || - StrStrI(username,_T("emule-mods.cc")) || //Xman 01/07 - StrStrI(username,_T("leecher-mod.net")) || //Xman 02/07 - //08/2007 from dlarge: - StrStrI(username,_T("leecher-world.com")) || //added dlarge - StrStrI(username,_T("leecher.biz")) || //added dlarge - //end - //Xman 6/2007: -//more AJ modstrings - //( StrStrI(username, L"[") && StrStrI(username, L"]") - //&& ( - StrStrI(username, L"Applejuice") || - StrStrI(username, L"Wikinger") || - StrStrI(username, L"ROCKFORCE") || - StrStrI(username, L"RC-ATLANTIS") || - StrStrI(username, L"Fireball") || - StrStrI(username, L"SunPower") || - // ) - //) || -// StrStrI(username,_T("AppleJuice")) && StrStrI(username,_T("[")) && StrStrI(username,_T("]")) || - StrStrI(username, L"futuremod.de") || // JvA: apple-com adress -//more AJ modstrings - StrStrI(username, L"@ Raptor") || //added dlarge - StrStrI(username, L"FUCKLW") || //added dlarge -//zz_fly Start - _tcsstr(username,_T("a1[VeryCD]xthame")) || //XL - StrStrI(username,_T("Flashget")) || //FlashGet - _tcsstr(username,_T("http://www.net-xfer.com")) || //netxfer - _tcsstr(username,_T("emuIe-project.net")) || //phishing site - _tcsstr(username,_T("QQDownload")) || //tencent - _tcsstr(username,_T("[Devils][")) || //2009/12/25 - _tcsstr(username,_T("sharing-devils")) || // leecher community - //2010/5/29 - //_tcsstr(username,_T("btbbt.com")) || //community username - //_tcsstr(username,_T("Greendown.Cn")) || //community username //these two sites provide some modified versions. they only hacked the title and changed the default username. i think the users are innocent. unban. - _tcsstr(username,_T("MTVP2P")) || //community username from Chengr28 - _tcsstr(username,_T("qobfxb")) || //community username - _tcsstr(username,_T("[CHN][VeryCD]QQ"))|| //QQDownload -//zz_fly End - StrStrI(username, _T("lionetwork"))|| - StrStrI(username, _T("[lionheart"))|| - StrStrI(username, _T("li@network"))|| - StrStrI(username, _T("l!onetwork"))|| - StrStrI(username, _T("li()net"))|| - StrStrI(username, _T("l!0net"))|| - StrStrI(username, _T("L!()Network")) || - StrStrI(username, _T("Li()Network")) || - StrStrI(username, _T("L!0Network")) || - StrStrI(username, _T("Li@Network")) || -//from **Riso64Bit** - _tcsstr(username, _T("FincanMod")) || //fincan - _tcsstr(username, _T("Finc@nMod")) || - StrStrI(username, _T("titanmule")) || - StrStrI(username, _T(".c0.il")) || //0, zero - StrStrI(username, _T("Goop.Co.il")) || //israel community - StrStrI(username, _T("Div.Co.il")) || - StrStrI(username, _T("emule.co.il")) || - StrStrI(username, _T("pwr.co.il")) || - StrStrI(username, _T("nFo.Co.il")) || - StrStrI(username, _T("lhnet.co.il")) || - StrStrI(username, _T("ynet.co.il")) || - StrStrI(username, _T("wnet.co.il")) || - StrStrI(username, _T("Paf.co.il")) || - StrStrI(username, _T("finder.co.il")) || - StrStrI(username, _T("joop.Co.il")) || - StrStrI(username, _T("Www.NFOil.com")) || - StrStrI(username, _T("TLN eMule")) || - StrStrI(username, _T("LHeMule")) || - StrStrI(username, _T("VMULE 2007")) || - StrStrI(username, _T("TLNGuest")) || - StrStrI(username, _T("Div eMule 2007")) || - StrStrI(username, _T("eMulePro.de.vu")) || - StrStrI(username, _T("emuIe-co.net")) || - StrStrI(username, _T("AE CoM UseR")) || - StrStrI(username, _T("BTFaw.Com")) || - StrStrI(username, _T("warezfaw")) || - StrStrI(username, _T("lh.2y.net")) || - //StrStrI(username, _T("viper-istraeL.Org")) || - StrStrI(username, _T("[Pwr Mule]Usuario")) || - StrStrI(username, _T("Www.D-iL.Net")) || - StrStrI(username, _T("www.aideadsl.com")) || - StrStrI(username, _T("tangot.com")) || - StrStrI(username, _T("r3wlx.com")) || - StrStrI(username, _T("http://yo.com")) || - StrStrI(username, _T("Angel eMule")) || - StrStrI(username, _T("AngelMule")) || - //MyTh NOT to ban! - /* //they are some release groups, although some of them use bad mods, but rest of them is good one. - _tcsstr(username, _T("Ultimativ"))|| - StrStrI(username, _T("gps2c.6x.to")) || - StrStrI(username, _T("maultier-power")) || - _tcsstr(username, _T("RSVCD-Forum")) || - StrStrI(username, _T("rsvcd-crew")) || - StrStrI(username, _T("Ulti-Board")) || - _tcsstr(username, _T("R-Mod"))|| - StrStrI(username, _T("gps2crew")) || - */ - //StrStrI(username, _T("www.eChanblardNext.org")) || - //StrStrI(username, _T("www.e-sipa.de")) || - StrStrI(username, _T("[TEC]")) || //fincan - StrStrI(username, _T("e-Sipa")) || - StrStrI(username, _T("emuleech")) || - StrStrI(username, _T("mkp2p")) || - _tcsstr(username, _T("[ CHN]")) || //a space after bracket - StrStrI(username, _T("PlayMule")) || - StrStrI(username, _T("eDonkey2008")) || - StrStrI(username, _T("Torenkey")) || - //StrStrI(username, _T("sdjtuning")) || - StrStrI(username, _T("RAPCOM")) || - _tcsstr(username, _T("ZZULtimativ-R")) || - _tcsstr(username, _T("ZZ-R ")) || - StrStrI(username, _T("OFF +")) || - StrStrI(username, _T("OFF+")) || - StrStrI(username, _T("Ultim@tiv")) || - StrStrI(username, _T("[CHN][VeryCD][Your")) || - _tcsstr(username, _T("eMuleUniATeam")) || - StrStrI(username, _T("mods.sub.cc")) || - _tcsstr(username, _T("ExtrEMule")) || - _tcsstr(username, _T("Titandonkey")) || - _tcsstr(username, _T("xtmhtl [ePlus]"))|| //same name, same userhash - _tcsstr(username, _T("eMule Accelerator")) || - //2010/4/4 - StrStrI(username, _T("eMule Pro Ultra")) || - StrStrI(username, _T("[CHN][VeryCD][username]")) || //[CHN][VeryCD][username] eMule v0.48a [xl build58] - //2010/5/29 - StrStrI(username, _T("Fireb@ll")) || - //2010/6/6 - StrStrI(username, _T("monster-mod.com")) || - StrStrI(username, _T("Reptil-Crew-3")) || //Reptil mod - StrStrI(username, _T("!Lou-Nissart!")) || //no src only BIN (kick from upload) - - //all sites below are phishing sites - StrStrI(username, _T("www.extremule.com")) || - StrStrI(username, _T("www.emuleproject.com")) || - StrStrI(username, _T("bigbang-emule.de.vu")) || - StrStrI(username, _T("emulenet.de.vu")) || - _tcsstr(username, _T("http://emule.net")) || - StrStrI(username, _T("http://emulo.net")) || - StrStrI(username, _T("http://projekt.org")) || - StrStrI(username, _T("CryptMule.de.vu")) || - StrStrI(username, _T("titanload.to")) || - StrStrI(username, _T("http://emule-projekt.net")) || - StrStrI(username, _T("emuleitalianogratis.com")) || - StrStrI(username, _T("http://www.official-emule.com")) || - StrStrI(username, _T("emulepro.6x.to")) || - //StrStrI(username, _T("power-portal")) || //MyTh NOT to ban! - StrStrI(username, _T("e-mule.nu")) || - StrStrI(username, _T("emulesoftware.com")) || - StrStrI(username, _T("emuleitaliano.com")) || - StrStrI(username, _T("scaricareemule.com")) || - StrStrI(username, _T("emule--it.com")) || - StrStrI(username, _T("italian.eazel.com")) || - StrStrI(username, _T("speed-downloading.com")) || - StrStrI(username, _T("nuovaversione.com")) || - StrStrI(username, _T("emuleplus.com")) || - StrStrI(username, _T("emuleultra.com")) || - StrStrI(username, _T("emule.org")) || - StrStrI(username, _T("[emule.de v")) || //default name: [emule.de v ##] - StrStrI(username, _T("emule.fr")) || - StrStrI(username, _T("emule.ru")) || - StrStrI(username, _T("emule.com")) || - StrStrI(username, _T("emule-mods.biz")) || - StrStrI(username, _T("emule-projet")) || - StrStrI(username, _T("maomao.eu")) || - StrStrI(username, _T("donkey.com")) || - StrStrI(username, _T("super4.com")) || - StrStrI(username, _T("emule.cc")) || - StrStrI(username, _T("emule.net")) || - StrStrI(username, _T("emulegratis.net")) || - //new lines 2009/11/8 - StrStrI(username, _T("emulespeedup.de.vu")) || - StrStrI(username, _T("superemule.6x.to")) || - StrStrI(username, _T("emulea.com")) || - StrStrI(username, _T("emule24horas.com")) || - StrStrI(username, _T("emule.es")) || - StrStrI(username, _T("emulext.net")) || - StrStrI(username, _T("netemule.com")) || - StrStrI(username, _T("gratis-emule.com")) || - StrStrI(username, _T("emuleproject.com")) || - StrStrI(username, _T("emuleplusplus.de")) || - StrStrI(username, _T("wikingergilde")) || - StrStrI(username, _T("emuleclassic.com")) || - StrStrI(username, _T("mega-emule.com")) || - StrStrI(username, _T("speedyp2p.com")) || - StrStrI(username, _T("anubisp2p.com")) || - StrStrI(username, _T("cruxp2p.com")) || - StrStrI(username, _T("downloademulegratis.com")) || - StrStrI(username, _T("emulegold.com")) || - StrStrI(username, _T("pro-sharing.com")) || - StrStrI(username, _T("turbomule ")) || - StrStrI(username, _T("devhancer.com")) || - StrStrI(username, _T("emulefileswap.com")) || - StrStrI(username, _T("p2psharing.biz")) || - StrStrI(username, _T("fastsearchbooster.biz")) || - StrStrI(username, _T("emule-features.6x.to")) || - StrStrI(username, _T("emule-pro.blogspot.com")) || - StrStrI(username, _T("emule-ng.com")) || - StrStrI(username, _T("version049c-official.com")) || - StrStrI(username, _T("emule.to")) || - StrStrI(username, _T("adunanza.italiazip.com")) || - StrStrI(username, _T("emulesoftware.com")) || - StrStrI(username, _T("phpnuke.org")) || - //new lines 2009/11/29 - StrStrI(username, _T("gratis.emule49-info.com")) || - StrStrI(username, _T("emuleds.com")) || - StrStrI(username, _T("scarica-emule-gratis.com")) || - StrStrI(username, _T("mp3edonkeysearch.com")) || - StrStrI(username, _T("mp3rocket.com")) || - StrStrI(username, _T("emule-rocket.com")) || - StrStrI(username, _T("MonkeyP2P")) || - //new lines 2010/01/17 - StrStrI(username, _T("http://alpha-gaming.net")) || - //new lines 2010/4/4 - StrStrI(username, _T("piolet.com")) || - StrStrI(username, _T("hermesp2p.com")) || - StrStrI(username, _T("shareghost.com")) || - StrStrI(username, _T("zultrax.com")) || - StrStrI(username, _T("getfasterp2p.com")) || - StrStrI(username, _T("pro-sharing.com")) || - StrStrI(username, _T("truxshare.com")) || - StrStrI(username, _T("meteorshare.com")) || - StrStrI(username, _T("manolito.com")) || - StrStrI(username, _T("blubster.com")) || - StrStrI(username, _T("fastsearchbooster.biz")) || - StrStrI(username, _T("e-mule-")) || // detect any mirror simil to "e-mule-it.com" - StrStrI(username, _T("download-gratis-emule.com")) || - StrStrI(username, _T("emule-italy.it")) || - StrStrI(username, _T("e-mule.be")) || - StrStrI(username, _T("official-emule")) || - StrStrI(username, _T("emule-gratis.it")) || - StrStrI(username, _T("devhancer")) || - //2010/5/29 - StrStrI(username, _T("dbgo.com")) || - StrStrI(username, _T("net2search.com")) || - //2010/6/6 - StrStrI(username, _T("p2phood.com")) || - StrStrI(username, _T("intelpeers.com")) || -//End - StrStrI(username,_T("[LSD.19")) //Xman 21.06.2005 definitive not a good mod, with protocol bugs - ) - return _T("Bad USERNAME"); - - - //new ketamine - //if(StrStrI(username, _T("[ePlus]")) != StrRStrI(username,NULL, _T("[ePlus]"))) //old version - if(_tcslen(username) >=14) - { - LPCTSTR tempstr=StrStr(username, _T("[ePlus]")); - if(tempstr && _tcslen(tempstr)>=7) - if(StrStr(tempstr + 7, _T("[ePlus]"))) - return _T("new Ketamine"); - } - -//SDC Add -//Some Bad USERNAME check -// _tcsstr(username, _T("ED2000")) || //GPL-Breaker - if (_tcsstr(username, _T("VgroupTeam")) || //Random ModString [doompower] - //P2PSearcher - _tcsstr(username, _T("[CHN]X_jIQ")) || //Old version - _tcsstr(username, _T("[CHN]sf")) || //New version - _tcsstr(username, _T("[CHN]__VRom")) || //New version [dark] - //End - _tcsstr(username, _T(".net «Xtreme")) || //eMule -LPE-, Fake ModString - _tcsstr(username, _T("[CHN]yourname")) || //Some old chinese leecher and default nickname in some QQDownload - _tcsstr(username, _T("28881.com")) || //MTVP2P(2013) [雁蝎] - _tcsstr(username, _T("[CHN]shaohan"))) //Xunlei Offline Download Server and Moblie System Apps [Glasses王子] - return _T("[SDC]Bad USERNAME"); - -//Fake ModString check(Type 4) - CString strNick = CString(username); - if (strNick.ReverseFind(_T('»')) == _tcslen(username) - 1 && strNick.ReverseFind(_T('«')) > 5) - { - int Index = 0; - for (Index = strNick.ReverseFind(_T('«')) - 5;Index < strNick.ReverseFind(_T('«')) - 1;Index++) - { - if (username[Index] < 65 || username[Index] > 90) - { - break; - } - else if (Index == strNick.ReverseFind(_T('«')) - 2) - { - if ((int)username[strNick.ReverseFind(_T('«')) - 1] == 32 && (int)username[strNick.ReverseFind(_T('«')) - 6] == 32) - return _T("[SDC]Fake ModString(Type 4)"); //Their NickName look like a normal eMule Mods but ramdom parts are not right, such as "NickName **** «ModString»" which **** are uppercase letters - } - else { - continue; - } - } - } - -//End - - return NULL; -} - -LPCTSTR __declspec(dllexport) DLPCheckUsername_Soft(LPCTSTR username) -{ - if(username==NULL) - return NULL; - - if ( - - //Xman 15.08.05 - StrStrI(username, _T(">>Power-Mod")) - //Xman 1/2007 - /* - StrStrI(username,_T("AppleJuice [")) && StrStrI(username,_T("]")) || - StrStrI(username,_T("AppleJuice Mod [")) && StrStrI(username,_T("]")) || - StrStrI(username,_T("AppleJuice eMule [")) && StrStrI(username,_T("]")) //5/2007 - */ -//zz_fly Start korea - ||_tcsstr(username, _T("DONKEY2007")) //korea - ||_tcsstr(username, _T("www.Freang.com")) - ||_tcsstr(username, _T("www.pruna.com")) - ||_tcsstr(username, _T("[KOREA]")) - ||_tcsstr(username, _T("superemule")) - ||_tcsstr(username, _T("PRUNA 2008")) - ||_tcsstr(username, _T("MOYAM")) - ||_tcsstr(username, _T("eDonkey2009")) -//zz_fly End - ) - return _T("Bad USERNAME"); - - //bad mods, where every second sign is - //enough to check two places - - if(_tcslen(username) >=4 - && username[3]<=0x1F - && username[1]<=0x1F - ) - return _T("Community-Username"); //community (based on LSD or it's smasher) - - if(_tcslen(username) >=4 - && username[0]==_T('v') - && StrStr(username, _T(":com ")) - ) - return _T("X-Treme"); - - return NULL; -} - -LPCTSTR __declspec(dllexport) DLPCheckNameAndHashAndMod(const CString& username, const CString& userhash, const CString& modversion) -{ - if(username.IsEmpty() || userhash.IsEmpty()) - return NULL; -//zz_fly Start - //Fake VeryCD - if((_tcsstr(modversion,_T("VeryCD 071107")) || _tcsstr(modversion,_T("VeryCD 080307")) ) - && _tcsstr(username, _T("[CHN][VeryCD]yourname")) ) //all fake VeryCD have a default username - return _T("Fake VeryCD"); - - //community userhash check - static const TCHAR refuserhash0[] = _T("154CE646120E96CC798C439A20D26F8D"); // (windows ue) - static const TCHAR refuserhash1[] = _T("455361F9D95C3CD7E6BF2192D1CB3D02"); // (windows ue) - static const TCHAR refuserhash2[] = _T("C8B5F41441C615FBABAD9A7E55294D01"); - static const TCHAR refuserhash6[] = _T("A2221641460E961C8B7FF21A53FB6F6C"); //**Riso64Bit** - static const TCHAR refuserhash7[] = _T("888F4742450EF75F9DD8B7E53FA06FF0"); //**Riso64Bit** - static const TCHAR refuserhash8[] = _T("0B76CC42CB0E81B0DC6120D2BCB36FF9"); //**Riso64Bit** - static const TCHAR refuserhash9[] = _T("EAA383FD9E0E68538C7AC8AD15526F7A"); //**Riso64Bit** - static const TCHAR refuserhash10[]= _T("65C3B2E8940E582630A7F58AF9F26F9E"); //from TaiWan - static const TCHAR refuserhash11[]= _T("9BA09B83DC0EE78BE20280C387936F00"); //from SS1900 - static const TCHAR refuserhash12[]= _T("C92859E4860EA0F15F7837750C886FB6"); //from SS1900 - static const TCHAR refuserhash13[]= _T("CB42F563EE0EA7907395420CAC146FF5"); //From "qobfxb" multi user [DargonD] - -//SDC Fixed - if(_tcsicmp(userhash,refuserhash0) == 0 || _tcsicmp(userhash,refuserhash1) == 0 || _tcsicmp(userhash,refuserhash2) == 0 || - _tcsicmp(userhash,refuserhash6) == 0 || _tcsicmp(userhash,refuserhash7) == 0 || _tcsicmp(userhash,refuserhash8) == 0 || - _tcsicmp(userhash,refuserhash9) == 0 || _tcsicmp(userhash,refuserhash10) == 0 || _tcsicmp(userhash,refuserhash11) == 0 || _tcsicmp(userhash,refuserhash12) == 0 || - _tcsicmp(userhash,refuserhash13) == 0 && !_tcsstr(username,_T("qobfxb"))) //The official refuserhash13 with NickName "qobfxb" will be checked in DLPCheckUsername_Hard() - return _T("[SDC]Community Userhash"); - - //corrupt userhash check - static const TCHAR refuserhash3[] = _T("00000000000E00000000000000006F00"); - static const TCHAR refuserhash4[] = _T("FE000000000E00000000000000006F00"); - if(_tcsicmp(userhash,refuserhash3)==0 || _tcsicmp(userhash,refuserhash4)==0) - return _T("Corrupt Userhash"); - -//SDC Fixed -//Community Userhash check, thanks SquallATF. - static const TCHAR refuserhash5[] = _T("DA1CEEE05B0E5319B3B48CAED24C6F4A"); - if (_tcsicmp(userhash,refuserhash5) == 0 && !_tcsstr(username,_T("QQDownload"))) //The official refuserhash5 with NickName "QQDownload" will be checked in DLPCheckUsername_Hard() - return _T("[SDC]Bad Userhash"); - -//zz_fly End - - //Check for aedit - //remark: a unmodded emule can't send a space at last sign - if(modversion.IsEmpty() && username.Right(1)==_T(" ")) - return _T("AEdit"); - - //Check for Hex-Modstring - if(IsTypicalHex(modversion)) - return _T("Hex-Modstring"); - - //community check - if(username.GetLength()>=7 && username.Right(1)==_T("]")) - { - /* no more needed - //check for gamer - //two checks should be enough. - if(username.Right(6).Left(1)==userhash.Mid(5,1) - && username.Right(3).Left(1)==userhash.Mid(7,1) - ) - return _T("old united"); - */ - - //check for special nickaddon - int find=username.ReverseFind(_T('[')); - if(find >= 0) - { - CString addon=username.Mid(find+1); - int endpos=addon.GetLength()-1; - if(addon.GetLength()>2) - { - //check for snake //12/2006 - /* no more needed, better detection inside Xtreme - for(int i=0; i=_T('0') && addon.GetAt(i)<=_T('9')) ) - { - i=endpos+1; - } - } - if(i==endpos) - return _T("Snake"); - */ - - //Chek for Hex (e.g. X-Treme) - if(IsTypicalHex(addon.Left(addon.GetLength()-1))) - return _T("Hex-Code-Addon"); - } - //zz_fly :: start - if(find == username.GetLength()-6){ - bool bFoundRandomPadding = false; - _TINT ch; - for(int i=1;i<5;i++){ - ch = username.GetAt(find+i); - if( _istpunct(ch) || /*_istspace(ch) ||*/ _istcntrl(ch)){ - bFoundRandomPadding = true; - break; - } - } - if(bFoundRandomPadding && !modversion.IsEmpty() && (username.Find(_T("http://emule-project.net ["))==0) && (find==25)) - return _T("TLH Community"); //username like "http://emule-project.net [random]" - if(bFoundRandomPadding && modversion.IsEmpty() && (find==username.Find(_T('[')))) - return _T("GhostMod"); //username has a random padding [random], it should be a mod function, but there is no modstring - if(bFoundRandomPadding && (username.Find(_T("Silver Surfer User"))==0) && (modversion.Find(_T("Silver"))==-1)) - return _T("Fake Silver Surfer"); //**Riso64Bit** :: fake silver surfer - } - //zz_fly :: end - } - } - - //thx cyrex - if(modversion.GetLength() == 10 && username.GetLength()>4 && StrStr(username.Right(4),_T("/]")) && StrStr(username,_T("[SE]"))) - return _T("Mystery ModString"); - -//SDC Added -//Some Community UserHash Check - static const TCHAR SDC_refuserhash1[] = _T("66B002DADE0E6DBEDF4FCCAA380E6FD4"); //From multi user (TW&CN) [DargonD] - static const TCHAR SDC_refuserhash2[] = _T("AAEE84C0C30E247CBB99B459255D6F99"); //From NAS_01G multi user [DargonD] - static const TCHAR SDC_refuserhash3[] = _T("5E02F74DBA0E8A19DBF6733F0AE66F4A"); //Community UserHash [FzH/DargonD] - static const TCHAR SDC_refuserhash4[] = _T("B6491292AE0E07AC8C6045CAC2DD6F9F"); //Community UserHash [FzH/DargonD] - static const TCHAR SDC_refuserhash5[] = _T("596B305E050EA842CE38DF3811216F3F"); //Community UserHash [FzH/DargonD] - static const TCHAR SDC_refuserhash6[] = _T("B1798B2F620E0B676452C6E2EF706F13"); //Invalid UserHash [DargonD] - static const TCHAR SDC_refuserhash7[] = _T("C1533316C00E3E0D0218843A05E46FAC"); //Invalid UserHash [DargonD] - static const TCHAR SDC_refuserhash8[] = _T("FE10F3C0610E0A925B85204CE8456F42"); //Invalid UserHash [DargonD] - static const TCHAR SDC_refuserhash9[] = _T("C9E61DEEF30E0360E2741C9CF1396F94"); //Invalid UserHash [DargonD] - static const TCHAR SDC_refuserhash10[] = _T("559ACC89D80E90C50A7A0CD3224F6F57"); //Invalid UserHash [DargonD] - static const TCHAR SDC_refuserhash11[] = _T("6AE1D2DF4B0E8707B6F6BC29E8746F0F"); //Invalid UserHash [DargonD] - static const TCHAR SDC_refuserhash12[] = _T("8A537F20B80EF9AF02E59E6C087C6F6B"); //Invalid UserHash [DargonD] - static const TCHAR SDC_refuserhash13[] = _T("3F44A7996F0E17D1F4B319EB58B26F64"); //Invalid UserHash [DargonD] - static const TCHAR SDC_refuserhash14[] = _T("D0D897BD360EEFF329903E04990B6F86"); //Xunlei - static const TCHAR SDC_refuserhash15[] = _T("36725093E00E9350F7680C871E946FD1"); //Tencent Offline Download Server UserHash [DargonD] - static const TCHAR SDC_refuserhash16[] = _T("769D36987E0E313A1501967D0F146F7A"); //UserHash of Xunlei Offline Download Server and Moblie System Apps [pandaleo] - - if (_tcsicmp(userhash,SDC_refuserhash1) == 0 || _tcsicmp(userhash,SDC_refuserhash2) == 0 || _tcsicmp(userhash,SDC_refuserhash3) == 0 || - _tcsicmp(userhash,SDC_refuserhash4) == 0 || _tcsicmp(userhash,SDC_refuserhash5) == 0 || _tcsicmp(userhash,SDC_refuserhash6) == 0 || - _tcsicmp(userhash,SDC_refuserhash7) == 0 || _tcsicmp(userhash,SDC_refuserhash8) == 0 || _tcsicmp(userhash,SDC_refuserhash9) == 0 || - _tcsicmp(userhash,SDC_refuserhash10) == 0 || _tcsicmp(userhash,SDC_refuserhash11) == 0 || _tcsicmp(userhash,SDC_refuserhash12) == 0 || _tcsicmp(userhash,SDC_refuserhash13) == 0 || - _tcsicmp(userhash,SDC_refuserhash14) == 0 && !_tcsstr(modversion, _T("xl build")) || //The SDC_refuserhash14 with modstring "xl build" will be checked in DLPCheckModstring_Hard() - _tcsicmp(userhash,SDC_refuserhash15) == 0 && !_tcsstr(username, _T("[CHN][VeryCD]QQ")) || //The SDC_refuserhash15 with NickName "[CHN][VeryCD]QQ" will be checked in DLPCheckUsername_Hard() - _tcsicmp(userhash,SDC_refuserhash16) == 0 && !_tcsstr(username, _T("[CHN]shaohan"))) //The SDC_refuserhash16 with NickName "[CHN]shaohan" will be checked in DLPCheckUsername_Hard() - return _T("[SDC]Community UserHash"); - -//SDC Advanced -//Ghost Mod check [Bill Lee] - int Client_Data[] = {(int)modversion.GetLength(), (int)username.GetLength(), username.ReverseFind(91), /* username.ReverseFind(93), */ 0}; - if (StrStrI(username, _T("speedyp2p.com")) || Client_Data[0] != 0 /* || Client_Data[1] < 10 */ || !_tcsstr(username, _T("«")) && !_tcsstr(username, _T("»"))) - { - ; - } - else { - /* if (username.ReverseFind(_T('«')) == Client_Data[3] + 2 && (int)username[Client_Data[3]+1] == 32 && (int)username[Client_Data[3] - 5] == 91 && - (int)username[Client_Data[3] - 6] == 32 && username.ReverseFind(_T('»')) == Client_Data[1] - 1) */ - return _T("[SDC]Ghost Mod"); //Their NickName look like a normal eMule Mods but without ModString - } - -//End - - if(modversion.IsEmpty()) - return NULL; - -#define NUMBERSOFSTRING 9 - static const CString testModString[] = {_T("Xtreme"), _T("ScarAngel"), _T("Mephisto"), _T("MorphXT"), _T("EastShare"), _T("StulleMule"), /*_T("Magic Angel"),*/ _T("DreaMule"), _T("X-Mod"), _T("RaJiL")}; - static const float testMinVer[] = {4.4f, 2.5f, 1.5f, 10.0f, 13.0f, 6.0f, /*3.0f,*/ 3.0f, 0.0f, 2.2f}; - for(int i=0; i= testMinVer[i]))) - return _T("ModString Thief"); - } - else if(tag1) - return _T("ModString Thief"); - } - - //doubled «...» in the username, like "username «Xtreme #.#» «abcd»" - int posr1 = username.Find(_T('»')); - int posr2 = username.ReverseFind(_T('»')); - if((posr1 > 5) && (posr2 - posr1 > 5) && ((username.GetAt(posr1 - 5) == _T('«')) || (username.GetAt(posr2 - 5) == _T('«')))) - return _T("Bad Username Paddings"); - //zz_fly :: end - -//SDC Advanced -//Fake ModString check(Type 1) - Client_Data[3] = (int)modversion[0]; - if (Client_Data[0] < 10 || Client_Data[0] > 15 || Client_Data[1] < 11 || Client_Data[1] > 35 || Client_Data[2] < 1 || - _tcsstr(modversion, _T("AnalyZZUL")) || //AnalyZZUL Mod - _tcsstr(modversion, _T("AcKroNiC"))) //AcKroNiC Mod - { - ; - } - else { - if (Client_Data[3] > 64 && Client_Data[3] < 91 && (int)modversion[Client_Data[0] - 4] == 32 && (int)modversion[Client_Data[0] - 2] == 46 && - (int)modversion[Client_Data[0] - 1] > 47 && (int)modversion[Client_Data[0] - 1] < 58 && (int)modversion[Client_Data[0] - 3] > 47 && (int)modversion[Client_Data[0] - 3] < 58 && - ((int)username[0] > 64 && (int)username[0] < 91 || (int)username[0] > 96 && (int)username[0] < 123) && - (int)username[Client_Data[1] - 1] == 93 && (int)username[Client_Data[1] - 6] == 91 && (int)username[Client_Data[1] - 7] == 32) - return _T("[SDC]Fake ModString(Type 1)"); //Normal ModString is usually "ModString *.*(Version)" but its NickName without "«ModString»" - } - -//Fake ModString check(Type 3) - int Index = 0; - for (Index = 0;Index1) - { - bool Type[] = {false, false, false}; - if (EACheck[1] == 40) - EACheck[4] = EACheck[1] + 1; - else - EACheck[4] = EACheck[1] + 2; - - EACheck[3] = (int)username[EACheck[0] - 1]; - EACheck[2] = (int)username[username.Find(EACheck[4]) + 2]; - if (EACheck[2] == 40) - EACheck[5] = EACheck[2] + 1; - else - EACheck[5] = EACheck[2] + 2; - if (EACheck[3] == 41) - EACheck[6] = EACheck[3] - 1; - else - EACheck[6] = EACheck[3] - 2; - if (EACheck[4] != EACheck[3] && (EACheck[3] == 41 || EACheck[3] == 93 || EACheck[3] == 125) && - username.Find(EACheck[4]) + 1 == username.Find(32) && username.ReverseFind(EACheck[6]) - 1 == username.ReverseFind(32) && - username.Find(EACheck[4]) > 4 && username.Find(EACheck[4]) < 12 && - username.ReverseFind(EACheck[6]) > EACheck[0] - 13 && username.ReverseFind(EACheck[6]) < EACheck[0] - 5) - Type[0] = true; //Like "(****) NickName [****]", "****" is 4-10 words - if (EACheck[1] != EACheck[2] && (EACheck[2] == 40 || EACheck[2] == 91 || EACheck[2] == 123) && - username.Find(EACheck[4]) + 1 == username.Find(32) && (int)username[username.Find(EACheck[5]) + 1] == 32 && - username.Find(EACheck[5]) - username.Find(EACheck[2]) > 4 && username.Find(EACheck[5]) - username.Find(EACheck[2]) < 12) - Type[1] = true; //Like "(****) [****] NickName", "****" is 4-10 words - if (!_tcsstr(modversion, _T("kMule")) && //kMule Mod - !_tcsstr(modversion, _T("MorphCA")) && //MorphCA Mod - !_tcsstr(modversion, _T("ZZUL-TRA")) && //ZZUL-TRA Mod - !_tcsstr(modversion, _T("Katana")) && //Katana Mod - (Type[0] || Type[1])) - { - for (Index = 1;Index 64 && username[Index] < 91 || username[Index] > 96 && username[Index] < 123) //"****" must be a letter - { - if (Index == username.Find(EACheck[4]) - 1) - Type[2] = true; - continue; - } - else { - break; - } - } - if (Type[0] && Type[2]) - { - for (Index = username.ReverseFind(EACheck[6]) + 1;Index < EACheck[0] - 1;Index++) - { - if (username[Index] > 64 && username[Index] < 91 || username[Index] > 96 && username[Index] < 123) //"****" must be a letter - { - if (Index == (int)EACheck[0] - 2) - return _T("[SDC]Fake ModString(Type 2)"); - continue; - } - else { - break; - } - } - } - if (Type[1] && Type[2]) - { - for (Index = username.Find(EACheck[2]) + 1;Index < username.Find(EACheck[5]);Index++) - { - if (username[Index] > 64 && username[Index] < 91 || username[Index] > 96 && username[Index] < 123) //"****" must be a letter - { - if (Index == username.Find(EACheck[5]) - 1) - return _T("[SDC]Fake ModString(Type 2)"); - continue; - } - else { - break; - } - } - } - } - } - -//SDC Main -#if All_VeryCD_Mod - if (_tcsstr(modversion, _T("VeryCD 090304")) && !_tcsstr(username, _T("[CHN]shaohan"))) //This version has been checked before DLPCheckModstring_Soft() - return _T("[SDC]All-VeryCD-Mod"); -#endif - -#if VeryCD_Default_NickNames //VeryCD-Default-NickNames check - if (_tcsstr(modversion, _T("VeryCD")) && - //They will be checked in DLPCheckModstring_Hard() - !(_tcsstr(modversion, _T(" 08")) && (_tcsstr(modversion, _T("0126")) || _tcsstr(modversion, _T("0730")) || - _tcsstr(modversion, _T("0509")) || _tcsstr(modversion, _T("0606")) || _tcsstr(modversion, _T("0624")) || _tcsstr(modversion, _T("0630")))) && - //Default NickName in a VeryCD-EasyMule-Mod version - (_tcsstr(username, _T("easyMule.com")) || - //VeryCD-Mod and old VeryCD-EasyMule-Mod versions - ((_tcsstr(username, _T("[CHN]")) || _tcsstr(username, _T("[VeryCD]"))) && - (_tcsstr(username, _T("yourname")) || - //New VeryCD-EasyMule-Mod versions - //2009-07 Updated (GB2312) - _tcsstr(username, _T("我爱电驴")) || - _tcsstr(username, _T("爱分享")) || - _tcsstr(username, _T("分享快乐")) || - _tcsstr(username, _T("上传Happy")) || - _tcsstr(username, _T("爱电驴爱生活")) || - _tcsstr(username, _T("dianlv")) || - _tcsstr(username, _T("自由电驴")) || - //2009-07 Updated (Big5, GB2312 to Big5 codepage garbled) - _tcsstr(username, _T("扂乾萇聶")) || - _tcsstr(username, _T("乾煦砅")) || - _tcsstr(username, _T("煦砅辦氈")) || - _tcsstr(username, _T("奻換Happy")) || - _tcsstr(username, _T("乾萇聶乾汜魂")) || - _tcsstr(username, _T("赻蚕萇聶")) || - //2009-08 Updated (GB2312) - _tcsstr(username, _T("感谢驴友")) || - _tcsstr(username, _T("感谢分享")) || - _tcsstr(username, _T("大家一起来加速")) || - _tcsstr(username, _T("分享越多 下载越快")) || - _tcsstr(username, _T("挂机王")) || - _tcsstr(username, _T("通宵上传")) || - _tcsstr(username, _T("分享互联网")) || - //2009-08 Updated (Big5, GB2312 to Big5 codepage garbled) - _tcsstr(username, _T("覜郅聶衭")) || - _tcsstr(username, _T("覜郅煦砅")) || - _tcsstr(username, _T("湮模珨懂樓厒")) || - _tcsstr(username, _T("煦砅埣嗣 狟婥埣辦")) || - _tcsstr(username, _T("境儂卼")) || - _tcsstr(username, _T("籵秖奻換")) || - _tcsstr(username, _T("煦砅誑薊厙")) || - //2013-01 Updated - _tcsstr(username, _T("[easyMule]")))))) - return _T("[SDC]VeryCD-Default-NickNames"); -#endif - -//End - - return NULL; -} - -LPCTSTR __declspec(dllexport) DLPCheckMessageSpam(LPCTSTR messagetext) -{ - if(messagetext==NULL) - return NULL; - - if( - _tcsstr(messagetext, _T("ZamBoR")) || - _tcsstr(messagetext, _T("DI-Emule")) || - _tcsstr(messagetext, _T("Join the L33cher")) || - _tcsstr(messagetext, _T("eMule FX")) || - _tcsstr(messagetext, _T("---> ed2k://|file|Ketamine")) || - _tcsstr(messagetext, _T("robot from RIAA, you can't fight")) || - _tcsstr(messagetext, _T("agent from PeerFactor, she advises you to stop")) || - _tcsstr(messagetext, _T("bot from MPAA, you can't do anything against her")) || - _tcsstr(messagetext, _T("[Sangue-Suga]")) || //3 /2007 - _tcsstr(messagetext, _T("[te@m projekt")) || //5 /2007 - _tcsstr(messagetext, _T("eMule PRO Ultra")) || //8/2007 //include ultra 1 2 3 - _tcsstr(messagetext, _T("HyperMule")) || //8/2007 - _tcsstr(messagetext, _T("FXeMule")) || - _tcsstr(messagetext, _T("angelmule.com")) || //**Riso64Bit** - _tcsstr(messagetext, _T("RocketMule")) //**Riso64Bit** - ) - return (_T("Spam-Message")); - - if(CString(messagetext).Trim().IsEmpty()) - return (_T("Spam-Message")); - - return NULL; -} - -LPCTSTR __declspec(dllexport) DLPCheckHelloTag(UINT tagnumber) -{ - LPCTSTR strSnafuTag=NULL; - switch(tagnumber) - { - case CT_UNKNOWNx12: - case CT_UNKNOWNx13: - case CT_UNKNOWNx14: - case CT_UNKNOWNx16: - case CT_UNKNOWNx17: - case CT_UNKNOWNxE6: strSnafuTag=apszSnafuTag[0];break;//buffer=_T("DodgeBoards");break; - case CT_UNKNOWNx15: strSnafuTag=apszSnafuTag[1];break;//buffer=_T("DodgeBoards & DarkMule |eVorte|X|");break; - case CT_UNKNOWNx22: strSnafuTag=apszSnafuTag[2];break;//buffer=_T("DarkMule v6 |eVorte|X|");break; - case CT_UNKNOWNx5D: - case CT_UNKNOWNx6B: - case CT_UNKNOWNx6C: strSnafuTag=apszSnafuTag[17];break; - case CT_UNKNOWNx74: - case CT_UNKNOWNx87: strSnafuTag=apszSnafuTag[17];break; - case CT_UNKNOWNxF0: - case CT_UNKNOWNxF4: strSnafuTag=apszSnafuTag[17];break; - //case CT_UNKNOWNx69: strSnafuTag=apszSnafuTag[3];break;//buffer=_T("eMuleReactor");break; - case CT_UNKNOWNx79: strSnafuTag=apszSnafuTag[4];break;//buffer=_T("Bionic");break; - case CT_UNKNOWNx83: strSnafuTag=apszSnafuTag[15];break;//buffer=_T("Fusspi");break; - case CT_UNKNOWNx76: - case CT_UNKNOWNxCD: strSnafuTag=apszSnafuTag[16];break;//buffer=_T("www.donkey2002.to");break; - case CT_UNKNOWNx88: - strSnafuTag=apszSnafuTag[5];//[LSD7c] - break; - case CT_UNKNOWNx8c: strSnafuTag=apszSnafuTag[5];break;//buffer=_T("[LSD7c]");break; - case CT_UNKNOWNx8d: strSnafuTag=apszSnafuTag[6];break;//buffer=_T("[0x8d] unknown Leecher - (client version:60)");break; - case CT_UNKNOWNx99: strSnafuTag=apszSnafuTag[7];break;//buffer=_T("[RAMMSTEIN]");break; //STRIKE BACK - case CT_UNKNOWNx97: - case CT_UNKNOWNx98: - case CT_UNKNOWNx9C: - case CT_UNKNOWNxDA: strSnafuTag=apszSnafuTag[3];break;//buffer=_T("eMuleReactor");break; - case CT_UNKNOWNxC8: //Xman x4 - case CT_UNKNOWNxCE: //Xman 20.08.05 - case CT_UNKNOWNxCF: //Xman 20.08.05 - case CT_UNKNOWNx94: //Xman 20.08.05 - case CT_UNKNOWNxc4: strSnafuTag=apszSnafuTag[8];break;//buffer=_T("[MD5 Community]");break; //USED BY NEW BIONIC => 0x12 Sender - case CT_UNKNOWNxEC: strSnafuTag=apszSnafuTag[18];break; //Xman x4 Speedmule - //case CT_FRIENDSHARING: //STRIKE BACK - //break; - case CT_DARK: //STRIKE BACK - case CT_UNKNOWNx7A: - case CT_UNKNOWNxCA: - strSnafuTag=apszSnafuTag[9];break;//buffer=_T("new DarkMule"); - case CT_UNKNOWNx4D: - strSnafuTag=apszSnafuTag[19];break;// pimp my mule misuse an official tag in hello - case CT_UNKNOWNxD2: - strSnafuTag=apszSnafuTag[20];break;//SquallATF - //case CT_UNKNOWNx85: - // strSnafuTag=apszSnafuTag[21];break;//zz_fly - } - - return strSnafuTag; -} - -LPCTSTR __declspec(dllexport) DLPCheckInfoTag(UINT tagnumber) -{ - LPCTSTR strSnafuTag=NULL; - - switch(tagnumber) - { - case ET_MOD_UNKNOWNx12: - case ET_MOD_UNKNOWNx13: - case ET_MOD_UNKNOWNx14: - case ET_MOD_UNKNOWNx17: strSnafuTag=apszSnafuTag[0];break;//("[DodgeBoards]") - case ET_MOD_UNKNOWNx2F: strSnafuTag=apszSnafuTag[10];break;//buffer=_T("[OMEGA v.07 Heiko]");break; - case ET_MOD_UNKNOWNx36: - case ET_MOD_UNKNOWNx5B: - case ET_MOD_UNKNOWNxA6: strSnafuTag=apszSnafuTag[11];break;//buffer=_T("eMule v0.26 Leecher");break; - case ET_MOD_UNKNOWNx60: strSnafuTag=apszSnafuTag[12];break;//buffer=_T("[Hunter]");break; //STRIKE BACK - case ET_MOD_UNKNOWNx76: strSnafuTag=apszSnafuTag[0];break;//buffer=_T("[DodgeBoards]");break; - case ET_MOD_UNKNOWNx50: - case ET_MOD_UNKNOWNxB1: - case ET_MOD_UNKNOWNxB4: - case ET_MOD_UNKNOWNxC8: - case ET_MOD_UNKNOWNxC9: strSnafuTag=apszSnafuTag[13];break;//buffer=_T("[Bionic 0.20 Beta]");break; - case ET_MOD_UNKNOWNxDA: strSnafuTag=apszSnafuTag[14];break;//buffer=_T("[Rumata (rus)(Plus v1f)]");break; - } - - return strSnafuTag; -} diff --git a/antileech/src/antiLeech.h b/antileech/src/antiLeech.h deleted file mode 100644 index ae333f1a3..000000000 --- a/antileech/src/antiLeech.h +++ /dev/null @@ -1,161 +0,0 @@ -#ifndef ANTILEECH_H -#define ANTILEECH_H - - -#pragma once - -#include "antiLeech_wx.h" -#include "CString_wx.h" - -class IantiLeech -{ -public: - virtual ~IantiLeech(){}; /* Bill Lee: Not be used currently */ - //BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD,LPVOID); - virtual DWORD GetDLPVersion() = 0; - //old versions to keep compatible - /* //drop old version support - virtual LPCTSTR DLPCheckModstring(LPCTSTR modversion, LPCTSTR clientversion); - virtual LPCTSTR DLPCheckUsername(LPCTSTR username); - virtual LPCTSTR DLPCheckNameAndHash(CString username, CString& userhash); - */ - //new versions - virtual LPCTSTR DLPCheckModstring_Hard(LPCTSTR modversion, LPCTSTR clientversion) = 0; - virtual LPCTSTR DLPCheckModstring_Soft(LPCTSTR modversion, LPCTSTR clientversion) = 0; - virtual LPCTSTR DLPCheckUsername_Hard(LPCTSTR username) = 0; - virtual LPCTSTR DLPCheckUsername_Soft(LPCTSTR username) = 0; - virtual LPCTSTR DLPCheckNameAndHashAndMod(const CString& username, const CString& userhash, const CString& modversion) = 0; - virtual LPCTSTR DLPCheckMessageSpam(LPCTSTR messagetext) = 0; - - - virtual LPCTSTR DLPCheckUserhash(const PBYTE userhash) = 0; - - - virtual LPCTSTR DLPCheckHelloTag(UINT tagnumber) = 0; - virtual LPCTSTR DLPCheckInfoTag(UINT tagnumber) = 0; - - //void TestFunc(); - -//Bill Lee: no need in interface abstract class -//private: -// static bool IsTypicalHex (const CString& addon); -}; - -//Bill Lee: never call delete on IantiLeech, use destoryAntiLeechInstat instead. -extern "C" IantiLeech* createAntiLeechInstant(); -extern "C" int destoryAntiLeechInstant(IantiLeech*); - -class CantiLeech: public IantiLeech -{ -public: - //BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD,LPVOID); - virtual DWORD GetDLPVersion(){ return DLPVersion; } - //old versions to keep compatible - /* //drop old version support - virtual LPCTSTR DLPCheckModstring(LPCTSTR modversion, LPCTSTR clientversion); - virtual LPCTSTR DLPCheckUsername(LPCTSTR username); - virtual LPCTSTR DLPCheckNameAndHash(CString username, CString& userhash); - */ - //new versions - virtual LPCTSTR DLPCheckModstring_Hard(LPCTSTR modversion, LPCTSTR clientversion); - virtual LPCTSTR DLPCheckModstring_Soft(LPCTSTR modversion, LPCTSTR clientversion); - virtual LPCTSTR DLPCheckUsername_Hard(LPCTSTR username); - virtual LPCTSTR DLPCheckUsername_Soft(LPCTSTR username); - virtual LPCTSTR DLPCheckNameAndHashAndMod(const CString& username, const CString& userhash, const CString& modversion); - virtual LPCTSTR DLPCheckMessageSpam(LPCTSTR messagetext); - - - virtual LPCTSTR DLPCheckUserhash(const PBYTE userhash); - - - virtual LPCTSTR DLPCheckHelloTag(UINT tagnumber); - virtual LPCTSTR DLPCheckInfoTag(UINT tagnumber); - - //void TestFunc(); - -private: - static const DWORD DLPVersion; - static bool IsTypicalHex (const CString& addon); -}; - -//<<< new tags from eMule 0.04x -#define CT_UNKNOWNx0 0x00 // Hybrid Horde protocol -#define CT_UNKNOWNx12 0x12 // http://www.haspepapa-welt.de (DodgeBoards) -#define CT_UNKNOWNx13 0x13 // http://www.haspepapa-welt.de (DodgeBoards) -#define CT_UNKNOWNx14 0x14 // http://www.haspepapa-welt.de (DodgeBoards) -#define CT_UNKNOWNx15 0x15 // http://www.haspepapa-welt.de (DodgeBoards) & DarkMule |eVorte|X| -#define CT_UNKNOWNx16 0x16 // http://www.haspepapa-welt.de (DodgeBoards) -#define CT_UNKNOWNx17 0x17 // http://www.haspepapa-welt.de (DodgeBoards) -#define CT_UNKNOWNx4D 0x4D // pimp my mule (00de) -#define CT_UNKNOWNxE6 0xE6 // http://www.haspepapa-welt.de -#define CT_UNKNOWNx22 0x22 // DarkMule |eVorte|X| -#define CT_UNKNOWNx5D 0x5D // md4 -#define CT_UNKNOWNx63 0x63 // ? -#define CT_UNKNOWNx64 0x64 // ? -#define CT_UNKNOWNx69 0x69 // eMuleReactor //Xman don't use this, it's webcache! -#define CT_UNKNOWNx6B 0x6B // md4 -#define CT_UNKNOWNx6C 0x6C // md4 -#define CT_UNKNOWNx74 0x74 // md4 -#define CT_UNKNOWNx76 0x76 // www.donkey2002.to -#define CT_UNKNOWNx79 0x79 // Bionic -#define CT_UNKNOWNx7A 0x7A // NewDarkMule -#define CT_UNKNOWNx83 0x83 // Fusspi -#define CT_UNKNOWNx87 0x87 // md4 -#define CT_UNKNOWNx88 0x88 // DarkMule v6 |eVorte|X| -#define CT_UNKNOWNx8c 0x8c // eMule v0.27c [LSD7c] -#define CT_UNKNOWNx8d 0x8d // unknown Leecher - (client version:60) -#define CT_UNKNOWNx94 0x94 // 00.de community //Xman 20.08.05 -#define CT_UNKNOWNx97 0x97 // Emulereactor Community Mod -#define CT_UNKNOWNx98 0x98 // Emulereactor Community Mod -#define CT_UNKNOWNx99 0x99 // eMule v0.26d [RAMMSTEIN 8b] -#define CT_UNKNOWNx9C 0x9C // Emulereactor Community Mod -#define CT_UNKNOWNxbb 0xbb // emule.de (client version:60) -#define CT_UNKNOWNxc4 0xc4 //MD5 Community from new bionic - hello -#define CT_UNKNOWNxC8 0xc8 // MD5 Community from new bionic - hello //Xman x4 -#define CT_UNKNOWNxCA 0xCA // NewDarkMule -#define CT_UNKNOWNxCD 0xCD // www.donkey2002.to -#define CT_UNKNOWNxCE 0xCE // FRZ community //Xman 20.08.05 -#define CT_UNKNOWNxCF 0xCF // FRZ community //Xman 20.08.05 -#define CT_UNKNOWNxDA 0xDA // Emulereactor Community Mod -#define CT_UNKNOWNxEC 0xec // SpeedMule and clones //Xman x4 -#define CT_UNKNOWNxF0 0xF0 // Emulereactor Community Mod -#define CT_UNKNOWNxF4 0xF4 // Emulereactor Community Mod -#define CT_UNKNOWNxD2 0xD2 // Chinese Leecher //SquallATF -//#define CT_UNKNOWNx85 0x85 // viper-israel.org and eChanblardNext //zz_fly, viper become good - -#define CT_FRIENDSHARING 0x66 //eWombat [SNAFU] -#define CT_DARK 0x54 //eWombat [SNAFU] -#define FRIENDSHARING_ID 0x5F73F1A0 // Magic Key, DO NOT CHANGE! - -// unknown eMule tags -#define ET_MOD_UNKNOWNx12 0x12 // http://www.haspepapa-welt.de -#define ET_MOD_UNKNOWNx13 0x13 // http://www.haspepapa-welt.de -#define ET_MOD_UNKNOWNx14 0x14 // http://www.haspepapa-welt.de -#define ET_MOD_UNKNOWNx17 0x17 // http://www.haspepapa-welt.de -#define ET_MOD_UNKNOWNx2F 0x2F // eMule v0.30 [OMEGA v.07 Heiko] -#define ET_MOD_UNKNOWNx30 0x30 // aMule 1.2.0 -#define ET_MOD_UNKNOWNx36 0x36 // eMule v0.26 -#define ET_MOD_UNKNOWNx3C 0x3C // enkeyDev.6 / LamerzChoice 9.9a -#define ET_MOD_UNKNOWNx41 0x41 // CrewMod (pre-release mod based on Plus) identification -#define ET_MOD_UNKNOWNx42 0x42 // CrewMod (pre-release mod based on Plus) key verification -#define ET_MOD_UNKNOWNx43 0x43 // CrewMod (pre-release mod based on Plus) version info -#define ET_MOD_UNKNOWNx50 0x50 // Bionic 0.20 Beta] -#define ET_MOD_UNKNOWNx59 0x59 // emule 0.40 / eMule v0.30 [LSD.12e] -#define ET_MOD_UNKNOWNx5B 0x5B // eMule v0.26 -#define ET_MOD_UNKNOWNx60 0x60 // eMule v0.30a Hunter.6 + eMule v0.26 -#define ET_MOD_UNKNOWNx64 0x64 // LSD.9dT / Athlazan(0.29c)Alpha.3 -#define ET_MOD_UNKNOWNx76 0x76 // http://www.haspepapa-welt.de (DodgeBoards) -#define ET_MOD_UNKNOWNx84 0x84 // eChanblardv3.2 -#define ET_MOD_UNKNOWNx85 0x85 // ? -#define ET_MOD_UNKNOWNx86 0x86 // ? -#define ET_MOD_UNKNOWNx93 0x93 // ? -#define ET_MOD_UNKNOWNxA6 0xA6 // eMule v0.26 -#define ET_MOD_UNKNOWNxB1 0xB1 // Bionic 0.20 Beta] -#define ET_MOD_UNKNOWNxB4 0xB4 // Bionic 0.20 Beta] -#define ET_MOD_UNKNOWNxC8 0xC8 // Bionic 0.20 Beta] -#define ET_MOD_UNKNOWNxC9 0xC9 // Bionic 0.20 Beta] -#define ET_MOD_UNKNOWNxDA 0xDA // Rumata (rus)(Plus v1f) - leecher mod? -//>>> eWombat [SNAFU_V3] - -#undef __declspec -#endif diff --git a/antileech/src/antiLeech_wx.cpp b/antileech/src/antiLeech_wx.cpp deleted file mode 100644 index 887f11e50..000000000 --- a/antileech/src/antiLeech_wx.cpp +++ /dev/null @@ -1,25 +0,0 @@ -//Author: greensea -#include "antiLeech_wx.h" //Modified by Bill Lee. - -//Bug fixed by Orzogc Lee -LPCTSTR StrStrI(LPCTSTR haystack, LPCTSTR needle){ - //Bill Lee: allocate wchar array on the stack - wchar_t haystacki[512]; - wchar_t needlei[512]; - int i = 0; - do{ - haystacki[i] = towlower(haystack[i]); - if(i == 511) - break; - }while(haystack[i++]); //As haystacki is allocated on the stack, it wans't set 0. So the NULL needs to be copy. - i = 0; - do{ - needlei[i] = towlower(needle[i]); - if(i == 511) - break; - }while(needle[i++]); - const wchar_t* ret = wcsstr(haystacki, needlei); - if(ret != NULL) - ret = ret - haystacki + haystack; - return ret; -} diff --git a/antileech/src/antiLeech_wx.h b/antileech/src/antiLeech_wx.h deleted file mode 100644 index 8ebbd28e3..000000000 --- a/antileech/src/antiLeech_wx.h +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef ANTILEECH_WX_H -#define ANTILEECH_WX_H - -#include -#include -#include // for towlower() - -#define LPCTSTR const wxChar* -#define BOOL bool -//#define _T(var) wxT(var) //defined in wxWidgets -#define DWORD wxUint32 -#define UINT wxUint16 -#define WINAPI -#define HINSTANCE -#define LPVOID void* -#define PBYTE unsigned char* -#define TCHAR wxChar -#define _TINT wxInt32 -#define SSIZE_T ptrdiff_t - -#define StrCmpI _tcsicmp -#define _tcsicmp _wcsicmp - -#define _istdigit(var) iswdigit(var) -#define _istcntrl(var) iswcntrl(var) -#define _istpunct(var) iswpunct(var) -#define _istspace(var) iswspace(var) -#define _istxdigit(var) iswxdigit(var) -inline float _tstof(const wchar_t* str){ - wchar_t** ptail = NULL; - return wcstof(str, ptail); -} -//This function is not used. by Orzogc Lee -//But I think there is no need to removing, linker will remove it. -/* -inline void tolowers(wxChar* str){ - int i = 0; - do{ - str[i] = towlower(str[i]); - }while(str[++i]); -} -*/ -#define _tcsstr(haystack, needle) wcsstr(haystack, needle) -#define _tcslen(var) wcslen(var) -#define StrStr(a, b) wcsstr(a, b) -#define StrStrIW(a, b) StrStrI(a, b) - -LPCTSTR StrStrI(LPCTSTR haystack, LPCTSTR needle); -//Bill Lee: I think inlining this function make no senses, because it is a very large operation. - -#define _wcsicmp(a, b) wcscasecmp(a, b) -#define StrCmpIW(a, b) wcscasecmp(a, b) - -#endif diff --git a/antileech/src/autogen.sh b/antileech/src/autogen.sh deleted file mode 100644 index ddd3277f3..000000000 --- a/antileech/src/autogen.sh +++ /dev/null @@ -1,8 +0,0 @@ -mkdir -pv m4 -libtoolize -aclocal -aclocal -I m4 -automake --add-missing --copy -autoconf - - diff --git a/antileech/src/configure.ac b/antileech/src/configure.ac deleted file mode 100644 index 389e19446..000000000 --- a/antileech/src/configure.ac +++ /dev/null @@ -1,44 +0,0 @@ -# -*- Autoconf -*- -# Process this file with autoconf to produce a configure script. -# Copyright (C) 2011 Bill Lee -# License: GNU GPL v3 or any later version released by Free Software Foundation - -#AC_PREREQ([2.65]) -AC_INIT([antiLeech], [44], [https://github.com/persmule/amule-dlp/issues]) -AC_CONFIG_MACRO_DIR([m4]) -AM_INIT_AUTOMAKE() -AC_CONFIG_SRCDIR([antiLeech.cpp]) -#AC_CONFIG_HEADERS([config.h]) - -# Checks for programs. -AC_PROG_CXX -AC_PROG_CC -AC_PROG_CPP -AC_PROG_MAKE_SET -AM_DISABLE_STATIC -AC_PROG_LIBTOOL - -#Check for wx-config - -AC_CHECK_PROG(WXCONFIG, [wx-config], [wx-config]) -ANTILEECH_CPPFLAGS=$(wx-config --cppflags) - -AC_SUBST(ANTILEECH_CPPFLAGS) - -# Checks for libraries. -ANTILEECH_LDFLAGS= - -AC_SUBST(ANTILEECH_LDFLAGS) - -# Checks for header files. -AC_CHECK_HEADERS([string.h], [wx/string.h], [wx/defs.h]) - -# Checks for typedefs, structures, and compiler characteristics. -AC_HEADER_STDBOOL -AC_C_INLINE -AC_TYPE_SIZE_T - -# Checks for library functions. - -AC_CONFIG_FILES([Makefile]) -AC_OUTPUT diff --git a/antileech/src/sdc2amule.diff b/antileech/src/sdc2amule.diff deleted file mode 100644 index e08a3a75d..000000000 --- a/antileech/src/sdc2amule.diff +++ /dev/null @@ -1,61 +0,0 @@ ---- antiLeech.cpp.win 2016-02-15 19:31:18.748711749 +0800 -+++ antiLeech.cpp 2016-02-15 20:49:25.691484626 +0800 -@@ -17,8 +17,11 @@ - //Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - --#include -+#include "CString_wx.h" - #include "antiLeech.h" -+#define __declspec(var) CantiLeech:: -+#define SPECIAL_DLP_VERSION -+#define ALL_VERYCD_MOD - - #ifdef _DEBUG - #define new DEBUG_NEW -@@ -51,7 +54,10 @@ LPCTSTR apszSnafuTag[]= - //,_T("[eChanblardNext]") //21 zz_fly - }; - -+const DWORD CantiLeech::DLPVersion = 4405; - -+//deactivate M$WIN-specific codes -+#if 0 - BOOL WINAPI DllMain ( - HANDLE hModule, - DWORD dwFunction, -@@ -74,6 +80,7 @@ void __declspec(dllexport) TestFunc() - { - ::MessageBox(NULL,_T("Inside the DLL!"),_T("Nix"),0); - } -+#endif - - //old versions just to keep compatible - /* //drop old version support -@@ -285,7 +292,7 @@ LPCTSTR __declspec(dllexport) DLPCheckNa - */ - //end old version ------------------------------------------ - --bool IsTypicalHex(CString& addon) -+bool CantiLeech::IsTypicalHex(const CString& addon) - { - if(addon.GetLength()>25 || addon.GetLength()<5) - return false; -@@ -1244,7 +1251,7 @@ LPCTSTR __declspec(dllexport) DLPCheckUs - return NULL; - } - --LPCTSTR __declspec(dllexport) DLPCheckNameAndHashAndMod(CString username, CString& userhash, CString& modversion) -+LPCTSTR __declspec(dllexport) DLPCheckNameAndHashAndMod(const CString& username, const CString& userhash, const CString& modversion) - { - if(username.IsEmpty() || userhash.IsEmpty()) - return NULL; -@@ -1309,7 +1316,7 @@ LPCTSTR __declspec(dllexport) DLPCheckNa - - //Check for aedit - //remark: a unmodded emule can't send a space at last sign -- if(modversion.IsEmpty() && username.Right(1)==32) -+ if(modversion.IsEmpty() && username.Right(1)==_T(" ")) - return _T("AEdit"); - - //Check for Hex-Modstring diff --git a/luci-app-amule/Makefile b/luci-app-amule/Makefile deleted file mode 100644 index d849f99c4..000000000 --- a/luci-app-amule/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (C) 2016 Openwrt.org -# -# This is free software, licensed under the Apache License, Version 2.0 . -# - -include $(TOPDIR)/rules.mk - -LUCI_TITLE:=LuCI support for Amule -LUCI_DEPENDS:=+amule-dlp -LUCI_PKGARCH:=all - -include $(TOPDIR)/feeds/luci/luci.mk - -# call BuildPackage - OpenWrt buildroot signature - diff --git a/luci-app-amule/luasrc/controller/amule.lua b/luci-app-amule/luasrc/controller/amule.lua deleted file mode 100644 index 25a90f604..000000000 --- a/luci-app-amule/luasrc/controller/amule.lua +++ /dev/null @@ -1,161 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - amule support - -Copyright 2016 maz-1 - -Licensed 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 -]]-- - -module("luci.controller.amule", package.seeall) -local uci = luci.model.uci.cursor() -local configdir = uci:get("amule", "main", "config_dir") - -function index() - if not nixio.fs.access("/etc/config/amule") then - return - end - - entry({"admin", "nas"}, firstchild(), "NAS", 45).dependent = false - - local page = entry({"admin", "nas", "amule"}, cbi("amule"), _("aMule Settings")) - page.dependent = true - page.acl_depends = { "luci-app-amule" } - entry( {"admin", "nas", "amule", "logview"}, call("logread") ).leaf = true - entry( {"admin", "nas", "amule", "status"}, call("get_pid") ).leaf = true - entry( {"admin", "nas", "amule", "amulecmd"}, call("amulecmd") ).leaf = true - entry( {"admin", "nas", "amule", "startstop"}, post("startstop") ).leaf = true - entry( {"admin", "nas", "amule", "down_kad"}, post("down_kad") ).leaf = true - entry( {"admin", "nas", "amule", "down_ed2k"}, post("down_ed2k") ).leaf = true - -end - --- called by XHR.get from detail_logview.htm -function logread() - -- read application settings - local uci = luci.model.uci.cursor() - local logdir = uci:get("amule", "main", "config_dir") or "/var/run/amule" - uci:unload("amule") - - local ldata=nixio.fs.readfile(logdir .. "/logfile") - if not ldata or #ldata == 0 then - ldata="_nodata_" - end - luci.http.write(ldata) -end - --- called by XHR.get from detail_startstop.htm -function startstop() - local pid = get_pid(true) - if pid > 0 then - luci.sys.call("/etc/init.d/amule stop") - nixio.nanosleep(1) -- sleep a second - if nixio.kill(pid, 0) then -- still running - nixio.kill(pid, 9) -- send SIGKILL - end - pid = 0 - else - luci.sys.call("/etc/init.d/amule start") - nixio.nanosleep(1) -- sleep a second - pid = tonumber(luci.sys.exec("pidof amuled")) or 0 - if pid > 0 and not nixio.kill(pid, 0) then - pid = 0 -- process did not start - end - end - luci.http.write(tostring(pid)) -- HTTP needs string not number -end - -function down_kad() - url = uci:get("amule", "main", "kad_nodes_url") - data_path = configdir .. "/nodes.dat" - proto = string.gsub(url, "://%S*", "") - proto_opt = ( proto == "https" ) and " --no-check-certificate" or "" - cmd = "wget -O /tmp/down_nodes.dat \"" .. url .. "\"" .. proto_opt .. - " && cat /tmp/down_nodes.dat > " .. "\"" .. data_path .. "\"" - luci.sys.call(cmd) -end - -function down_ed2k() - url = uci:get("amule", "main", "ed2k_servers_url") - data_path = configdir .. "/server.met" - proto = string.gsub(url, "://%S*", "") - proto_opt = ( proto == "https" ) and " --no-check-certificate" or "" - cmd = "wget -O /tmp/down_server.met \"" .. url .. "\"" .. proto_opt .. - " && cat /tmp/down_server.met > " .. "\"" .. data_path .. "\"" - luci.sys.call(cmd) -end - --- called by XHR.poll from detail_startstop.htm --- and from lua (with parameter "true") -function get_pid(from_lua) - local pid_amuled = tonumber(luci.sys.exec("pidof amuled")) or 0 - local amuled_stat =false - if pid_amuled > 0 and not nixio.kill(pid_amuled, 0) then - pid_amuled = 0 - end - - if pid_amuled > 0 then - amuled_stat =true - else - amuled_stat =false - end - - local pid_amuleweb = tonumber(luci.sys.exec("pidof amuleweb")) or 0 - local amuleweb_stat = false - if pid_amuleweb > 0 and not nixio.kill(pid_amuleweb, 0) then - pid_amuleweb = 0 - end - - if pid_amuleweb > 0 then - amuleweb_stat =true - else - amuleweb_stat =false - end - - local status = { - amuled = amuled_stat, - amuled_pid = pid_amuled, - amuleweb = amuleweb_stat - } - - if from_lua then - return pid_amuled - else - luci.http.prepare_content("application/json") - luci.http.write_json(status) - end -end - - -function amulecmd() - local re ="" - local rv = { } - local cmd = luci.http.formvalue("cmd") - local full_cmd = "HOME=\""..configdir.. "\" /usr/bin/amulecmd".." -c \""..cmd.."\" 2>&1" - - local shellpipe = io.popen(full_cmd,"rw") - re = shellpipe:read("*a") - shellpipe:close() - if not re then - re="" - end - - re = string.gsub(re, "This is amulecmd %S*\n", "") - re = string.gsub(re, "Creating client%S*\n", "") - re = string.gsub(re, "Succeeded! Connection established to aMule %S*\n", "") - - re = string.gsub(re, "\n", "\r\n") - - rv[#rv+1]=re - - if #rv > 0 then - luci.http.prepare_content("application/json") - luci.http.write_json(rv) - return - end - - luci.http.status(404, "No such device") -end diff --git a/luci-app-amule/luasrc/model/cbi/amule.lua b/luci-app-amule/luasrc/model/cbi/amule.lua deleted file mode 100644 index b18138f85..000000000 --- a/luci-app-amule/luasrc/model/cbi/amule.lua +++ /dev/null @@ -1,456 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - Aria2 support - -Copyright 2016 maz-1 -]]-- - -local sys = require "luci.sys" -local util = require "luci.util" -local uci = require "luci.model.uci".cursor() - -ptype = { - "socks5", - "socks4", - "http", - "socks4a", -} - -whocan = { - "anyone", - "friends", - "nobody", -} - -function titlesplit(Value) - return "

" .. translate(Value) .. "

" -end - -m = Map("amule", translate("aMule"), translate("aMule is a ED2K/KAD client for all platforms.") .. "
luci interface by maz-1") - -m:section(SimpleSection).template = "amule/overview_status" - -s = m:section(TypedSection, "amule", translate("aMule Settings")) -s.addremove = false -s.anonymous = true - -s:tab("general", translate("General")) -s:tab("connection", translate("Connections")) -s:tab("server", translate("Server")) -s:tab("path_and_file", translate("Path And File")) -s:tab("security", translate("Security")) -s:tab("remote", translate("External Control")) -s:tab("template", translate("Edit Template")) -s:tab("logview", translate("Log File Viewer")) -s:tab("amulecmd", translate("aMule command")) - --- GENERAL -- - -o = s:taboption("general", Flag, "enabled", translate("Enabled")) -o.rmempty = false - -user = s:taboption("general", ListValue, "runasuser", translate("Run daemon as user")) -local p_user -for _, p_user in util.vspairs(util.split(sys.exec("cat /etc/passwd | cut -f 1 -d :"))) do - user:value(p_user) -end - -o = s:taboption("general", Value, "config_dir", translate("Configuration directory")) -o.rmempty = false -o.placeholder = "/var/run/amule" - -o = s:taboption("general", Value, "mem_percentage", translate("Memory Limit"), translate("Percentage")) -o.rmempty = false -o.placeholder = "50" -o.datatype = "range(1, 99)" - -o = s:taboption("general", Value, "nick", translate("Nickname")) -o.placeholder = "http://www.aMule.org" - -o = s:taboption("general", Value, "max_upload", translate("Max upload speed"), translate("Unlimited when set to 0")) -o.datatype = "uinteger" -o.rmempty = false -o.placeholder = "0" - -o = s:taboption("general", Value, "max_download", translate("Max download speed"), translate("Unlimited when set to 0")) -o.datatype = "uinteger" -o.rmempty = false -o.placeholder = "0" - -o = s:taboption("general", Value, "slot_allocation", translate("Slot allocation")) -o.datatype = "uinteger" -o.rmempty = false -o.placeholder = "2" - -o = s:taboption("general", Value, "max_connections", translate("Max connections")) -o.datatype = "uinteger" -o.rmempty = false -o.placeholder = "500" - -o = s:taboption("general", Value, "max_sources_per_file", translate("Max sources per file")) -o.datatype = "uinteger" -o.rmempty = false -o.placeholder = "300" - --- CONNECTIONS -- - -o = s:taboption("connection", Value, "port", translate("TCP port")) -o.datatype = "port" -o.rmempty = false -o.placeholder = "4662" - -o = s:taboption("connection", Flag, "udp_enable", translate("Enable UDP port")) -o.rmempty = false - -o = s:taboption("connection", Value, "udp_port", translate("UDP port")) -o.datatype = "port" -o.rmempty = false -o.placeholder = "4672" - -o = s:taboption("connection", Flag, "upnp_enabled", translate("Enable UPnP")) -o.rmempty = false - -o = s:taboption("connection", Value, "upnp_tcp_port", translate("UPnP TCP port")) -o.datatype = "port" -o.rmempty = false -o.placeholder = "50000" - -o = s:taboption("connection", Value, "address", translate("Bind Address"), translate("Leave blank to bind all")) -o.datatype = "ip4addr" -o.rmempty = true - -o = s:taboption("connection", Flag, "auto_connect", translate("Automatically connect")) -o.rmempty = false - -o = s:taboption("connection", Flag, "reconnect", translate("Automatically reconnect")) -o.rmempty = false - -o = s:taboption("connection", Flag, "connect_to_kad", translate("Connect to Kad network")) -o.rmempty = false - -o = s:taboption("connection", Flag, "connect_to_ed2k", translate("Connect to ED2K network")) -o.rmempty = false - -s:taboption("connection", DummyValue,"titlesplit1" ,titlesplit(translate("Proxy Configuration"))) - -o = s:taboption("connection", Flag, "proxy_enable_proxy", translate("Enable proxy")) -o.rmempty = false - -o = s:taboption("connection", ListValue, "proxy_type", translate("Proxy type")) -for i,v in ipairs(ptype) do - o:value(v) -end -o.rmempty = false - -o = s:taboption("connection", Value, "proxy_name", translate("Proxy name")) -o.rmempty = true - -o = s:taboption("connection", Value, "proxy_port", translate("Proxy port")) -o.datatype = "port" -o.rmempty = true - -o = s:taboption("connection", Flag, "proxy_enable_password", translate("Proxy requires authentication")) -o.rmempty = true - -o = s:taboption("connection", Value, "proxy_user", translate("Proxy user")) ---o:depends("proxy_enable_password", "1") -o.rmempty = true - -o = s:taboption("connection", Value, "proxy_password", translate("Proxy password")) -o.password = true -o.rmempty = true - --- SERVER -- - -o = s:taboption("server", Value, "kad_nodes_url", translate("Kad Nodes Url"), "") -o.rmempty = false -o.placeholder = "http://upd.emule-security.org/nodes.dat" - -o = s:taboption("server", Value, "ed2k_servers_url", translate("Ed2k Servers List Url"), "") -o.rmempty = false -o.placeholder = "http://upd.emule-security.org/server.met" - -o = s:taboption("server", Flag, "remove_dead_server", translate("Remove Dead Server")) -o.rmempty = false - -o = s:taboption("server", Value, "dead_server_retry", translate("Dead Server Retry")) ---o:depends("remove_dead_server", "1") -o.datatype = "uinteger" -o.rmempty = false -o.placeholder = "3" -o.default = "3" - -o = s:taboption("server", Flag, "add_server_list_from_server", translate("Update server list when connecting to a server")) -o.rmempty = false - -o = s:taboption("server", Flag, "add_server_list_from_client", translate("Update server list when a client connects")) -o.rmempty = false - -o = s:taboption("server", Flag, "scoresystem", translate("Use priority system")) -o.rmempty = false - -o = s:taboption("server", Flag, "smart_id_check", translate("Use smart LowID check on connect")) -o.rmempty = false - -o = s:taboption("server", Flag, "safe_server_connect", translate("Safe connect")) -o.rmempty = false - -o = s:taboption("server", Flag, "auto_connect_static_only", translate("Auto connect to servers in static list only")) -o.rmempty = false - -o = s:taboption("server", Flag, "manual_high_prio", translate("Set manually added servers to high priority")) -o.rmempty = false - -o = s:taboption("server", Flag, "serverlist", translate("Auto update server list at startup"), translate("addresses.dat file")) -o.rmempty = false - -addr = s:taboption("server", Value, "addresses", translate("Server addresses"), - translate("Content of addresses.dat. One address per line")) -addr:depends("serverlist", "1") -addr.template = "cbi/tvalue" -addr.rows = 5 -addr.rmempty = true -function addr.cfgvalue(self, section) - return nixio.fs.readfile("/etc/amule/addresses.dat") -end - -function addr.write(self, section, value) - value = value:gsub("\r\n?", "\n") - nixio.fs.writefile("//etc/amule/addresses.dat", value) -end - --- PATH AND FILE -- - -o = s:taboption("path_and_file", Value, "temp_dir", translate("Temporary directory")) -o.rmempty = false -o.placeholder = "/var/run/amule/.aMule/Temp" - -o = s:taboption("path_and_file", Value, "incoming_dir", translate("Incoming directory")) -o.rmempty = false -o.placeholder = "/var/run/amule/.aMule/Incoming" - - -shareddir = s:taboption("path_and_file", Value, "shareddir", translate("Shared directory"), - translate("Content of shareddir.dat. One directory per line")) -shareddir.template = "cbi/tvalue" -shareddir.titleref = luci.dispatcher.build_url("admin", "system", "fstab") -shareddir.rows = 5 -shareddir.rmempty = true -function shareddir.cfgvalue(self, section) - return nixio.fs.readfile("/etc/amule/shareddir.dat") -end - -function shareddir.write(self, section, value) - value = value:gsub("\r\n?", "\n") - nixio.fs.writefile("//etc/amule/shareddir.dat", value) -end - -o = s:taboption("path_and_file", Flag, "ich", translate("Intelligent corruption handling (I.C.H.)")) -o.rmempty = false - -o = s:taboption("path_and_file", Flag, "a_ich_trust", translate("Advanced I.C.H trusts every hash (not recommended)")) -o.rmempty = false - -o = s:taboption("path_and_file", Flag, "add_new_files_paused", translate("Add files to download in pause mode")) -o.rmempty = false - -o = s:taboption("path_and_file", Flag, "dap_pref", translate("Add files to download with auto priority")) -o.rmempty = false - -o = s:taboption("path_and_file", Flag, "start_next_file", translate("Start next paused file when a file completes")) -o.rmempty = false - -o = s:taboption("path_and_file", Flag, "start_next_file_same_cat", translate("Start next paused file from the same category")) -o:depends("start_next_file", "1") -o.rmempty = true - -o = s:taboption("path_and_file", Flag, "start_next_file_alpha", translate("Start next paused file in alphabetic order")) -o:depends("start_next_file", "1") -o.rmempty = true - -o = s:taboption("path_and_file", Flag, "allocate_full_file", translate("Preallocate disk space for new files")) -o.rmempty = false - -o = s:taboption("path_and_file", Value, "min_free_disk_space", translate("Minimum free disk space. in Mbytes")) -o.datatype = "uinteger" -o.placeholder = "1" -o.rmempty = false - -o = s:taboption("path_and_file", Flag, "use_src_seed", translate("Save 10 sources on rare files (< 20 sources)")) -o.rmempty = false - -o = s:taboption("path_and_file", Flag, "uap_pref", translate("Add new shares with auto priority")) -o.rmempty = false - - --- SECURITY -- - - -o = s:taboption("security", Flag, "use_sec_ident", translate("Use secure user identification")) -o.rmempty = false - -o = s:taboption("security", Flag, "is_crypt_layer_requested", translate("Use obfuscation for outgoing connections")) -o.rmempty = false - -o = s:taboption("security", Flag, "is_client_crypt_layer_required", translate("Accept only obfuscation connections")) -o.rmempty = false - -o = s:taboption("security", ListValue, "see_share", translate("Who can see my shared files")) -for i,v in ipairs(whocan) do - o:value(v) -end -o.rmempty = false - -s:taboption("security", DummyValue,"titlesplit2" ,titlesplit(translate("IP Filter Configuration"))) - -shareddir = s:taboption("security", Value, "ipfilter_static", translate("Static IP list for filtering"), - translate("Content of ipfilter_static.dat")) -shareddir.template = "cbi/tvalue" -shareddir.titleref = luci.dispatcher.build_url("admin", "system", "fstab") -shareddir.rows = 5 -shareddir.rmempty = true -function shareddir.cfgvalue(self, section) - return nixio.fs.readfile("/etc/amule/ipfilter_static.dat") -end - -function shareddir.write(self, section, value) - value = value:gsub("\r\n?", "\n") - nixio.fs.writefile("//etc/amule/ipfilter_static.dat", value) -end - -o = s:taboption("security", Flag, "ip_filter_clients", translate("Filter clients by IP")) -o.rmempty = false - -o = s:taboption("security", Flag, "ip_filter_servers", translate("Filter servers by IP")) -o.rmempty = false - -o = s:taboption("security", Value, "ip_filter_url", translate("IP filter list URL")) -o.rmempty = true - -o = s:taboption("security", Flag, "ip_filter_auto_load", translate("Auto-update ipfilter at startup")) -o.rmempty = false - -o = s:taboption("security", Value, "filter_level", translate("Filtering Level")) -o.datatype = "range(1, 255)" -o.rmempty = false -o.placeholder = "127" - -o = s:taboption("security", Flag, "filter_lan_ips", translate("Always filter LAN IPs")) -o.rmempty = false - -o = s:taboption("security", Flag, "paranoid_filtering", translate("Paranoid handling of non-matching IPs")) -o.rmempty = false - -o = s:taboption("security", Flag, "ip_filter_system", translate("Use system-wide ipfilter.dat if available")) -o.rmempty = false - --- REMOTE CONTROL -- - -o = s:taboption("remote", Value, "ec_address", translate("IP of the listening interface for external connection")) -o.datatype = "ip4addr" -o.placeholder = "127.0.0.1" -o.rmempty = true - -o = s:taboption("remote", Value, "ec_port", translate("TCP port for EC")) -o.datatype = "port" -o.placeholder = "4712" -o.rmempty = false - -o = s:taboption("remote", Flag, "upnp_ec_enabled", translate("Enable upnp port forwarding on the EC port")) -o.rmempty = false - -o = s:taboption("remote", Value, "ec_password", translate("EC password")) -o.password = true -o.rmempty = false - -s:taboption("remote", DummyValue,"titlesplit3", titlesplit(translate("aMule Web Configuration"))) - -o = s:taboption("remote", Flag, "web_enabled", translate("Enable web server on startup")) -o.rmempty = false - -o = s:taboption("remote", Value, "template", translate("Web template")) -o.rmempty = false -local tpth_suggestions = luci.sys.exec("ls /usr/share/amule/webserver/|sed ':a;N;$!ba;s/\\n/:/g'") -if tpth_suggestions then - for entry in string.gmatch(tpth_suggestions, "[^:]+") do - o:value(entry) - end -end - -o = s:taboption("remote", Value, "web_password", translate("Web full rights password")) -o.password = true -o.rmempty = true - -o = s:taboption("remote", Flag, "use_low_rights_user", translate("Use low rights user")) -o.rmempty = false - -o = s:taboption("remote", Value, "password_low", translate("Web low rights password")) -o.password = true -o.rmempty = true - -o = s:taboption("remote", Value, "web_port", translate("Web TCP port")) -o.datatype = "port" -o.placeholder = "4711" -o.rmempty = false - -o = s:taboption("remote", Flag, "upnp_web_server_enabled", translate("Enable UPnP port forwarding of the web server port")) -o.rmempty = false - -o = s:taboption("remote", Value, "web_upnp_tcp_port", translate("Web UPnP TCP port")) -o.datatype = "port" -o.placeholder = "50001" -o.rmempty = false - -o = s:taboption("remote", Value, "page_refresh_time", translate("Page refresh time(in secs)")) -o.datatype = "range(1, 600)" -o.rmempty = false -o.placeholder = "121" - -o = s:taboption("remote", Flag, "use_gzip", translate("Enable Gzip compression")) -o.rmempty = false - - --- TEMPLATE -- - - -tmpl = s:taboption("template", Value, "_tmpl", - translate("Edit the template that is used for generating the aMule configuration."), - translate("This is the content of the file '/etc/amule/amule.conf.template' from which your amule configuration will be generated. " .. - "Values enclosed by pipe symbols ('|') should not be changed. They get their values from other tabs.")) - -tmpl.template = "cbi/tvalue" -tmpl.rows = 20 - -function tmpl.cfgvalue(self, section) - return nixio.fs.readfile("/etc/amule/amule.conf.template") -end - -function tmpl.write(self, section, value) - value = value:gsub("\r\n?", "\n") - nixio.fs.writefile("//etc/amule/amule.conf.template", value) -end - --- LOGVIEW -- - -local lv = s:taboption("logview", DummyValue, "_logview") -lv.template = "amule/detail_logview" -lv.inputtitle = translate("Read / Reread log file") -lv.rows = 50 - -function lv.cfgvalue(self, section) - return translate("Please press [Read] button") -end - --- AMULECMD -- - -local cmd = s:taboption("amulecmd", DummyValue, "_amulecmd") -cmd.template = "amule/webshell" - -return m diff --git a/luci-app-amule/luasrc/view/amule/detail_logview.htm b/luci-app-amule/luasrc/view/amule/detail_logview.htm deleted file mode 100644 index 7a77fb6b3..000000000 --- a/luci-app-amule/luasrc/view/amule/detail_logview.htm +++ /dev/null @@ -1,56 +0,0 @@ - - - - -<%+cbi/valueheader%> - -
- -<% --- one button on top, one at the buttom -%> - /> - -

- -<% --- set a readable style taken from openwrt theme for textarea#syslog --- in openwrt theme there are problems with a width of 100 so we check for theme and set to lower value -%> - -

- -<% --- one button on top, one at the buttom -%> - /> - -<%+cbi/valuefooter%> - diff --git a/luci-app-amule/luasrc/view/amule/overview_status.htm b/luci-app-amule/luasrc/view/amule/overview_status.htm deleted file mode 100644 index 37f02b18b..000000000 --- a/luci-app-amule/luasrc/view/amule/overview_status.htm +++ /dev/null @@ -1,84 +0,0 @@ - - -
- <%:aMule Status%> -

- <%:Collecting data...%> -

-

- <%:Collecting data...%> -

-
diff --git a/luci-app-amule/luasrc/view/amule/webshell.htm b/luci-app-amule/luasrc/view/amule/webshell.htm deleted file mode 100644 index 40574e00c..000000000 --- a/luci-app-amule/luasrc/view/amule/webshell.htm +++ /dev/null @@ -1,90 +0,0 @@ - - - - diff --git a/luci-app-amule/po/zh-cn b/luci-app-amule/po/zh-cn deleted file mode 120000 index 8d69574dd..000000000 --- a/luci-app-amule/po/zh-cn +++ /dev/null @@ -1 +0,0 @@ -zh_Hans \ No newline at end of file diff --git a/luci-app-amule/po/zh_Hans/amule.po b/luci-app-amule/po/zh_Hans/amule.po deleted file mode 100644 index 18f7184d5..000000000 --- a/luci-app-amule/po/zh_Hans/amule.po +++ /dev/null @@ -1,360 +0,0 @@ -msgid "aMule is a ED2K/KAD client for all platforms." -msgstr "aMule是一个跨平台的ED2K/KAD客户端" - -msgid "NAS" -msgstr "网络存储" - -msgid "General" -msgstr "常规" - -msgid "Connections" -msgstr "连接" - -msgid "Server" -msgstr "服务器" - -msgid "Path And File" -msgstr "路径和文件" - -msgid "Security" -msgstr "安全" - -msgid "External Control" -msgstr "远程控制" - -msgid "Edit Template" -msgstr "编辑配置模版" - -msgid "Log File Viewer" -msgstr "日志查看" - -msgid "aMule Settings" -msgstr "aMule设置" - -msgid "Run daemon as user" -msgstr "运行守护进程的用户" - -msgid "Configuration directory" -msgstr "配置目录" - -msgid "Nickname" -msgstr "昵称" - -msgid "Max upload speed" -msgstr "最大上传速度" - -msgid "Max download speed" -msgstr "最大下载速度" - -msgid "Unlimited when set to 0" -msgstr "设为0时不限制" - -msgid "Slot allocation" -msgstr "槽速度" - -msgid "Max connections" -msgstr "最大连接数" - -msgid "Max sources per file" -msgstr "单文件最大连接数" - -msgid "TCP port" -msgstr "TCP端口" - -msgid "UDP port" -msgstr "UDP端口" - -msgid "Enable UDP port" -msgstr "启用UDP端口" - -msgid "Enable UPnP" -msgstr "启用UPnP" - -msgid "UPnP TCP port" -msgstr "UPnP TCP端口" - -msgid "Bind Address" -msgstr "地址绑定" - -msgid "Leave blank to bind all" -msgstr "留空则全部绑定" - -msgid "Default to bind all" -msgstr "默认全部绑定" - -msgid "Automatically connect" -msgstr "自动连接" - -msgid "Automatically reconnect" -msgstr "自动重连" - -msgid "Connect to Kad network" -msgstr "连接到Kad网络" - -msgid "Connect to ED2K network" -msgstr "连接到ED2K网络" - -msgid "Proxy Configuration" -msgstr "代理设置" - -msgid "Enable proxy" -msgstr "启用代理" - -msgid "Proxy type" -msgstr "代理类型" - -msgid "Proxy name" -msgstr "代理名称" - -msgid "Proxy port" -msgstr "代理端口" - -msgid "Proxy requires authentication" -msgstr "代理需要认证" - -msgid "Proxy user" -msgstr "代理用户" - -msgid "Proxy password" -msgstr "代理密码" - -msgid "Kad Nodes Url" -msgstr "Kad节点URL" - -msgid "Ed2k Servers List Url" -msgstr "Ed2k服务器列表URL" - -msgid "Remove Dead Server" -msgstr "删除无效服务器" - -msgid "Dead Server Retry" -msgstr "删除前重连次数" - -msgid "Update server list when connecting to a server" -msgstr "与服务器连接时更新服务器列表" - -msgid "Update server list when a client connects" -msgstr "与其他用户连接时更新服务器列表" - -msgid "Use priority system" -msgstr "启用优先级系统" - -msgid "Use smart LowID check on connect" -msgstr "智能LOWID检测" - -msgid "Safe connect" -msgstr "安全连接" - -msgid "Auto connect to servers in static list only" -msgstr "只自动连接到静态列表中的服务器" - -msgid "Set manually added servers to high priority" -msgstr "将手动输入的服务器设为高优先级" - -msgid "Auto update server list at startup" -msgstr "启动时自动更新服务器列表" - -msgid "addresses.dat file" -msgstr "addresses.dat文件" - -msgid "Server addresses" -msgstr "服务器地址" - -msgid "Content of addresses.dat. One address per line" -msgstr "addresses.dat的内容. 每行一个地址." - -msgid "Temporary directory" -msgstr "临时文件夹" - -msgid "Incoming directory" -msgstr "下载文件夹" - -msgid "Shared directory" -msgstr "共享文件夹" - -msgid "Content of shareddir.dat. One directory per line" -msgstr "shareddir.dat的内容. 每行一个目录." - -msgid "Intelligent corruption handling (I.C.H.)" -msgstr "智能损坏数据处理(I.C.H.)" - -msgid "Advanced I.C.H trusts every hash (not recommended)" -msgstr "高级I.C.H,信任全部校验值(不推荐)" - -msgid "Add files to download in pause mode" -msgstr "添加新下载文件时设为暂停" - -msgid "Add files to download with auto priority" -msgstr "添加新下载文件时设定优先级为自动" - -msgid "Start next paused file when a file completes" -msgstr "一个文件完成时开始下一个暂停的文件" - -msgid "Start next paused file from the same category" -msgstr "从同一分类开始下一个暂停的文件" - -msgid "Start next paused file in alphabetic order" -msgstr "根据字母顺序开始下一个暂停的文件" - -msgid "Preallocate disk space for new files" -msgstr "为新文件预分配磁盘空间" - -msgid "Minimum free disk space. in Mbytes" -msgstr "最低剩余空间,单位MB" - -msgid "Save 10 sources on rare files (< 20 sources)" -msgstr "保存稀有文件(少于20个源)的十个源" - -msgid "Add new shares with auto priority" -msgstr "添加新共享文件时设优先级为自动" - -msgid "Use secure user identification" -msgstr "使用安全用户认证" - -msgid "Use obfuscation for outgoing connections" -msgstr "为传出连接使用迷惑协议" - -msgid "Accept only obfuscation connections" -msgstr "只接受迷惑协议连接" - -msgid "Who can see my shared files" -msgstr "谁可查看我的共享文件" - -msgid "IP Filter Configuration" -msgstr "IP过滤设置" - -msgid "Static IP list for filtering" -msgstr "静态IP过滤列表" - -msgid "Content of ipfilter_static.dat" -msgstr "ipfilter_static.dat的内容" - -msgid "Filter clients by IP" -msgstr "过滤用户" - -msgid "Filter servers by IP" -msgstr "过滤服务器" - -msgid "IP filter list URL" -msgstr "过滤列表URL" - -msgid "Auto-update ipfilter at startup" -msgstr "自动更新过滤列表" - -msgid "Filtering Level" -msgstr "过滤级别" - -msgid "Always filter LAN IPs" -msgstr "总是过滤局域网ip地址" - -msgid "Paranoid handling of non-matching IPs" -msgstr "处理不匹配的IP" - -msgid "Use system-wide ipfilter.dat if available" -msgstr "可用情况下使用系统级的ipfilter.dat" - -msgid "IP of the listening interface for external connection" -msgstr "远程连接监听IP" - -msgid "TCP port for EC" -msgstr "远程连接TCP端口" - -msgid "Enable upnp port forwarding on the EC port" -msgstr "为远程连接端口启用upnp" - -msgid "aMule Web Configuration" -msgstr "aMule Web设置" - -msgid "EC password" -msgstr "远程连接密码" - -msgid "Enable web server on startup" -msgstr "启动时运行Web服务" - -msgid "Web template" -msgstr "Web模版" - -msgid "Web full rights password" -msgstr "Web最高权限密码" - -msgid "Use low rights user" -msgstr "启用低权限用户" - -msgid "Web low rights password" -msgstr "Web低权限密码" - -msgid "Web TCP port" -msgstr "Web TCP端口" - -msgid "Enable UPnP port forwarding of the web server port" -msgstr "为Web服务端口启用UPnP端口转发" - -msgid "Web UPnP TCP port" -msgstr "Web服务UPnP的TCP端口" - -msgid "Page refresh time(in secs)" -msgstr "页面刷新周期(秒)" - -msgid "Enable Gzip compression" -msgstr "启用Gzip压缩" - -msgid "Edit the template that is used for generating the aMule configuration." -msgstr "编辑用来生成aMule设置的模板" - -msgid "This is the content of the file '/etc/amule/amule.conf.template' from which your amule configuration will be generated. Values enclosed by pipe symbols ('|') should not be changed. They get their values from other tabs." -msgstr "创建aMule设置的 '/etc/amule/amule.conf.template' 文件的内容。被通道符|包围的值不应该在这里改动,请在其他标签修改这些设置。" - -msgid "Read / Reread log file" -msgstr "读取/重载日志文件" - -msgid "Please press [Read] button" -msgstr "请点击[读取]按钮" - -msgid "File not found or empty" -msgstr "文件不存在或为空" - -msgid "aMule Status" -msgstr "aMule状态" - -msgid "Open aMuleWeb" -msgstr "打开aMuleWeb" - -msgid "aMule daemon is running." -msgstr "aMule守护进程正在运行" - -msgid "aMule daemon is not running." -msgstr "aMule守护进程未运行" - -msgid "Start aMule" -msgstr "启动aMule" - -msgid "aMule command" -msgstr "aMule命令" - -msgid "aMule Command" -msgstr "aMule命令" - -msgid "You can call amulecmd commands here to control your amule." -msgstr "你可以在这里运行amulecmd命令以控制你的aMule" - -msgid "Execute 'Help' to get more infomation." -msgstr "执行'Help'命令以获取更多信息" - -msgid "Execute" -msgstr "执行" - -msgid "Clear" -msgstr "清空" - -msgid "Command: " -msgstr "命令: " - -msgid "Download now" -msgstr "立即下载" - -msgid "Existing file will be overwritten, do you really want to proceed?" -msgstr "已有文件将被覆盖,是否继续?" - -msgid "Percentage" -msgstr "百分比" - diff --git a/luci-app-amule/root/etc/amule/amule.conf.template b/luci-app-amule/root/etc/amule/amule.conf.template deleted file mode 100644 index 3ab24a0b0..000000000 --- a/luci-app-amule/root/etc/amule/amule.conf.template +++ /dev/null @@ -1,206 +0,0 @@ -[eMule] - Nick=|NICK| - MaxUpload=|MAXUPLOAD| - MaxDownload=|MAXDOWNLOAD| - SlotAllocation=|SLOTALLOCATION| - MaxConnections=|MAXCONNECTIONS| - MaxSourcesPerFile=|MAXSOURCESPERFILE| - Port=|PORT| - UDPPort=|UDPPORT| - UDPEnable=|UDPENABLE| - UPnPEnabled=|UPNPENABLED| - UPnPTCPPort=|UPNPTCPPORT| - Address=|ADDRESS| - Autoconnect=|AUTOCONNECT| - Reconnect=|RECONNECT| - ConnectToKad=|CONNECTTOKAD| - ConnectToED2K=|CONNECTTOED2K| - KadNodesUrl=|KADNODESURL| - Ed2kServersUrl=|ED2KSERVERSURL| - RemoveDeadServer=|REMOVEDEADSERVER| - DeadServerRetry=|DEADSERVERRETRY| - AddServerListFromServer=|ADDSERVERLISTFROMSERVER| - AddServerListFromClient=|ADDSERVERLISTFROMCLIENT| - Scoresystem=|SCORESYSTEM| - SmartIdCheck=|SMARTIDCHECK| - SafeServerConnect=|SAFESERVERCONNECT| - AutoConnectStaticOnly=|AUTOCONNECTSTATICONLY| - ManualHighPrio=|MANUALHIGHPRIO| - Serverlist=|SERVERLIST| - TempDir=|TEMPDIR| - IncomingDir=|INCOMINGDIR| - ICH=|ICH| - AICHTrust=|AICHTRUST| - AddNewFilesPaused=|ADDNEWFILESPAUSED| - DAPPref=|DAPPREF| - StartNextFile=|STARTNEXTFILE| - StartNextFileSameCat=|STARTNEXTFILESAMECAT| - StartNextFileAlpha=|STARTNEXTFILEALPHA| - AllocateFullFile=|ALLOCATEFULLFILE| - MinFreeDiskSpace=|MINFREEDISKSPACE| - UAPPref=|UAPPREF| - SeeShare=|SEESHARE| - IPFilterURL=|IPFILTERURL| - IPFilterAutoLoad=|IPFILTERAUTOLOAD| - FilterLevel=|FILTERLANIPS| - FilterLanIPs=|FILTERLANIPS| - ParanoidFiltering=|PARANOIDFILTERING| - IPFilterSystem=|IPFILTERSYSTEM| - - - FilterMessages=1 - FilterAllMessages=0 - MessagesFromFriendsOnly=0 - MessageFromValidSourcesOnly=1 - FilterWordMessages=0 - MessageFilter= - ShowMessagesInLog=1 - FilterComments=0 - CommentFilter= - - AppVersion=SVN - QueueSizePref=50 - MaxConnectionsPerFiveSeconds=20 - ServerKeepAliveTimeout=0 - CheckDiskspace=1 - PreviewPrio=0 - FileBufferSizePref=16 - OSDirectory=/var/run/amule - OnlineSignature=0 - OnlineSignatureUpdate=5 - EnableTrayIcon=0 - MinToTray=0 - ConfirmExit=1 - StartupMinimized=0 - 3DDepth=10 - ToolTipDelay=1 - ShowOverhead=0 - ShowInfoOnCatTabs=1 - VerticalToolbar=0 - GeoIPEnabled=1 - VideoPlayer= - StatGraphsInterval=3 - statsInterval=30 - DownloadCapacity=300 - UploadCapacity=100 - StatsAverageMinutes=5 - VariousStatisticsMaxValue=100 - ShareHiddenFiles=0 - AutoSortDownloads=0 - NewVersionCheck=1 - AdvancedSpamFilter=1 - MessageUseCaptchas=1 - Language= - SplitterbarPosition=75 - YourHostname= - DateTimeFormat=%A, %x, %X - AllcatType=0 - ShowAllNotCats=0 - SmartIdState=0 - DropSlowSources=0 - ShowRatesOnTitle=0 - GeoLiteCountryUpdateUrl=http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz - StatsServerName=Shorty's ED2K stats - StatsServerURL=http://ed2k.shortypower.dyndns.org/?hash= - CreateSparseFiles=1 - -[Browser] - OpenPageInTab=1 - CustomBrowserString= - -[Proxy] - ProxyEnableProxy=|PROXYENABLEPROXY| - ProxyType=|PROXYTYPE| - ProxyName=|PROXYNAME| - ProxyPort=|PROXYPORT| - ProxyEnablePassword=|PROXYENABLEPASSWORD| - ProxyUser=|PROXYUSER| - ProxyPassword=|PROXYPASSWORD| - -[DLP] - CheckModString=1 - CheckUsername=1 - CheckUserHash=1 - CheckHelloTag=1 - CheckInfoTag=1 - CheckVeryCDMod=0 - CheckGhostMod=1 - -[ExternalConnect] - ECAddress=|ECADDRESS| - ECPort=|ECPORT| - UPnPECEnabled=|UPNPECENABLED| - ECPassword=|ECPASSWORD| - UseSrcSeeds=|USESRCSEED| - UseSecIdent=|USESECIDENT| - IpFilterClients=|IPFILTERCLIENTS| - IpFilterServers=|IPFILTERSERVERS| - - AcceptExternalConnections=1 - ShowProgressBar=1 - ShowPercent=1 - TransmitOnlyUploadingClients=0 - -[WebServer] - Enabled=|WEBENABLED| - Template=|TEMPLATE| - Password=|WEBPASSWORD| - UseLowRightsUser=|USELOWRIGHTSUSER| - PasswordLow=|PASSWORDLOW| - Port=|WEBPORT| - UPnPWebServerEnabled=|UPNPWEBSERVERENABLED| - WebUPnPTCPPort=|WEBUPNPTCPPORT| - PageRefreshTime=|PAGEREFRESHTIME| - UseGzip=|USEGZIP| - - Path=amuleweb - - -[GUI] - HideOnClose=0 - -[Razor_Preferences] - FastED2KLinksHandler=1 - -[SkinGUIOptions] - Skin= - -[Statistics] - MaxClientVersions=0 - -[Obfuscation] - IsCryptLayerRequested=|ISCRYPTLAYERREQUESTED| - IsClientCryptLayerRequired=|ISCLIENTCRYPTLAYERREQUIRED| - IsClientCryptLayerSupported=1 - CryptoPaddingLenght=254 - CryptoKadUDPKey=281625462 - -[PowerManagement] - PreventSleepWhileDownloading=0 - - -[UserEvents] -[UserEvents/DownloadCompleted] - CoreEnabled=0 - CoreCommand= - GUIEnabled=0 - GUICommand= -[UserEvents/NewChatSession] - CoreEnabled=0 - CoreCommand= - GUIEnabled=0 - GUICommand= -[UserEvents/OutOfDiskSpace] - CoreEnabled=0 - CoreCommand= - GUIEnabled=0 - GUICommand= -[UserEvents/ErrorOnCompletion] - CoreEnabled=0 - CoreCommand= - GUIEnabled=0 - GUICommand= - - -[HTTPDownload] - URL_1= diff --git a/luci-app-amule/root/etc/config/amule b/luci-app-amule/root/etc/config/amule deleted file mode 100644 index c873b81af..000000000 --- a/luci-app-amule/root/etc/config/amule +++ /dev/null @@ -1,71 +0,0 @@ - - -config amule 'main' - option enabled '0' - option runasuser 'amule' - option config_dir '/var/run/amule' - option mem_percentage '50' - option nice '10' - option ionice_flags '-c 3' - option nick 'http://www.aMule.org' - option max_upload '0' - option max_download '0' - option slot_allocation '2' - option max_connections '500' - option max_sources_per_file '300' - option port '4662' - option udp_enable '1' - option udp_port '4672' - option upnp_tcp_port '50000' - option auto_connect '1' - option reconnect '1' - option connect_to_kad '1' - option connect_to_ed2k '1' - option kad_nodes_url 'http://upd.emule-security.org/nodes.dat' - option ed2k_servers_url 'http://upd.emule-security.org/server.met' - option remove_dead_server '1' - option dead_server_retry '3' - option scoresystem '1' - option smart_id_check '1' - option use_sec_ident '1' - option is_crypt_layer_requested '1' - option ip_filter_clients '1' - option ip_filter_servers '1' - option ip_filter_auto_load '1' - option filter_level '127' - option filter_lan_ips '1' - option paranoid_filtering '1' - option ec_port '4712' - option ec_password '12345678' - option ich '1' - option dap_pref '1' - option start_next_file '1' - option min_free_disk_space '1' - option use_src_seed '1' - option temp_dir '/var/run/amule/Temp' - option incoming_dir '/var/run/amule/Incoming' - option proxy_enable_proxy '0' - option add_server_list_from_server '1' - option add_server_list_from_client '1' - option safe_server_connect '0' - option auto_connect_static_only '0' - option manual_high_prio '0' - option serverlist '0' - option a_ich_trust '0' - option add_new_files_paused '0' - option allocate_full_file '0' - option uap_pref '0' - option is_client_crypt_layer_required '0' - option see_share 'nobody' - option ip_filter_system '0' - option upnp_ec_enabled '0' - option web_enabled '1' - option upnp_enabled '0' - option proxy_type 'socks5' - option template 'AmuleWebUI-Reloaded' - option use_low_rights_user '0' - option web_port '44711' - option upnp_web_server_enabled '0' - option web_upnp_tcp_port '50001' - option page_refresh_time '121' - option use_gzip '0' diff --git a/luci-app-amule/root/etc/hotplug.d/iface/20-amule b/luci-app-amule/root/etc/hotplug.d/iface/20-amule deleted file mode 100644 index a42adfb0f..000000000 --- a/luci-app-amule/root/etc/hotplug.d/iface/20-amule +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -# Copyright (C) 2007 OpenWrt.org - -/etc/init.d/amule enabled && { - - [ "$ACTION" = "ifup" ] && { - /etc/init.d/amule start - } - - [ "$ACTION" = "ifdown" ] && { - /etc/init.d/amule stop - } - -} diff --git a/luci-app-amule/root/etc/init.d/amule b/luci-app-amule/root/etc/init.d/amule deleted file mode 100644 index 1a2813b99..000000000 --- a/luci-app-amule/root/etc/init.d/amule +++ /dev/null @@ -1,179 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2010-2015 OpenWrt.org - -START=99 -USE_PROCD=1 - - -LIST_SEP=" -" - -service_triggers() { - procd_add_reload_trigger amule -} - -unregex() { - echo "$1" | sed -e 's/[]\/()$*.^|[]/\\&/g' -} - -option_word_to_digit() { - word=$(grep -ioE "\b$2=\S+" "$1"|awk -F= '{print $2}') - digit=$(echo "$3" |grep -oE "$word/\S+"|awk -F'/' '{print $2}') - sed -i "s/\b$2=$word\b/$2=$digit/g" "$1" -} - -encrypt_password() { - pass_notencryted=$(grep -ioE "\b$2=[^\n]+" "$1"|sed "s/.*$2=//g") - pass_encryted=$(echo -n $pass_notencryted|md5sum|grep -oE "[a-z0-9]{32}") - [[ -z $pass_notencryted ]] || sed -i "s/\b$2=$(unregex $pass_notencryted)/$2=$pass_encryted/g" "$1" -} - -write_dat_file() { - if [[ -s "$1" ]] ; then - cat "$1" > "$2" - else - [[ -s "$2" ]] && cat "$2" > "$1" - fi -} - -set_params() { - cat /etc/amule/amule.conf.template > "$config_file" - local p; local v; local s="$1"; shift - for p in $*; do - config_get v "$s" "$p" - IFS="$LIST_SEP" - for v in $v; do - [ -n "$v" ] && ( - sed -i "s;|$(echo $p|tr '[a-z]' '[A-Z]'|sed -e 's|_||g')|;$(unregex $v);g" "$config_file" - ) - done - unset IFS - done - - #delete unreplaced placeholders - sed -i "s;=|[A-Z0-9]*|;=;g" "$config_file" - - #convert some options to digit - option_word_to_digit "$config_file" "ProxyType" "socks5/0 socks4/1 http/2 socks4a/3" - option_word_to_digit "$config_file" "SeeShare" "anyone/0 friends/1 nobody/2" - - #encrypt password - encrypt_password "$config_file" "ECPassword" - encrypt_password "$config_file" "Password" - encrypt_password "$config_file" "PasswordLow" -} - -section_enabled() { - config_get_bool enabled "$1" 'enabled' 0 - [ $enabled -gt 0 ] -} - -set_owner() { - case $(echo "$1"|grep -oE "^/[^/]+") in - "/var"|"/tmp"|"/mnt"|"root") - cur_user=$(ls -w50 -ld "$1"|awk '{print $3}') - cur_group=$(ls -w50 -ld "$1"|awk '{print $4}') - [[ $cur_user == $2 ]] || ( chown -R $2 "$1" ) - [[ $cur_group == $3 ]] || ( chgrp -R $3 "$1" ) - ;; - *) - false - ;; - esac -} - -amule() { - local cfg="$1" - local USE - - local runasuser - local incoming_dir config_dir temp_dir - local mem_percentage - local config_overwrite nice ionice_flags - local cmdline - - section_enabled "$section" || return 1 - - config_get config_dir "$cfg" 'config_dir' '/var/run/amule' - config_get runasuser "$cfg" 'runasuser' 'daemon' - config_get incoming_dir "$cfg" 'incoming_dir' "$config_dir/Incoming" - config_get temp_dir "$cfg" 'temp_dir' "$config_dir/Temp" - config_get mem_percentage "$cfg" 'mem_percentage' '50' - config_get config_overwrite "$cfg" config_overwrite 1 - config_get nice "$cfg" nice "-19" - config_get ionice_flags "$cfg" ionice_flags '' - group=$(id -Gn $runasuser) - - case $(echo "$config_dir"|grep -oE "^/[^/]+") in - "/var"|"/tmp"|"/mnt"|"/root"|"/home") - true - ;; - *) - echo "You should set config_dir to subfolders under /var, /tmp ,/mnt or /root" - return 1 - ;; - esac - - which ionice > /dev/null || ionice_flags='' - - local MEM=$(sed -ne 's!^MemTotal:[[:space:]]*\([0-9]*\) kB$!\1!p' /proc/meminfo) - if test "$MEM" -gt 1;then - USE=$(expr $MEM \* $mem_percentage \* 10) - fi - - config_file="$config_dir/amule.conf" - #[ -d "$config_dir" ] || { - mkdir -m 0755 -p "$config_dir" - chmod g+s "$config_dir" - chown $group:$runasuser "$config_dir" - touch "$config_file" "$config_dir/addresses.dat" "$config_dir/shareddir.dat" \ - "$config_dir/ipfilter_static.dat" - [ -d "$config_dir/.aMule" ] || ln -s ./ $config_dir/.aMule - #[ -z "$runasuser" ] || set_owner "$config_dir" $runasuser $group - #} - - - touch "$config_file" - write_dat_file /etc/amule/addresses.dat "$config_dir/addresses.dat" - write_dat_file /etc/amule/shareddir.dat "$config_dir/shareddir.dat" - write_dat_file /etc/amule/ipfilter_static.dat "$config_dir/ipfilter_static.dat" - - #[ "$config_overwrite" == 0 ] || { - set_params "$cfg" $(uci show amule|awk -F'[.=]' '{print $3}'|tr '\n' ' ') - #} - - HOME="$config_dir" /usr/bin/amulecmd --create-config-from="$config_file" - - cmdline="/usr/bin/amuled -c $config_dir" - [ "$ionice_flags" ] && cmdline="ionice $ionice_flags $cmdline" - procd_open_instance - procd_set_param command $cmdline - procd_set_param respawn retry=60 - procd_set_param user "$runasuser" - procd_set_param nice "$nice" - if test -z "$USE";then - procd_set_param limits core="0 0" - else - procd_set_param limits core="0 0" as="$USE $USE" - logger -t amule "Starting with $USE virt mem" - fi - - procd_add_jail amule log - procd_add_jail_mount_rw $config_file - procd_add_jail_mount_rw $incoming_dir - procd_add_jail_mount_rw $temp_dir - procd_close_instance -} - -start_service() { - killall -9 amuleweb >/dev/null 2>&1 - config_load 'amule' - config_foreach amule 'amule' -} - -restart() { - stop - sleep 2 - start -} - diff --git a/luci-app-amule/root/etc/uci-defaults/luci-amule b/luci-app-amule/root/etc/uci-defaults/luci-amule deleted file mode 100644 index 3af985662..000000000 --- a/luci-app-amule/root/etc/uci-defaults/luci-amule +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh - -uci -q batch <<-EOF >/dev/null - delete ucitrack.@amule[-1] - add ucitrack amule - set ucitrack.@amule[-1].init=amule - commit ucitrack -EOF - -chmod +x /etc/init.d/amule - -while [ ! $(grep -e "amule" ${IPKG_INSTROOT}/etc/passwd) ] -do - gid=$(awk -v min=1000 -v max=1500 'BEGIN{srand(); print int(min+rand()*(max-min+1))}') - echo amule:x:0:0:99999:7::: >> ${IPKG_INSTROOT}/etc/shadow - grep -e ":$gid:" ${IPKG_INSTROOT}/etc/passwd || ( \ - echo "amule:x:$gid:amule" >> ${IPKG_INSTROOT}/etc/group ; \ - echo "amule:x:$gid:$gid:amule:/var/run/amule:/bin/false" >> ${IPKG_INSTROOT}/etc/passwd ) -done - -mkdir -p ${IPKG_INSTROOT}/etc/amule/ -touch ${IPKG_INSTROOT}/etc/amule/addresses.dat -touch ${IPKG_INSTROOT}/etc/amule/ipfilter_static.dat -touch ${IPKG_INSTROOT}/etc/amule/shareddir.dat - -rm -f /tmp/luci-indexcache -exit 0 diff --git a/luci-app-amule/root/usr/share/rpcd/acl.d/luci-app-amule.json b/luci-app-amule/root/usr/share/rpcd/acl.d/luci-app-amule.json deleted file mode 100644 index 4cac5e826..000000000 --- a/luci-app-amule/root/usr/share/rpcd/acl.d/luci-app-amule.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "luci-app-amule": { - "description": "Grant UCI access for luci-app-amule", - "read": { - "uci": [ "amule" ] - }, - "write": { - "uci": [ "amule" ] - } - } -} diff --git a/luci-app-xray/Makefile b/luci-app-xray/Makefile index c23b2da26..dc6770de6 100644 --- a/luci-app-xray/Makefile +++ b/luci-app-xray/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-xray -PKG_VERSION:=1.26.0 +PKG_VERSION:=1.26.1 PKG_RELEASE:=1 PKG_LICENSE:=MPLv2 diff --git a/luci-app-xray/root/etc/init.d/xray b/luci-app-xray/root/etc/init.d/xray index cc2c7d357..e4375c341 100644 --- a/luci-app-xray/root/etc/init.d/xray +++ b/luci-app-xray/root/etc/init.d/xray @@ -93,7 +93,7 @@ setup_dnsmasq() { } flush_dnsmasq() { - rm /tmp/dnsmasq.d/xray.conf + rm -f /tmp/dnsmasq.d/xray.conf /etc/init.d/dnsmasq restart > /dev/null 2>&1 } diff --git a/luci-app-xray/root/usr/share/xray/init.fw4 b/luci-app-xray/root/usr/share/xray/init.fw4 index fa90be715..8a9e8d86a 100644 --- a/luci-app-xray/root/usr/share/xray/init.fw4 +++ b/luci-app-xray/root/usr/share/xray/init.fw4 @@ -21,7 +21,7 @@ flush_firewall() { ip route del local default dev lo table 252 logger -st xray[$$] -p4 "Flushing firewall4 rules..." - rm /var/etc/xray/firewall_include.nft + rm -f /var/etc/xray/firewall_include.nft logger -st xray[$$] -p4 "Triggering firewall4 restart..." /etc/init.d/firewall restart > /dev/null 2>&1