Skip Menu |

This queue is for tickets about the Net-Wigle CPAN distribution.

Report information
The Basics
Id: 92649
Status: resolved
Priority: 0/
Queue: Net-Wigle

People
Owner: Nobody in particular
Requestors: brainstorm [...] nopcode.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.05



Subject: Broken log_in() on Net::Wigle?
Date: Sun, 02 Feb 2014 01:53:13 +0100
To: bug-Net-Wigle [...] rt.cpan.org
From: Roman Valls Guimera <brainstorm [...] nopcode.org>
Hello, I tried this module as advertised in the docs: ========== #!/usr/bin/env perl use strict; use warnings; use Net::Wigle; use Data::Dumper; my $wigle = Net::Wigle->new(); print Dumper $wigle -> query_raw( user => 'myuser', pass => 'mypass', ssid => 'lauchita', ); ============ But the html returned does not contain the expected results/table: $ perl wigle.pl | grep -i "showing stations" $ Seems like the log_in() method is not working properly since "Query", "Uploads" and "MapPacks/Trees" appear without a href link in the query_raw() output, like in the non-authenticated site: | Query | <a href="/gps/gps/main/screenshots/"><font size="-1">Screenshots</font></a> | <a href="/gps/gps/main/stats/"><font size="-1">Stats</font></a> | Uploads | <a href="/gps/gps/Map/onlinemap2/"><font size="-1">Web Maps</font></a> | MapPacks/Trees | <a href="/wiki/index.cgi"><font size="-1">Wiki</font></a> Best regards, Roman
Looks like wigle.net moved to https, so updated the URLs and added redirect option for LWP::UserAgent.
Subject: Re: [rt.cpan.org #92649] Resolved: Broken log_in() on Net::Wigle?
Date: Tue, 04 Feb 2014 21:32:02 +0100
To: bug-Net-Wigle [...] rt.cpan.org
From: Roman Valls Guimera <brainstorm [...] nopcode.org>
Mike; I arrived at the same conclusion (and applied the same fix) last night. But still, the main issue is not resolved. If you look close at the returned HTML, one gets past the redirect error by having "https" instead of "http", but it does not return the expected results (records/table from the query). It just returns the main page, without results nor tables with the AP's/MACs, etc... you can see a HTML with useful info if you login with a browser and query there. Thanks! 2014-02-04 21:07, Mike Allred via RT skrev: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=92649 > > > According to our records, your request has been resolved. If you have any > further questions or concerns, please respond to this message. >
I've tested the latest code in CPAN and it returns the expected result. It wasn't just changing http to https, the POST needed to be able to follow a redirect as well. On Tue Feb 04 15:32:15 2014, brainstorm@nopcode.org wrote: Show quoted text
> Mike; > > I arrived at the same conclusion (and applied the same fix) last night. > But still, the main issue is not resolved. > > If you look close at the returned HTML, one gets past the redirect error > by having "https" instead of "http", but it does not return the expected > results (records/table from the query). > > It just returns the main page, without results nor tables with the > AP's/MACs, etc... you can see a HTML with useful info if you login with > a browser and query there. > > Thanks! > > > 2014-02-04 21:07, Mike Allred via RT skrev:
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=92649 > > > > > According to our records, your request has been resolved. If you have any > > further questions or concerns, please respond to this message. > >
>
Subject: Re: [rt.cpan.org #92649] Broken log_in() on Net::Wigle?
Date: Tue, 04 Feb 2014 22:12:40 +0100
To: bug-Net-Wigle [...] rt.cpan.org
From: Roman Valls Guimera <brainstorm [...] nopcode.org>
Oh, bummer, I couldn't see the results clearly through the HTML, it showed up clearly when going for "query" instead of "query_raw". Thanks for the quick response, congrats on this great tiny module, it is very useful! :) Having pagination implemented would just rock :) $URL...pagestart=200&ssid=NETGEAR%3C&Query=Next100+%3E%3E Thanks again! 2014-02-04 21:38, Mike Allred via RT skrev: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=92649 > > > I've tested the latest code in CPAN and it returns the expected result. It wasn't just changing http to https, the POST needed to be able to follow a redirect as well. > > On Tue Feb 04 15:32:15 2014, brainstorm@nopcode.org wrote:
>> Mike; >> >> I arrived at the same conclusion (and applied the same fix) last night. >> But still, the main issue is not resolved. >> >> If you look close at the returned HTML, one gets past the redirect error >> by having "https" instead of "http", but it does not return the expected >> results (records/table from the query). >> >> It just returns the main page, without results nor tables with the >> AP's/MACs, etc... you can see a HTML with useful info if you login with >> a browser and query there. >> >> Thanks! >> >> >> 2014-02-04 21:07, Mike Allred via RT skrev:
>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=92649 > >>> >>> According to our records, your request has been resolved. If you have any >>> further questions or concerns, please respond to this message. >>>
>>
> > >
The query() method actually does accept the pagestart and Query args, so with a bit of iteration it shouldn't be hard to paginate. I'm a bit on the fence about building in a pagination iterator because if I write it incorrectly, people could inadvertently slam wigle.net and get their accounts blocked, etc. For now, I'm leaving that decision to the individual. :) On Tue Feb 04 16:12:55 2014, brainstorm@nopcode.org wrote: Show quoted text
> Oh, bummer, I couldn't see the results clearly through the HTML, it > showed up clearly when going for "query" instead of "query_raw". > > Thanks for the quick response, congrats on this great tiny module, it > is > very useful! :) > > Having pagination implemented would just rock :) > > $URL...pagestart=200&ssid=NETGEAR%3C&Query=Next100+%3E%3E > > Thanks again! > > 2014-02-04 21:38, Mike Allred via RT skrev:
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=92649 > > > > > I've tested the latest code in CPAN and it returns the expected > > result. It wasn't just changing http to https, the POST needed to be > > able to follow a redirect as well. > > > > On Tue Feb 04 15:32:15 2014, brainstorm@nopcode.org wrote:
> >> Mike; > >> > >> I arrived at the same conclusion (and applied the same fix) last > >> night. > >> But still, the main issue is not resolved. > >> > >> If you look close at the returned HTML, one gets past the redirect > >> error > >> by having "https" instead of "http", but it does not return the > >> expected > >> results (records/table from the query). > >> > >> It just returns the main page, without results nor tables with the > >> AP's/MACs, etc... you can see a HTML with useful info if you login > >> with > >> a browser and query there. > >> > >> Thanks! > >> > >> > >> 2014-02-04 21:07, Mike Allred via RT skrev:
> >>> <URL: https://rt.cpan.org/Ticket/Display.html?id=92649 > > >>> > >>> According to our records, your request has been resolved. If you > >>> have any > >>> further questions or concerns, please respond to this message. > >>>
> >>
> > > > > >