debian/0000755000000000000000000000000011762512277007200 5ustar debian/source/0000755000000000000000000000000011762511307010471 5ustar debian/source/format0000644000000000000000000000001411762511307011677 0ustar 3.0 (quilt) debian/pidgin-nateon.install0000644000000000000000000000002211762511307013307 0ustar usr/lib usr/share debian/rules0000755000000000000000000000053111762511307010250 0ustar #!/usr/bin/make -f #export DH_VERBOSE=1 %: dh $@ --with autoreconf override_dh_auto_configure: dh_auto_configure -- --disable-rpath override_dh_install: dh_install rm -f debian/pidgin-nateon/usr/lib/purple-*/*.la rm -f debian/pidgin-nateon/usr/lib/*/purple-*/*.la dh_pidgin override_dh_strip: dh_strip --dbg-package=pidgin-nateon-dbg debian/README.Debian0000644000000000000000000000060511762511307011233 0ustar pidgin-nateon for Debian ------------------------ * To sign up for NateOn IM service (http://nateon.nate.com), you need a Korean Resident Registration Number, either of one for Republic of Korea citizen or one for foreign resident in Korea. So practically this program is useless unless you live in South Korea. -- Changwoo Ryu , Tue, 19 Feb 2008 01:44:05 +0900 debian/copyright0000644000000000000000000000245711762511307011134 0ustar This package was debianized by Changwoo Ryu on Sat, 09 Feb 2008 03:43:28 +0900. It was downloaded from Upstream Author: Hansun Lee Copyright: Copyright (C) 2007 Hansun Lee License: This package 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 package 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 package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA On Debian systems, the complete text of the GNU General Public License version 2 can be found in `/usr/share/common-licenses/GPL-2'. The Debian packaging is: Copyright (C) 2008, 2009 Changwoo Ryu and is licensed under the GPL version 2 or (at your option) any later version, see `/usr/share/common-licenses/GPL-2. debian/control0000644000000000000000000000234211762511307010575 0ustar Source: pidgin-nateon Section: net Priority: optional Maintainer: Debian Korean L10N Uploaders: Changwoo Ryu Homepage: http://nateon.haz3.com/ Vcs-Browser: http://git.debian.org/?p=l10n-korean/pidgin-nateon.git Vcs-Git: git://git.debian.org/git/l10n-korean/pidgin-nateon.git Standards-Version: 3.9.3 Build-Depends: debhelper (>= 9), autotools-dev, dh-autoreconf, intltool, libxml-parser-perl, libpurple-dev, pidgin-dev, Package: pidgin-nateon Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: Pidgin plugin for NateOn instant messaging service This is a plugin for Pidgin which provides connections to NateOn instant messaging service by SK Communications, Inc. (http://nateon.nate.com) Package: pidgin-nateon-dbg Architecture: any Section: debug Priority: extra Depends: ${misc:Depends}, pidgin-nateon (= ${binary:Version}) Description: debugging symbols of pidgin-nateon This is a plugin for Pidgin which provides connections to NateOn instant messaging service by SK Communications, Inc. (http://nateon.nate.com). . This package contains the debugging symbols. Most people will not need this package. debian/compat0000644000000000000000000000000211762511307010367 0ustar 9 debian/patches/0000755000000000000000000000000011762511307010620 5ustar debian/patches/https-auth.patch0000644000000000000000000001051311762511307013742 0ustar diff --git a/src/notification.c b/src/notification.c index 265ffde..0915f9a 100644 --- a/src/notification.c +++ b/src/notification.c @@ -88,6 +88,55 @@ nateon_notification_destroy(NateonNotification *notification) **************************************************************************/ static void +got_auth_code_cb(PurpleUtilFetchUrlData *url_data, gpointer user_data, const gchar *url_text, gsize len, const gchar *error_message) +{ + NateonCmdProc *cmdproc; + NateonSession *session; + NateonServConn *servconn; + PurpleAccount *account; + char *cmd = NULL; + char *params = NULL; + char * authcode = NULL; + purple_debug_info("nateon", "%s\n", __FUNCTION__); + + purple_debug_info("nateon", "data returned=%s\n", url_text); + + servconn = (NateonServConn *)user_data; + g_return_if_fail(servconn != NULL); + + cmdproc = servconn->cmdproc; + session = servconn->session; + account = session->account; + + purple_debug_info("nateon", "Line %d\n", __LINE__); + params = g_strrstr(url_text, "OK\r\n"); + + params += strlen("OK\r\n"); + params[338] = '\0';//cut the string after the key string + purple_debug_info("nateon", "params=%s\n", params); + const char *username = purple_account_get_username(account); + + if (strstr(username, "@nate.com")) strtok(username, "@"); + + time_t rawtime; + struct tm * timeinfo; + char buffer [80]; + + time ( &rawtime ); + timeinfo = localtime ( &rawtime ); + + char strTime[19]; + strftime(strTime, 19, "0%Y%m%d%H%M%S000", timeinfo); //should use milliseconds, but works fine anyway. Matt + + cmd = g_strdup_printf("%s %s SSL %s UTF8 ko.linux %%00 %s %c", username, params, "1.0.2.275", strTime, 'Y'); + nateon_session_set_login_step(session, NATEON_LOGIN_STEP_AUTH_START); + + nateon_cmdproc_send(cmdproc, "LSIN", "%s", cmd); + + g_free(cmd); +} + +static void connect_cb(NateonServConn *servconn) { NateonCmdProc *cmdproc; @@ -109,41 +158,36 @@ connect_cb(NateonServConn *servconn) nateon_session_set_login_step(session, NATEON_LOGIN_STEP_HANDSHAKE); //nateon_cmdproc_send(cmdproc, "PVER", "%s", cmd); - nateon_cmdproc_send(cmdproc, "PVER", "3.615 3.0"); + nateon_cmdproc_send(cmdproc, "PVER", "1.0.2.275 3.0 ko.linux"); } else { - const char *username = purple_account_get_username(account); - const char *password = purple_account_get_password(account); - char *token; - PurpleCipher *cipher; - PurpleCipherContext *context; - guchar digest[16]; - char buf[33]; - int i; - - token = g_strdup(username); - if (strstr(token, "@nate.com")) strtok(token, "@"); - - cipher = purple_ciphers_find_cipher("md5"); - context = purple_cipher_context_new(cipher, NULL); - - purple_cipher_context_append(context, (const guchar *)password, strlen(password)); - purple_cipher_context_append(context, (const guchar *)token, strlen(token)); - - purple_cipher_context_digest(context, sizeof(digest), digest, NULL); - purple_cipher_context_destroy(context); - - g_free(token); - - for (i = 0; i < 16; i++) - g_snprintf(buf + (i*2), 3, "%02x", digest[i]); + const char *username = g_strdup(purple_url_encode(purple_account_get_username(account))); + const char *password = purple_url_encode(purple_account_get_password(account)); + char *body = NULL; + char *request = NULL; + + /* Construct the body of the HTTP POST request */ + body = g_strdup_printf("id=%s&pwd=%s", username, password); + + /* Construct an HTTP POST request */ + request = g_strdup_printf("POST /client/login.do HTTP/1.1\r\n" + "Connection: Keep-Alive\r\n" + "Accept: *\r\n" + "Host: nsl.nate.com\r\n" + "Content-Type: application/x-www-form-urlencoded; charset=UTF-8\r\n" + "Content-Length: %" G_GSIZE_FORMAT "\r\n\r\n" + "%s", strlen(body), body ); - cmd = g_strdup_printf("%s %s MD5 %1.3f UTF8", username, buf, session->protocol_ver); nateon_session_set_login_step(session, NATEON_LOGIN_STEP_AUTH_START); - nateon_cmdproc_send(cmdproc, "LSIN", "%s", cmd); + purple_util_fetch_url_request("https://nsl.nate.com", + TRUE, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)", TRUE, request, TRUE, + got_auth_code_cb, servconn); + g_free(username); + g_free(body); + g_free(request); } @@ -319,6 +363,7 @@ static void lsin_error(NateonCmdProc *cmdproc, NateonTransaction *trans, int err // case 921: // nateonerr = NATEON_ERROR_SERV_UNAVAILABLE; // break; + case 300: // case 911: case 301: nateonerr = NATEON_ERROR_AUTH; debian/patches/series0000644000000000000000000000005011762511307012030 0ustar https-auth.patch purple-plugindir.patch debian/patches/purple-plugindir.patch0000644000000000000000000000117111762511307015143 0ustar diff --git a/configure.ac b/configure.ac index 9a83d91..defa566 100644 --- a/configure.ac +++ b/configure.ac @@ -183,6 +183,10 @@ AC_SUBST(DEBUG_CFLAGS) AC_PATH_PROG(pidginpath, pidgin) +PURPLE_PLUGIN_DIR=`$PKG_CONFIG --variable=plugindir purple` +AC_SUBST(PURPLE_PLUGIN_DIR) + + AC_OUTPUT([Makefile src/Makefile pixmaps/Makefile diff --git a/src/Makefile.am b/src/Makefile.am index 2d450bb..2e3916c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,7 +1,7 @@ EXTRA_DIST = \ Makefile.mingw -pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION) +pkgdir = $(PURPLE_PLUGIN_DIR) NATEONSOURCES = \ internal.h \ debian/changelog0000644000000000000000000000403611762511307011046 0ustar pidgin-nateon (0.0.0.svn147-1) unstable; urgency=low * New upstream version * Team maintained by Debian Korean L10N * Use source format 3.0 (quilt) * Standards-Version: 3.9.3 * Drop CDBS and use debhelper 9 * Fix incorrect plugin path in case of Multi-Arch build -- Changwoo Ryu Sun, 03 Jun 2012 07:24:59 +0900 pidgin-nateon (0.0.0.svn143-1) unstable; urgency=low * New Upstream Version * Standard-Version: 3.8.2 * Section: debug for the -dbg package * Clean up the copyright notices in debian/copyright. * Add dummy debian/watch file, documenting that the upstream tarballs cannot be monitored with it. -- Changwoo Ryu Tue, 04 Aug 2009 11:05:59 +0900 pidgin-nateon (0.0.0.svn136-1) unstable; urgency=low * New upstream release. * Standard-Version: 3.8.0 -- Changwoo Ryu Sun, 22 Jun 2008 06:47:34 +0900 pidgin-nateon (0.0.0.svn131-2) unstable; urgency=low * Added libxml-parser-perl to Build-Depends for intltool build. (Closes: #472325) -- Changwoo Ryu Tue, 25 Mar 2008 02:59:01 +0900 pidgin-nateon (0.0.0.svn131-1) unstable; urgency=low * New upstream release. * Drop tarball-inside-a-tarball build system. * Don't rerun autotools anymore. -- Changwoo Ryu Sun, 23 Mar 2008 13:37:54 +0900 pidgin-nateon (0.0.0.svn127-1) unstable; urgency=low * New upstream release. -- Changwoo Ryu Wed, 19 Mar 2008 16:55:40 +0900 pidgin-nateon (0.0.0.svn120-2) unstable; urgency=low * Added intltool to Build-Depends. -- Changwoo Ryu Sun, 02 Mar 2008 17:55:12 +0900 pidgin-nateon (0.0.0.svn120-1) unstable; urgency=low * New upstream release. * Switched to tarball-inside-a-tarball build system. * Use dh_pidgin for pidgin dependency. -- Changwoo Ryu Sun, 02 Mar 2008 03:15:49 +0900 pidgin-nateon (0.0.0+svn115.dfsg-1) unstable; urgency=low * Initial release (Closes: #464776) -- Changwoo Ryu Sat, 09 Feb 2008 03:43:28 +0900 debian/watch0000644000000000000000000000025011762511307010217 0ustar # The pidgin-nateon tarballs are being distributed with phpBB attach # files. (http://dev.haz3.com/viewforum.php?f=16) It is not possible # to monitor them with uscan. debian/pidgin-nateon.docs0000644000000000000000000000001711762511307012575 0ustar AUTHORS README