Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bypass uims captcha #23

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Bypass uims captcha #23

wants to merge 3 commits into from

Conversation

xpt1x
Copy link
Member

@xpt1x xpt1x commented Jan 22, 2023

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
Copy link

gaurav-de commented Feb 10, 2023

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
Copy link
Member Author

xpt1x commented Feb 10, 2023

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