Need help on BlogEngine GSA script
I developed a GSA script to publish on BlogEngine CMS.
In Log window, I have this
19:28:46: [ ] Loaded 1 URL from imported sites
19:28:53: [+] 1/1 matches engine AutoApprove - BlogEngine - http://www.quadtk.com/sw/Blog/post/Welcome-to-BlogEngineNET-1-4.aspx
19:28:53: [+] 1/1 submission successful (1 submitted - AVG: 427,35/h) - http://www.quadtk.com/sw/Blog/post/Welcome-to-BlogEngineNET-1-4.aspx
but comment is not published. Why ?
I appreciate the help and troubleshooting... I'm sure it's something obvious!
My BlogEngine GSA Script
[SETUP]
enabled=1
default checked=0
engine type=AutoApprove
description=Submits a comment to the auto approve BlogEngine blog.
;;dofollow=
anchor text=1
creates own page=0
uses pages=0
page must have1=class="commentForm"
page must have2=Leave a comment|Write a Comment|Add a comment|Add comment|Save comment|Enregistrer les commentaires
search term="Powered by Blogsmith"|"Powered by BlogEngine"
add keyword to search=1
use blog search=1
extract keywords=1
extract keywords ignore=blogengine, blog
;submit failed=
;submit success=
verify on unknown status=0
verify submission=1
verify by=url
verify interval=5
verify timeout=60
verify search detail url=0
;-------------------------------------------------------------------------
; Variables we have to define for this engine
;
[Blog_Comment]
type=memo
allow html=<b>, <i>, <u>
allow return=1
must be filled=1
hint=Please use some comments here that will be posted to the blogs. Use the spin syntax heavily here. Also you can use variables like %blog_title%, %meta_keyword% or %keyword%.
default=%file-comments.dat%
custom mode=1
auto modify=1
auto add anchor url=0
auto add anchor url content=%file-auto_anchor.dat%
[Anchor_Text]
type=text
allow html=0
must be filled=1
hint=Use the keyword that you would like your page getting ranked for. Also use spin syntax here for more than one anchor text.
alternate data=%spinfile-names.dat%
;---------------------------------------------------------------------------
; Extract variables that we get from the blog html content
;
[Meta_keyword]
type=extract
default=%keyword%
front1=name="keywords"
front2=content="
back="
back2=,
allow html=0
[blog_title]
type=extract
front=<title>
back=</title>
default=blog topic
allow html=0
;---------------------------------------------------------------------------
; Form variables and how to fill them
;
[STEP1]
link type=Comment-Contextual/Anchor text
form name=aspnetForm*
form url=*/post/%blog_title%*
form id=aspnetForm
variable must be used=url
match by prefill=0
ctl00$cphBody$CommentView1$txtName=%Anchor_Text%
ctl00$cphBody$CommentView1$txtEmail=%random_email%
ctl00$cphBody$CommentView1$txtWebsite=%url%
ctl00$cphBody$CommentView1$ddlCountry=%columnspinfile-address_data.dat-1%|%random_option%
ctl00$cphBody$CommentView1$txtContent=%Blog_Comment%
cbNotify=0
ctl00$txtCaptcha=%captcha%
ctl00$searchBox=%leave%
ctl00$RememberMe=0
In Log window, I have this
19:28:46: [ ] Loaded 1 URL from imported sites
19:28:53: [+] 1/1 matches engine AutoApprove - BlogEngine - http://www.quadtk.com/sw/Blog/post/Welcome-to-BlogEngineNET-1-4.aspx
19:28:53: [+] 1/1 submission successful (1 submitted - AVG: 427,35/h) - http://www.quadtk.com/sw/Blog/post/Welcome-to-BlogEngineNET-1-4.aspx
but comment is not published. Why ?
I appreciate the help and troubleshooting... I'm sure it's something obvious!
My BlogEngine GSA Script
[SETUP]
enabled=1
default checked=0
engine type=AutoApprove
description=Submits a comment to the auto approve BlogEngine blog.
;;dofollow=
anchor text=1
creates own page=0
uses pages=0
page must have1=class="commentForm"
page must have2=Leave a comment|Write a Comment|Add a comment|Add comment|Save comment|Enregistrer les commentaires
search term="Powered by Blogsmith"|"Powered by BlogEngine"
add keyword to search=1
use blog search=1
extract keywords=1
extract keywords ignore=blogengine, blog
;submit failed=
;submit success=
verify on unknown status=0
verify submission=1
verify by=url
verify interval=5
verify timeout=60
verify search detail url=0
;-------------------------------------------------------------------------
; Variables we have to define for this engine
;
[Blog_Comment]
type=memo
allow html=<b>, <i>, <u>
allow return=1
must be filled=1
hint=Please use some comments here that will be posted to the blogs. Use the spin syntax heavily here. Also you can use variables like %blog_title%, %meta_keyword% or %keyword%.
default=%file-comments.dat%
custom mode=1
auto modify=1
auto add anchor url=0
auto add anchor url content=%file-auto_anchor.dat%
[Anchor_Text]
type=text
allow html=0
must be filled=1
hint=Use the keyword that you would like your page getting ranked for. Also use spin syntax here for more than one anchor text.
alternate data=%spinfile-names.dat%
;---------------------------------------------------------------------------
; Extract variables that we get from the blog html content
;
[Meta_keyword]
type=extract
default=%keyword%
front1=name="keywords"
front2=content="
back="
back2=,
allow html=0
[blog_title]
type=extract
front=<title>
back=</title>
default=blog topic
allow html=0
;---------------------------------------------------------------------------
; Form variables and how to fill them
;
[STEP1]
link type=Comment-Contextual/Anchor text
form name=aspnetForm*
form url=*/post/%blog_title%*
form id=aspnetForm
variable must be used=url
match by prefill=0
ctl00$cphBody$CommentView1$txtName=%Anchor_Text%
ctl00$cphBody$CommentView1$txtEmail=%random_email%
ctl00$cphBody$CommentView1$txtWebsite=%url%
ctl00$cphBody$CommentView1$ddlCountry=%columnspinfile-address_data.dat-1%|%random_option%
ctl00$cphBody$CommentView1$txtContent=%Blog_Comment%
cbNotify=0
ctl00$txtCaptcha=%captcha%
ctl00$searchBox=%leave%
ctl00$RememberMe=0
Comments
Turn the debug mode on (options->advanced) and see whats on there.
It says "successful as you didn't define any "submit failed=" or "submit success=" messages.
Here Print Screen with debug Window.
Submission seem to be OK but verification is KO.
NB : I double click the entry. I see information in form field but no error message.
change "form name=aspnetForm*" to "form name=aspnetForm - Save comment|aspnetForm* !Vote !search"
Else it chooses the wrong form to submit things.
How do you find that this is not the correct form which is selected?
In some script engine, I notice this expression: form name=*post*Submit
What does it means?
If in source code I have
<form name="aspnetForm" method="post" action="/sw/Blog/post/Welcome-to-BlogEngineNET-1-4.aspx" onsubmit="javascript:return WebForm_OnSubmit();" id="aspnetForm" class="body">
......
<input id="btnSaveAjax" type="button" tabindex="7" onclick="if(Page_ClientValidate('AddComment')){AddComment()}" value="Enregistrer les commentaires"></input>
....
So I have to change form name in this manner
form name=aspnetForm - Enregister les commentaires|aspnetForm - Save comment|aspnetForm* !Vote !search
I change "form name=aspnetForm*" to "form name=aspnetForm - Save comment|aspnetForm* !Vote !search"
GSA say publish OK but Verification is KO. It's normal that verification is KO, nothing is publish.
GSA Log
18:10:45: [+] 1/1 matches engine AutoApprove - BlogEngine - http://paddy.celtix.net/post/Tigh-Phaidi.aspx
18:10:45: [+] 1/1 submission successful (1 submitted - AVG: 923,08/h) - http://paddy.celtix.net/post/Tigh-Phaidi.aspx
18:11:41: [ ] Attention! No more targets, but also no search engines selected in project.
18:12:41: [ ] Attention! No more targets, but also no search engines selected in project.
18:13:41: [ ] Attention! No more targets, but also no search engines selected in project.
18:13:41: [ ] Verifying links...
18:13:43: [-] 100% Verification not successful - http://paddy.celtix.net/post/Tigh-Phaidi.aspx
18:13:43: [ ] Verifying finished
In log window
form match data for STEP1
In debug window
[+] match: 006, name: aspnetForm - Save comment, id: aspnetForm, url: http://paddy.celtix.net/post/Tigh-Phaidi.aspx
[-] match: 002, name: aspnetForm - Search, id: aspnetForm, url: http://paddy.celtix.net/post/Tigh-Phaidi.aspx
OK => match aspnetForm - Save comment
In log window
submission data for STEP1
In debug window
POST http://paddy.celtix.net/post/Tigh-Phaidi.aspx
ctl00$cphBody$CommentView1$ddlCountry=th [type: RADIO/SELECT]
__EVENTTARGET= [type: HIDDEN]
__EVENTARGUMENT= [type: HIDDEN]
__VIEWSTATE=/wEPDwUKLTI2MTM1MTE0NQ9kFgJmD2QWBAIBDxYE...<cut>...oR0oE++1w== [type: HIDDEN]
ctl00$cphBody$CommentView1$txtName=Isa John [type: TEXT]
ctl00$cphBody$CommentView1$txtEmail=tera-rivero@justemail.net [type: TEXT]
ctl00$cphBody$CommentView1$txtWebsite=http://www.isajohn.com [type: TEXT]
ctl00$cphBody$CommentView1$hfCaptcha=d2575f9e-857f-4aa9-91c9-97f23dca285c [type: HIDDEN]
__EVENTVALIDATION=/wEWhwEC36S98Q4Cyqvt2wMC1eX3owwCruLkxgwC...<cut>...XyYGbSKZQ== [type: HIDDEN]
ctl00$cphBody$CommentView1$txtContent=Pretty! This has been a really wonderful...<cut>...se details. [type: MEMO]
I spying what the browser sends and I found 2 variables (__CALLBACKID & __CALLBACKPARAM) specified by JavaScript. One of this variable is specified with value of hidden input form (It's ctl00$cphBody$CommentView1$hfCaptcha)
How can I set manually with add fixed data ?
add fixed data=__CALLBACKPARAM=Value of ctl00$cphBody$CommentView1$hfCaptcha
[ext_var]
type=extract
front=...
back=...
add fixed data=__CALLBACKPARAM=%ext_var%
To test my GSA script Post parameters is it possible to change URL to post on my URL. This Url is PHP script who display Post variables
1) Connect to the blog engine HTML Page
2) Post Parameters to my own PHP page
On my url, I have a PHP script that displays wholes variables parameters of the post URL (similar to what is shown in the GSA debug log window).