I've been hammering a (govermental website that handles companies in Sweden) , to get information about companies in Sweden to get output from the form-data there but I cant manage to do this.
I have put togheter this code but i cant seem to get the variables right in form. I understand that you need to use the fp-sok and select the radiobutton with fp-sok:type:0 and submit searchterm with fp-sok:sokterm but I have ran out of guessing combinations. Any guidance and it would be nice to get to know what I am doing wrong.
The current code on where Im at:
But I am only getting this, which is a kinda /ignore answer from the website;
; outerText=; tagNam
When analyzing the form on the website by making the request manually using the browser, and with using the software Fiddler as the analyzer-tool and looking at the forms-tab, I'm getting these values. But I still cannot grasp how I need to handle this request;
Please anyone, help 🙂
Whenever I'm trying to pull information like you are I tend to use httpwebrequest, there's lots of properties you can specify and may have functionality you are looking for, this script definitely won't do what you want it to, but you can see what I mean by how much more you have to play with.
$username = '***************' $useragent = 'Microsoft Office/15.0 (Windows NT 6.2; Microsoft Outlook 15.0.4693; Pro)' $password = '**************' $domain = '************************' $Body = [byte][char]'asdf'; $Request = [System.Net.HttpWebRequest]::CreateHttp('https://autodiscover-s.outlook.com/autodiscover/autodiscover.xml'); $Request.Credentials = new-object System.Net.NetworkCredential($username, $password, $domain) $Request.Method = 'POST'; $request.Timeout = "8000" $Request.ContentType = 'text/xml; charset=utf-8' $Request.UserAgent = "$useragent" $Stream = $Request.GetRequestStream(); $Stream.Write($Body, 0, $Body.Length); $Request.GetResponse();
Hope this is marginally helpful.
Sorry Steven, I don't quiet see how your code-snippet would help me. Their website has public access. You could go there and search for "Facebook" for example to find the Swedish registered Facebook-company. That output is what I'm looking to return to the user.
Anything or anyone else that could suggest/point me somewhere?
$InvokeWR.Forms.Fields['fp-sok'] = 'fp-sok'
Its going through without any errors but I'm not getting any output *sigh*
You must be logged in to reply to this topic.