Bit Che > Scripts & Development
Winsock security error
CuF:
I've been working on a script for AnimeBytes... mostly because their site has an awful layout.
Anyway, trying to make the login work, but I can't get a foot hold.
The log shows:
--- Code: ---[3:42:58 AM]
POST https://yuki.animebytes.tv/user/login
Referer:
Cookie:
[3:42:59 AM]
cWinHTTP1: 1 - Error: -2147012858 - The host name in the certificate is invalid or does not match
[3:42:59 AM]
POST https://yuki.animebytes.tv/user/login
Referer:
Cookie:
[3:42:59 AM]
cWinHTTP1: 1 - Error: -2147012858 - The host name in the certificate is invalid or does not match
--- End code ---
No idea here. Suggestions?
Edit: More info, the logon uses a unique id for each logon attempt, so I'm using prelogin and code0 to grab the "crf_token".
In theory, since that is first, it is probably what is supposed to be occurring when this errors out.
The code so far...
--- Code: ---[login]
prelogin=code(`https://yuki.animebytes.tv/user/login`,0)
login=https://yuki.animebytes.tv/user/login
form=username=%USER%&password=%PASS%&csrf_token=%CSRF%
failed=attempts remaining
failed2=Security token invalid
[code0]
@i=find(1,@data,`name="csrf_token"`,`value=`)
num=extract(@i,@data,`"`,`"`)
$form=replace($form,`%CSRF%`)
[/code0]
--- End code ---
Bovski:
Try logging in with IE you may be able to set an exception.
chip!:
i'm looking into it to make sure the 'engine' is OK.. I dont have a valid account, but ill see what I can find out.
CuF:
FF doesn't seem to have any complaints but IE errors that:
The security certificate presented by this website has expired or is not yet valid.
The security certificate presented by this website was issued for a different website's address.
Understandable since it does look like the certificate has expired and the site has changed names from animebyte.es to animebytes.tv without a new certificate.
An exception doesn't seem to help BC work through it.
In theory you don't need an account to get this far, BC just won't load the logon page. Script is attached.
chip!:
i've added a flag to the code for WinHTTP to ignore those certificate SSL errors.. so hang tight till i can post the new version.. should be working then :)
also, here is a working header for the script (havent checked your post above, but i fixed a few things while testing)
--- Code: ---[script]
name=AnimeBytes.tv
source=AnimeBytes
author=CuF
modified=Chip 2013/04/06
pwd=1
version=2
[home]
1=https://yuki.animebytes.tv
[profiles]
all=/torrents.php?searchstr=%SEARCH%t&action=advanced&search_type=title&tags_type=0&sort=relevance&way=desc&hentai=2
[login]
prelogin=code(`https://yuki.animebytes.tv/user/login`,0)
login=https://yuki.animebytes.tv/user/login
form=csrf_token=%CSRF%&username=%USER%&password=%PASS%&keeplogged_sent=true&keeplogged=on&login=Log+In%21
failed=attempts remaining
failed2=/user/login
[code0]
@i=find(1,@data,`csrf_token`,`value=`)
num=extract(@i,@data,`"`,`"`)
$form=replace($form,`%CSRF%`,num)
[/code0]
--- End code ---
although, not sure about failed2= because i havent been able to login.
but I was going to say, i like to use Google Chrome and then turn on "Developers Tools" and go to the "Network Tab" and then do the search and then I can view the actual HTTP request of Chrome, and then quickly build the request for Bit Che using that.. (like making sure you have all the FORM post stuff).. see the screen shot:
Navigation
[0] Message Index
[#] Next page
Go to full version