diff options
author | Thomas Matthijs <axxo@gentoo.org> | 2005-05-22 11:46:45 +0000 |
---|---|---|
committer | Thomas Matthijs <axxo@gentoo.org> | 2005-05-22 11:46:45 +0000 |
commit | 1692b95f55427687025cbbee98efde782ded9be5 (patch) | |
tree | af30d0f620f4fd3f2c1edde29c5c5007c0f6b2ec /net-mail | |
parent | Version bumped. This closes bug #91150. (diff) | |
download | gentoo-2-1692b95f55427687025cbbee98efde782ded9be5.tar.gz gentoo-2-1692b95f55427687025cbbee98efde782ded9be5.tar.bz2 gentoo-2-1692b95f55427687025cbbee98efde782ded9be5.zip |
added patch for new page structure, closes #93537
(Portage version: 2.0.51.22-r1)
Diffstat (limited to 'net-mail')
-rw-r--r-- | net-mail/gotmail/ChangeLog | 8 | ||||
-rw-r--r-- | net-mail/gotmail/Manifest | 5 | ||||
-rw-r--r-- | net-mail/gotmail/files/digest-gotmail-0.8.2-r1 | 1 | ||||
-rw-r--r-- | net-mail/gotmail/files/gotmail-0.8.2-newlogin.patch | 230 | ||||
-rw-r--r-- | net-mail/gotmail/gotmail-0.8.2-r1.ebuild | 32 |
5 files changed, 274 insertions, 2 deletions
diff --git a/net-mail/gotmail/ChangeLog b/net-mail/gotmail/ChangeLog index a0acf96746cc..80fc98ce3e1a 100644 --- a/net-mail/gotmail/ChangeLog +++ b/net-mail/gotmail/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-mail/gotmail # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-mail/gotmail/ChangeLog,v 1.25 2005/04/20 14:18:21 g2boojum Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-mail/gotmail/ChangeLog,v 1.26 2005/05/22 11:46:45 axxo Exp $ + +*gotmail-0.8.2-r1 (22 May 2005) + + 22 May 2005; Thomas Matthijs <axxo@gentoo.org> + +files/gotmail-0.8.2-newlogin.patch, +gotmail-0.8.2-r1.ebuild: + added patch for new page structure, closes #93537 20 Apr 2005; Grant Goodyear <g2boojum@gentoo.org> gotmail-0.8.2.ebuild: Fixed homepage. diff --git a/net-mail/gotmail/Manifest b/net-mail/gotmail/Manifest index cb58b4a609f6..f921b3125a59 100644 --- a/net-mail/gotmail/Manifest +++ b/net-mail/gotmail/Manifest @@ -1,4 +1,7 @@ -MD5 a8ed0a8bf652ea1064fdac0214cca7a3 ChangeLog 3955 MD5 efaba42c737238f0b0d2735c92c60674 gotmail-0.8.2.ebuild 666 +MD5 c8e6b2da1cc0b56c53339d9156119ecb gotmail-0.8.2-r1.ebuild 729 +MD5 a8ed0a8bf652ea1064fdac0214cca7a3 ChangeLog 3955 MD5 61e0d05b1306513aede2838fa81b05b5 metadata.xml 225 +MD5 d15af22fd2d0b77f6e219d563f432bd4 files/gotmail-0.8.2-newlogin.patch 7917 +MD5 b14cf689199ab7f7827e4be2f1c5ead4 files/digest-gotmail-0.8.2-r1 64 MD5 b14cf689199ab7f7827e4be2f1c5ead4 files/digest-gotmail-0.8.2 64 diff --git a/net-mail/gotmail/files/digest-gotmail-0.8.2-r1 b/net-mail/gotmail/files/digest-gotmail-0.8.2-r1 new file mode 100644 index 000000000000..6dc95cfa15aa --- /dev/null +++ b/net-mail/gotmail/files/digest-gotmail-0.8.2-r1 @@ -0,0 +1 @@ +MD5 f3e147ef51815bed175794c6910283f6 gotmail-0.8.2.tar.gz 26416 diff --git a/net-mail/gotmail/files/gotmail-0.8.2-newlogin.patch b/net-mail/gotmail/files/gotmail-0.8.2-newlogin.patch new file mode 100644 index 000000000000..716b8f169075 --- /dev/null +++ b/net-mail/gotmail/files/gotmail-0.8.2-newlogin.patch @@ -0,0 +1,230 @@ +--- gotmail-0.8.2/gotmail 2004-10-10 10:42:31.000000000 -0700 ++++ gotmail-0.8.2.patched/gotmail 2005-05-16 08:01:12.000000000 -0700 +@@ -578,7 +578,7 @@ + # Get rid of any trailing space on options.. Just for neatness. + $options =~ s/ $//; + +- my($cmdline) = "$conf_curl \"$url\" $options -i -m 600 -D $tmp_headers" . ++ my($cmdline) = "$conf_curl \'$url\' $options -i -m 600 -D $tmp_headers" . + " -A \"Mozilla/4.73 [en] (Win98; I)\""; + + # Copy output to logfile if necessary +@@ -627,25 +627,23 @@ + { + dispText("Getting hotmail index page...\n"); + my(@index_page); ## This will have the login page. +- my($form_label); + +- my(@java_page) = getPage("http://www.hotmail.com/", "", 1, 1, 0); +- ## @java_page is now an intermediate page which checks if you +- ## have javascript enabled or not!! +- my($page) = join("", @java_page); +- +- my($check_java); +- if($page =~ m/<form.*hiddenform.*action=\"(\S+)\".*>/i) { +- $check_java = $1; +- } +- if ($check_java) { ++ @index_page = getPage("http://www.hotmail.com/", "", 1, 1, 0); ++ my($page) = join("", @index_page); ++ ++ ## @index_page is now an intermediate page which checks if you ++ ## have javascript enabled or not!! This code invokes the form ++ ## on that page to get you to the login/password page. ++ if($page =~ m/<form.*((hiddenform)|(fmHF)).*action=\"(\S+)\".*>/i) { ++ my $action = $4; ++ + ## This processing happens only for the "new" hotmail structure. + dispText("Processing java check....\n"); + my($inp); ## This var will store all the input fields. +- while($page =~ m/<\s*input\s+.*name=\"(\S+)\"\s+value=\"(\S+)\"/) { +- $inp .= "$1=$2\&"; ++ while($page =~ m/<\s*input\s+.*name=\"(\S+)\"(\s+id="\S+")?\s+value=\"(\S*)\"/) { + ## Get rid of the input field we processed. +- $page =~ s/<\s*input/some_weird_unique_value_jsdahf/; ++ $page = $'; ++ $inp .= "$1=" . uri_escape($3) . "\&"; + } + ## Get rid of the last "&" + $inp =~ s/&$//g; +@@ -658,52 +656,100 @@ + my($params) = "\@$tmp_formdata"; + + ## Hopefully this should get us to the correct index page. +- @index_page = getPage($check_java, $params, 1, 1, 0); +- $form_label = "hotmail_com"; +- } +- else { +- ## The "old" hotmail page structure +- @index_page = @java_page; +- $form_label = ""; ++ @index_page = getPage($action, $params, 1, 1, 0); ++ $page = join "", @index_page; + } + + # Find the form "ACTION" parameter... +- my($login_script) = ""; +- my($ctnum) = ""; ++ my($login_script); ++ my($login_new) = 0; + +- my $page = join "", @index_page; +- if ($page =~ m/<form.*${form_label}.*action=\"(\S+)\".*>/i) { ++ # Old - multiple forms for multiple domains ++ if ($page =~ m/<form.*hotmail_com.*action=\"(\S+)\".*>/i) { + $login_script = $1; + } +- +- if ($page =~ m/ct=([0-9]+)/i) { +- $ctnum = uri_escape($1); ++ # New - heavy javascript ++ elsif ($page =~ m/<form.*f1.*action=\"(\S+)\".*>/i) { ++ $login_script = $1; ++ $login_new = 1; + } +- +- if ($login_script eq "") { +- die "Page doesn't contain any form action field!\n"; ++ # Very old - simple form ++ elsif ($page =~ m/<form.*action=\"(\S+)\".*>/i) { ++ $login_script = $1; + } ++ else { ++ die "Page doesn't contain any form action field!\n"; ++ } + + my($FORMFILE) = new FileHandle "> $tmp_formdata" || + die "Couldn't open formdata file: $!\n"; +- print $FORMFILE ("login=" . uri_escape($login, "^A-Za-z") . +- "\&passwd=" . uri_escape($password, "^A-Za-z") . +- "\&svc=mail\&mspp_shared=1" . +- "\&domain=" . uri_escape($domain) . +- "\&RemoteDAPost=https://login.msnia.passport.com/ppsecure/post.asp" . +- "\&sec=share\&curmbox=ACTIVE\&js=yes\&_lang=EN" . +- "\&beta=0\&ishotmail=1\&id=2\&fs=1" . +- "\&cb=_lang%3dEN%26country%3dUS\&ct=$ctnum"); ++ ++ if( $login_new ) { ++ dispText("Using New Login...\n"); ++ ++ ## The actual action of the form is replace by javascript ++ ## (authentication depends on the domain of your user id). ++ ## and arguments are appended in javascript ++ if( $page =~ m/g_DO\["\Q$domain\E"\]\s*=\s*"([^"]+)\"/ ) { ++ $login_script = $1; ++ #dispText( "g_DO=$1\n" ); ++ } ++ if( $page =~ m/g_QS\s*=\s*"([^"]+)\"/ ) { ++ $login_script .= index($login_script,'?') >= 0 ? '&' : '?'; ++ $login_script .= $1; ++ #dispText( "g_QS=$1\n" ); ++ } ++ ++ ## Get (or calculate) the hidden fields of the form ++ my ( $PPFT, $PPSX, $PwdPad ); ++ { ++ if( $page =~ m/<\s*input\s+.*name=\"PPFT\"(\s+id="\S+")?\s+value=\"(\S*)\"/ ) { ++ $PPFT = $2; ++ #dispText( "PPFT=$PPFT\n" ); ++ } ++ if( $page =~ m/<\s*input\s+.*name=\"PPSX\"(\s+id="\S+")?\s+value=\"(\S*)\"/ ) { ++ $PPSX = $2; ++ #dispText( "PPSX=$PPSX\n" ); ++ } ++ { ++ my $Padding = "IfYouAreReadingThisYouHaveTooMuchFreeTime"; ++ $PwdPad = substr( $Padding, 0, length($Padding)-length($password) ); ++ #dispText( "PwdPad=$PwdPad\n" ); ++ } ++ } ++ ++ print $FORMFILE ("PPSX=$PPSX" . ++ "\&PwdPad=$PwdPad" . ++ "\&login=" . uri_escape($login . '@' . $domain, "^A-Za-z") . ++ "\&passwd=" . uri_escape($password, "^A-Za-z") . ++ "\&SI=" . uri_escape( ' Sign In ' ) . ++ "\&LoginOptions=3" . ++ "\&PPFT=" . uri_escape( $PPFT ) ); ++ } else { ++ dispText("Using Old Login...\n"); ++ my($ctnum) = ""; ++ if ($page =~ m/ct=([0-9]+)/i) { ++ $ctnum = uri_escape($1); ++ } ++ print $FORMFILE ("login=" . uri_escape($login, "^A-Za-z") . ++ "\&passwd=" . uri_escape($password, "^A-Za-z") . ++ "\&svc=mail\&mspp_shared=1" . ++ "\&domain=" . uri_escape($domain) . ++ "\&RemoteDAPost=https://login.msnia.passport.com/ppsecure/post.asp" . ++ "\&sec=share\&curmbox=ACTIVE\&js=yes\&_lang=EN" . ++ "\&beta=0\&ishotmail=1\&id=2\&fs=1" . ++ "\&cb=_lang%3dEN%26country%3dUS\&ct=$ctnum"); ++ } + + close $FORMFILE; + my($params) = "\@$tmp_formdata"; + + dispText("Logging in...\n"); + my(@login_page) = getPage($login_script, $params, 1, 1, 0); ++ $page = join "", @login_page; + + # Find where they are sending us now... + my($redirect_location) = ""; +- $page = join "", @login_page; + + # Now not needed per Chris Ebenezer's comments + # if ($domain eq 'msn.com') { +@@ -724,8 +770,9 @@ + + if ($page =~ m/top\.location\.replace\(\"(.*)\"\);/i) { + $redirect_location = $1; +- $redirect_location =~ s/\$/\\\$/g; +- } ++ } elsif ($page =~ m/meta\s*http-equiv="refresh"\s*content="0;\s*URL=([^"]+)"/i ) { ++ $redirect_location = $1; ++ } + + if ($redirect_location eq "") { + die("Hotmail's page structure has changed! (redirloc)\n"); +@@ -737,30 +784,32 @@ + if ($redirect_location =~ m/http:\/\/([^\/]+)\/(.*)$/i) { + $host = $1; + } else { +- die ("Could not parse redirect location"); ++ die ("Could not parse redirect location\n"); + } + + dispText("Following redirect...\n"); + my(@redirect_page) = getPage($redirect_location, "", 0, 1, 0); ++ $page = join "", @redirect_page; + + # Find where the inbox is located... +- my($inbox_location) = ""; +- $page = join "", @redirect_page; ++ my($inbox_location); + if ($page =~ m/Location: (\S+)/i) { + my $inbox_loc = $1; ++ if ($inbox_loc =~ m/\&RedirectLocation=(http[^\&]+)\&/i) { ++ $inbox_loc = uri_unescape($1); ++ } + $inbox_loc =~ /(.+)\/dasp\/ua_info.asp\?pg=browser_limit[^&]*(&.+)/; + $inbox_location = "$1\/HoTMail"; +- dispText("Going to Inbox Page: $inbox_location\n"); +- my(@redirect_page) = getPage($inbox_location, "", 1, 1, 0); + } elsif ($page =~ /unavailable/i) { + die("Hotmail is reporting that your account is temporarily " . +- "unavailable. Please try again later."); +- } +- +- if ($inbox_location eq "") { ++ "unavailable. Please try again later.\n"); ++ } else { + die("Hotmail's page structure has changed! (inboxloc)\n"); + } + ++ dispText("Going to Inbox Page: $inbox_location\n"); ++ getPage($inbox_location, "", 1, 1, 0); ++ + return $inbox_location; + } + diff --git a/net-mail/gotmail/gotmail-0.8.2-r1.ebuild b/net-mail/gotmail/gotmail-0.8.2-r1.ebuild new file mode 100644 index 000000000000..aa44e17c19b6 --- /dev/null +++ b/net-mail/gotmail/gotmail-0.8.2-r1.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-mail/gotmail/gotmail-0.8.2-r1.ebuild,v 1.1 2005/05/22 11:46:45 axxo Exp $ + +inherit eutils + +DESCRIPTION="Utility to download mail from a HotMail account" +HOMEPAGE="http://sourceforge.net/projects/gotmail" +SRC_URI="mirror://sourceforge/gotmail/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="x86 ppc sparc amd64" +IUSE="" + +DEPEND="virtual/libc + net-misc/curl + dev-perl/URI + dev-perl/libnet" + +src_unpack() { + unpack ${A} + epatch ${FILESDIR}/${P}-newlogin.patch +} + +src_compile () { :; } + +src_install() { + dobin gotmail || die + dodoc ChangeLog README sample.gotmailrc + doman gotmail.1 +} |