fix us unlock

fix us unlock with own proxy
This commit is contained in:
hama3254 2020-01-31 16:00:49 +01:00
parent 29fe55aa06
commit 8cc084d729
11 changed files with 82 additions and 85 deletions

Binary file not shown.

View File

@ -209,25 +209,23 @@ Public Class Main
Catch ex As Exception
MaxDL = 1
End Try
#Region "removed softsubtitle"
Try
Dim rkg As RegistryKey = Registry.CurrentUser.OpenSubKey("Software\CRDownloader")
SoftSubsString = rkg.GetValue("AddedSubs").ToString
If SoftSubsString = "none" Then
Else
Dim SoftSubsStringSplit() As String = SoftSubsString.Split(New String() {","}, System.StringSplitOptions.RemoveEmptyEntries)
For i As Integer = 0 To SoftSubsStringSplit.Count - 1
SoftSubs.Add(SoftSubsStringSplit(i))
Next
End If
Catch ex As Exception
End Try
'Label10.TextAlign = ContentAlignment.MiddleCenter
'Try
'Dim rkg As RegistryKey = Registry.CurrentUser.OpenSubKey("Software\CRDownloader")
'SoftSubsString = rkg.GetValue("AddedSubs").ToString
'If SoftSubsString = "none" Then
'Else
' Dim SoftSubsStringSplit() As String = SoftSubsString.Split(New String() {","}, System.StringSplitOptions.RemoveEmptyEntries)
' For i As Integer = 0 To SoftSubsStringSplit.Count - 1
' SoftSubs.Add(SoftSubsStringSplit(i))
' Next
'End If
'Catch ex As Exception
'End Try
#End Region
If Resu = Nothing Then
Resu = 1080
@ -293,8 +291,8 @@ Public Class Main
gIndexH = gIndexH + 1
With ListView1.Items.Add(0)
LVPictureBox(ListView1, gIndexH, b, "Softsubs: " + SoftSubs, NameKomplett)
bt_del(ListView1, gIndexH, NameKomplett)
LVPictureBox(ListView1, gIndexH, b, "", NameKomplett) ' removed softsubs LVPictureBox(ListView1, gIndexH, b, "Softsubs: " + SoftSubs, NameKomplett)
Bt_del(ListView1, gIndexH, NameKomplett)
End With
End If
End Sub
@ -791,17 +789,17 @@ Public Class Main
#End Region
#Region "Subs"
Dim SoftSubs2 As New List(Of String)
If SoftSubs.Count > 0 Then
For i As Integer = 0 To SoftSubs.Count - 1
If CBool(InStr(WebbrowserText, Chr(34) + "language" + Chr(34) + ":" + Chr(34) + SoftSubs(i) + Chr(34) + ",")) Then
SoftSubs2.Add(SoftSubs(i))
Else
'MsgBox("Softsubtitle for " + SoftSubs(i) + " is not avalible.", MsgBoxStyle.Information)
End If
Next
'Dim SoftSubs2 As New List(Of String)
'If SoftSubs.Count > 0 Then
' For i As Integer = 0 To SoftSubs.Count - 1
' If CBool(InStr(WebbrowserText, Chr(34) + "language" + Chr(34) + ":" + Chr(34) + SoftSubs(i) + Chr(34) + ",")) Then
' SoftSubs2.Add(SoftSubs(i))
' Else
' 'MsgBox("Softsubtitle for " + SoftSubs(i) + " is not avalible.", MsgBoxStyle.Information)
' End If
' Next
End If
'End If
If SubSprache = "None" Then
If CBool(InStr(WebbrowserText, Chr(34) + "hardsub_lang" + Chr(34) + ":null")) Then
SubSprache2 = "null"
@ -828,13 +826,13 @@ Public Class Main
If CBool(InStr(WebbrowserText, Chr(34) + "hardsub_lang" + Chr(34) + ":" + Chr(34) + SubSprache + Chr(34) + ",")) Then
SubSprache2 = Chr(34) + SubSprache + Chr(34)
ElseIf CBool(InStr(WebbrowserText, Chr(34) + "language" + Chr(34) + ":" + Chr(34) + SubSprache + Chr(34) + ",")) Then
If MessageBox.Show("It look like only Softsubtitle are avalibe." + vbNewLine + "Are you want to use Softsubtitle this time instead?", "No Hardsubtitle", MessageBoxButtons.YesNo) = DialogResult.Yes Then
SubSprache2 = "null"
SoftSubs2.Add(SubSprache)
Else
Throw New System.Exception("Could not find the sub language")
End If
'ElseIf CBool(InStr(WebbrowserText, Chr(34) + "language" + Chr(34) + ":" + Chr(34) + SubSprache + Chr(34) + ",")) Then
' If MessageBox.Show("It look like only Softsubtitle are avalibe." + vbNewLine + "Are you want to use Softsubtitle this time instead?", "No Hardsubtitle", MessageBoxButtons.YesNo) = DialogResult.Yes Then
' SubSprache2 = "null"
' SoftSubs2.Add(SubSprache)
' Else
' Throw New System.Exception("Could not find the sub language")
' End If
Else
@ -897,31 +895,31 @@ Public Class Main
#End Region
#Region "Download softsub file"
If SoftSubs2.Count > 0 Then
For i As Integer = 0 To SoftSubs2.Count - 1
'EpisodeLabel.Text = SoftSubs2(i)
'StatusLabel.Text = "Status: downloading subtitle file"
LabelUpdate = "Status: downloading subtitle file"
LabelEpisode = SoftSubs2(i)
Dim SoftSub As String() = WebbrowserText.Split(New String() {Chr(34) + "language" + Chr(34) + ":" + Chr(34) + SoftSubs2(i) + Chr(34) + "," + Chr(34) + "url" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim SoftSub_2 As String() = SoftSub(1).Split(New [Char]() {Chr(34)})
Dim SoftSub_3 As String = SoftSub_2(0).Replace("\/", "/")
Dim client0 As New WebClient
client0.Encoding = Encoding.UTF8
Dim str0 As String = client0.DownloadString(SoftSub_3)
Dim Pfad3 As String = Pfad2.Replace(Chr(34), "")
Dim FN As String = Path.ChangeExtension(Path.Combine(Path.GetFileNameWithoutExtension(Pfad3) + " " + SoftSubs2(i) + Path.GetExtension(Pfad3)), "ass")
'MsgBox(FN)
If i = 0 Then
FN = Path.ChangeExtension(Path.GetFileName(Pfad3), "ass")
'MsgBox(FN)
End If
Dim Pfad4 As String = Path.Combine(Path.GetDirectoryName(Pfad3), FN)
'MsgBox(Pfad4)
File.WriteAllText(Pfad4, str0, Encoding.UTF8)
Pause(1)
Next
End If
'If SoftSubs2.Count > 0 Then
' For i As Integer = 0 To SoftSubs2.Count - 1
' 'EpisodeLabel.Text = SoftSubs2(i)
' 'StatusLabel.Text = "Status: downloading subtitle file"
' LabelUpdate = "Status: downloading subtitle file"
' LabelEpisode = SoftSubs2(i)
' Dim SoftSub As String() = WebbrowserText.Split(New String() {Chr(34) + "language" + Chr(34) + ":" + Chr(34) + SoftSubs2(i) + Chr(34) + "," + Chr(34) + "url" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
' Dim SoftSub_2 As String() = SoftSub(1).Split(New [Char]() {Chr(34)})
' Dim SoftSub_3 As String = SoftSub_2(0).Replace("\/", "/")
' Dim client0 As New WebClient
' client0.Encoding = Encoding.UTF8
' Dim str0 As String = client0.DownloadString(SoftSub_3)
' Dim Pfad3 As String = Pfad2.Replace(Chr(34), "")
' Dim FN As String = Path.ChangeExtension(Path.Combine(Path.GetFileNameWithoutExtension(Pfad3) + " " + SoftSubs2(i) + Path.GetExtension(Pfad3)), "ass")
' 'MsgBox(FN)
' If i = 0 Then
' FN = Path.ChangeExtension(Path.GetFileName(Pfad3), "ass")
' 'MsgBox(FN)
' End If
' Dim Pfad4 As String = Path.Combine(Path.GetDirectoryName(Pfad3), FN)
' 'MsgBox(Pfad4)
' File.WriteAllText(Pfad4, str0, Encoding.UTF8)
' Pause(1)
' Next
'End If
#End Region
#Region "lösche doppel download"

View File

@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("3.1.3")>
<Assembly: AssemblyFileVersion("3.1.3")>
<Assembly: AssemblyVersion("3.1.4")>
<Assembly: AssemblyFileVersion("3.1.4")>
<Assembly: NeutralResourcesLanguage("")>

View File

@ -206,31 +206,29 @@ Public Class einstellungen
Main.LoginOnly = "US_UnBlock"
Dim wb As New WebClient
Dim Session As String = wb.DownloadString("https://api1.cr-unblocker.com/getsession.php?version=1.1&device_type=com.crunchyroll.windows.desktop&access_token=LNDJgOit5yaRIWN&device_id=" + GeräteID())
Dim Session As String = wb.DownloadString("https://api.criater-stiftung.org/cr-cookie-hama3254.php") '"https://api1.cr-unblocker.com/getsession.php?version=1.1&device_type=com.crunchyroll.windows.desktop&access_token=LNDJgOit5yaRIWN&device_id=" + GeräteID())
'MsgBox(Session)
If CBool(InStr(Session, "bad_request")) Then
Session = wb.DownloadString("https://api2.cr-unblocker.com/start_session?version=1.1&device_type=com.crunchyroll.iphone&access_token=QWjz212GspMHH9h&device_id=" + GeräteID())
End If
If CBool(InStr(Session, "bad_request")) Then
MsgBox(Main.CR_Unlock_Error_String, MsgBoxStyle.OkOnly)
Exit Sub
ElseIf CBool(InStr(Session, "Unauthenticated request")) Then
MsgBox(Main.CR_Unlock_Error_String, MsgBoxStyle.OkOnly)
Exit Sub
ElseIf CBool(InStr(Session, chr(34) + "country_code" + chr(34) + ":" + chr(34) + "US" + chr(34))) = False Then
MsgBox(Main.CR_Unlock_Error_String, MsgBoxStyle.OkOnly)
Exit Sub
Else
'MsgBox(Session)
GeckoFX.Show()
'If CBool(InStr(Session, "bad_request")) Then
'Session = wb.DownloadString("https://api2.cr-unblocker.com/start_session?version=1.1&device_type=com.crunchyroll.iphone&access_token=QWjz212GspMHH9h&device_id=" + GeräteID())
'End If
'If CBool(InStr(Session, "bad_request")) Then
' MsgBox(Main.CR_Unlock_Error_String, MsgBoxStyle.OkOnly)
' Exit Sub
'ElseIf CBool(InStr(Session, "Unauthenticated request")) Then
' MsgBox(Main.CR_Unlock_Error_String, MsgBoxStyle.OkOnly)
' Exit Sub
' 'ElseIf CBool(InStr(Session, chr(34) + "country_code" + chr(34) + ":" + chr(34) + "US" + chr(34))) = False Then
' 'MsgBox(Main.CR_Unlock_Error_String, MsgBoxStyle.OkOnly)
' 'Exit Sub
'Else
'MsgBox(Session)
GeckoFX.Show()
GeckoFX.WebBrowser1.Navigate("https://www.crunchyroll.com/")
Dim SessionID1 As String() = Session.Split(New String() {Chr(34) + "session_id" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim SessionID2 As String() = SessionID1(1).Split(New [Char]() {Chr(34)})
GeckoFX.keks = SessionID2(0)
'Dim SessionID1 As String() = Session.Split(New String() {Chr(34) + "session_id" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
'Dim SessionID2 As String() = SessionID1(1).Split(New [Char]() {Chr(34)})
GeckoFX.keks = Session.Replace(" ", "") 'SessionID2(0)
End If
'End If
'MsgBox(Session)
'Dim JS As String = "javascript:console.log(`got session id.Setting cookie " + GeckoFX.keks + ".`);browser.cookies.set({url:`http:name:'session_id',value:" + GeckoFX.keks + ",domain:`crunchyroll.com`,httpOnly:true},()=>{browser.cookies.set({url:`http:name:'sess_id',value:" + GeckoFX.keks + ",domain:`crunchyroll.com`,httpOnly:true},()=>{browser.cookies.set({url:`http:name:'c_locale',value:'enUS',domain:`crunchyroll.com`,httpOnly:true}})});"
@ -338,7 +336,8 @@ Public Class einstellungen
End Sub
Private Sub PictureBox5_Click(sender As Object, e As EventArgs) Handles PictureBox5.Click
SoftSub.ShowDialog()
MsgBox("Crunchyroll removed the softsubs, there are not available anymore.", MsgBoxStyle.OkOnly)
'SoftSub.ShowDialog()
End Sub
Private Sub PictureBox5_MouseEnter(sender As Object, e As EventArgs) Handles PictureBox5.MouseEnter