Skip to content

Bypass uims captcha#23

Open
xpt1x wants to merge 3 commits into
masterfrom
experimental/bypass-captcha
Open

Bypass uims captcha#23
xpt1x wants to merge 3 commits into
masterfrom
experimental/bypass-captcha

Conversation

@xpt1x

@xpt1x xpt1x commented Jan 22, 2023

Copy link
Copy Markdown
Member

New system Requirements:
Tesseract OCR installed on system

UIMS now protects its content from bots/scripts using a captcha, however its a very simple image captcha (my criticism to UIMS 😜 ) and hence can be bypassed by introducing tessaract OCR to solve it

Although at this point of time it doesn't feels like a good idea to include bypass mechanism in this scraper api, but can be considered for future (future maintainers maybe 👀 )

@gaurav-de

gaurav-de commented Feb 10, 2023

Copy link
Copy Markdown

Fix for response:500 on sending request to main home page :

Actually they updated the page request arguments after they add the captcha, so we need to implement the new method:

OLD:

data = {
    "__VIEWSTATE": viewstate_tag["value"],  # type: ignore
    "txtLoginPassword": passwd,
    "btnLogin": "LOGIN",
}

# sending data to server 
response = requests.post(
    password_url, data=data, cookies=response.cookies, allow_redirects=False
)

NEW:

data = {
    "__VIEWSTATE": viewstate_tag["value"], # type: ignore
    "txtLoginPassword": passwd,
    "txtcaptcha": a, 
    "btnLogin": "LOGIN",
}

# // sending POST request to same page url for getting next page url

response = requests.post(
    password_url,
    cookies=response.cookies,
    headers=response.headers,
    data=data,
)

@xpt1x

xpt1x commented Feb 10, 2023

Copy link
Copy Markdown
Member Author

Fix for response:500 on sending request to main home page :

Actually they updated the page request arguments after they add the captcha, so we need to implement the new method:

OLD:

data = {
    "__VIEWSTATE": viewstate_tag["value"],  # type: ignore
    "txtLoginPassword": passwd,
    "btnLogin": "LOGIN",
}

# sending data to server 
response = requests.post(
    password_url, data=data, cookies=response.cookies, allow_redirects=False
)

NEW:

data = {
    "__VIEWSTATE": viewstate_tag["value"], # type: ignore
    "txtLoginPassword": passwd,
    "txtcaptcha": a, 
    "btnLogin": "LOGIN",
}

# // sending POST request to same page url for getting next page url

response = requests.post(
    password_url,
    cookies=response.cookies,
    headers=response.headers,
    data=data,
)

I am not getting what change you are trying to suggest here, can you please create a branch/fork of your own based on this branch, so it becomes more clear to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants