Thank you for the response. Seems to work for a few more forums, however still not for every vB forum. I'll send you another example, read the comments in your banking.
---------- Post updated at 11:47 PM ---------- Previous update was at 11:10 PM ----------
After checking your post update the last example seems to have fixed things. But it seems I've ran in to another problem. I need the usage of gzip, deflate but with the script looking like it does below, it puts the security token extraction back where it was before.
Code:
#!/usr/bin/perl
use LWP::UserAgent;
my $ua = LWP::UserAgent->new(agent => q{Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7 (.NET CLR 3.5.30729)});
$ua->cookie_jar({});
print("Specify site URL(e.g http://site.com/): ");
chomp(my $url = <>);
print("Username: ");
chomp(my $username = <>);
print("Password: ");
chomp(my $password = <>);
$ua->default_header('Accept' => "text/xml,application/xml,applicati+on/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5",
'Accept-Language' => "en-us,en;q=0.5",
'Accept-Charset' => "ISO-8859-1,utf-8;q=0.7,*;q=0.7",
'Accept-Encoding' => 'gzip,deflate',
'Keep-Alive' => "300",
'Connection' => "keep-alive",
'Referer' => "$url/index.php");
push @{ $ua->requests_redirectable }, 'POST';
my $req = HTTP::Request->new(POST => $url . '/login.php?do=login');
$req->content_type('application/x-www-form-urlencoded');
$req->content("vb_login_username=$username&vb_login_password=$password&do=login&securitytoken=guest&vb_login_md5password=&vb_login_md5password_utf=&s=");
$ua->request($req);
my $content = $ua->get("$url/index.php")->content;
my $input = $1 if $content =~ /(<input.*?securitytoken.*?>)/m;
my $securityToken = $1 if $input =~ /value="(.*?)"/;
print "Security token: $securityToken\n";
I am going to take up a position in Data & Network Security.
I would need to write network shell scripts doing the following task:
Going to around 2000 servers and findout which groups has access to each servers and which ids are there in each group that has access.
I need to implement... (1 Reply)
find . -type f -name "*.sql" -print|xargs perl -i -pe 's/pattern/replaced/g'
this is simple logic to find and replace in multiple files & folders
Hope this helps.
Thanks
Zaheer (0 Replies)
Hi
I have the following data :
<Cell id="34A" ref="ds:/BTS:34/Cells/Cell:34A"/>
<Cell id="34B" ref="ds:/BTS:34/Cells/Cell:34B"/>
<Cell id="34C" ref="ds:/BTS:34/Cells/Cell:34C"/>
I would like to print this data in the following format :
BTS:34 Cell:34A.I'm... (9 Replies)
My script below is supposed to log in to my vB account on any vB forum I'm registered on and retrieve + print my security token. However it seems to be hit and miss. The logging in works perfectly just will not retrieve and print the security token for every forum I log in to. Code Below:
... (3 Replies)
I got this message while submitting a reply to a thread. I could submitt the replies till yesterday but today it shows me the following message
"Your submission could not be processed because a security token was missing."
What should I do to resolve this? (1 Reply)
Hello.
First best wishes for everybody.
here is the input file ("$INPUT1") contents :
BASH_FUNC_message_begin_script%%=() { local -a L_ARRAY;
BASH_FUNC_message_debug%%=() { local -a L_ARRAY;
BASH_FUNC_message_end_script%%=() { local -a L_ARRAY;
BASH_FUNC_message_error%%=() { local... (3 Replies)
Discussion started by: jcdole
3 Replies
LEARN ABOUT DEBIAN
ppix::regexp::token::unknown
PPIx::Regexp::Token::Unknown(3pm) User Contributed Perl Documentation PPIx::Regexp::Token::Unknown(3pm)NAME
PPIx::Regexp::Token::Unknown - Represent an unknown token
SYNOPSIS
use PPIx::Regexp::Dumper;
PPIx::Regexp::Dumper->new( 'xyzzy' )
->print();
INHERITANCE
"PPIx::Regexp::Token::Unknown" is a PPIx::Regexp::Token.
"PPIx::Regexp::Token::Unknown" has no descendants.
DESCRIPTION
This token represents something that could not be identified by the tokenizer. Sometimes the lexer can fix these up, but the presence of
one of these in a finished parse represents something in the regular expression that was not understood.
METHODS
This class provides the following public methods. Methods not documented here are private, and unsupported in the sense that the author
reserves the right to change or remove them without notice.
ordinal
This method returns the results of the ord built-in on the content (meaning, of course, the first character of the content). No attempt is
made to interpret the content, since after all this is the unknown token.
SUPPORT
Support is by the author. Please file bug reports at <http://rt.cpan.org>, or in electronic mail to the author.
AUTHOR
Thomas R. Wyant, III wyant at cpan dot org
COPYRIGHT AND LICENSE
Copyright (C) 2009-2012 by Thomas R. Wyant, III
This program is free software; you can redistribute it and/or modify it under the same terms as Perl 5.10.0. For more details, see the full
text of the licenses in the directory LICENSES.
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.
perl v5.14.2 2012-06-06 PPIx::Regexp::Token::Unknown(3pm)