NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 2 3 4 5 6 … 93 Next »
SchedulesDirect using Powershell

 
  • 0 Vote(s) - 0 Average
SchedulesDirect using Powershell
jcole998
Offline

Posting Freak

New York, USA
Posts: 855
Threads: 186
Joined: Jun 2015
#1
2017-09-13, 02:27 PM
Hello. I'm trying to access the SD token needed for schedules access using Windows Powershell.

If anyone has any experience or wisdom on how to do this, I would appreciate the help.

This is what I've tried so far but with no success:

$sdUID = 'abcdef'
$sdPW = Get-StringHash -String "123456" -HashName "SHA1"
$sdPW = $sdPW.ToLower()
$jhsdLogin = @{"username"= $sdUID; "password"= $sdPW} | ConvertTo-Json

$sdUAgent = [Microsoft.PowerShell.Commands.PSUserAgent]::InternetExplorer
$sdContentType = "application/json;charset=UTF-8"

$sdToken = Invoke-WebRequest -Uri https://json.schedulesdirect.org/20141201/token -UseBasicParsing -Method Post -Body $jhsdLogin -UserAgent $sdUAgent -ContentType $sdContentType -Debug

This snippet results in "400 Bad Input."

I've also posted on the SchedulesDirect Developer forum.

Thank you.
Later...JohnC

System Status: Humming nicely!  Smile
Desktop: Intel DX38BT MB - Intel Q9650 3GHz Quad - NVIDIA GeForce GTX 1050 Ti Graphics
Software: Win 10 Pro(Build 1909) - NextPVR - WinTV8
Video: Verizon FiOS - Hauppauge DCR-3250 - Hauppauge 1512 HDPVR2
RaspberryPi 4 Raspbian and FLIRC
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,767
Threads: 954
Joined: May 2006
#2
2017-09-13, 03:19 PM
I can't help with the code but a while back XP users had troubles and it was noted that SD load balancers started to reject TLS 1.0 and I am not sure that you should be using the SHA1 hash

If you don't require security for your password change to http:// will be simpler.

Martin
jcole998
Offline

Posting Freak

New York, USA
Posts: 855
Threads: 186
Joined: Jun 2015
#3
2017-09-14, 01:14 PM
Thanks, Martin. I've taken up this issue with SD and Mr. K has generously agreed to help find out what I'm doing wrong. All the SD documentation shows that the password should be SHA1 encrypted. Maybe the documents are wrong and I hope that Mr K will see that.
Later...JohnC

System Status: Humming nicely!  Smile
Desktop: Intel DX38BT MB - Intel Q9650 3GHz Quad - NVIDIA GeForce GTX 1050 Ti Graphics
Software: Win 10 Pro(Build 1909) - NextPVR - WinTV8
Video: Verizon FiOS - Hauppauge DCR-3250 - Hauppauge 1512 HDPVR2
RaspberryPi 4 Raspbian and FLIRC
jcole998
Offline

Posting Freak

New York, USA
Posts: 855
Threads: 186
Joined: Jun 2015
#4
2017-09-15, 01:25 PM
My helper from SchedulesDirect seems to be rather busy of late which I can understand. So...

sub, would you be kind enough to post the code snippet you use to request a token from SD? Any language.

Thanks.
Later...JohnC

System Status: Humming nicely!  Smile
Desktop: Intel DX38BT MB - Intel Q9650 3GHz Quad - NVIDIA GeForce GTX 1050 Ti Graphics
Software: Win 10 Pro(Build 1909) - NextPVR - WinTV8
Video: Verizon FiOS - Hauppauge DCR-3250 - Hauppauge 1512 HDPVR2
RaspberryPi 4 Raspbian and FLIRC
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,767
Threads: 954
Joined: May 2006
#5
2017-09-16, 04:18 PM
The reference Java source is available at https://github.com/SchedulesDirect/mfdb-json

Martin
jcole998
Offline

Posting Freak

New York, USA
Posts: 855
Threads: 186
Joined: Jun 2015
#6
2017-09-16, 08:35 PM
Thanks to all who responded.

I have finally hacked the code to retrieve a token. All data in SchedulesDirect is now available for retrieval and examination. Now I *really* gotta learn Powershell a LOT better! But it's lookin' good! Big Grin
Later...JohnC

System Status: Humming nicely!  Smile
Desktop: Intel DX38BT MB - Intel Q9650 3GHz Quad - NVIDIA GeForce GTX 1050 Ti Graphics
Software: Win 10 Pro(Build 1909) - NextPVR - WinTV8
Video: Verizon FiOS - Hauppauge DCR-3250 - Hauppauge 1512 HDPVR2
RaspberryPi 4 Raspbian and FLIRC
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#7
2017-09-20, 04:22 PM
jcole998 Wrote:sub, would you be kind enough to post the code snippet you use to request a token from SD? Any language.
Sorry, I've been travelling the last 10 days, so didn't have a chance to respond to this. It sounds like you've got it sorted now.
jcole998
Offline

Posting Freak

New York, USA
Posts: 855
Threads: 186
Joined: Jun 2015
#8
2017-09-21, 01:11 PM
Hi, sub, and welcome back. Ten days on the road has to be draining, business or pleasure!

Yeah, I've got SD under control and the data is amazing! A password hash was stopping me, but I've got that beat. Learning Powershell is now the challenge.

Thanks for checking in!
Later...JohnC

System Status: Humming nicely!  Smile
Desktop: Intel DX38BT MB - Intel Q9650 3GHz Quad - NVIDIA GeForce GTX 1050 Ti Graphics
Software: Win 10 Pro(Build 1909) - NextPVR - WinTV8
Video: Verizon FiOS - Hauppauge DCR-3250 - Hauppauge 1512 HDPVR2
RaspberryPi 4 Raspbian and FLIRC
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  SchedulesDirect XML mvallevand 4 2,347 2011-03-30, 03:19 AM
Last Post: mvallevand
  I-xmltv for SchedulesDirect questions FlatEarth 0 1,105 2007-09-17, 04:44 PM
Last Post: FlatEarth

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode