Skip to content

Instantly share code, notes, and snippets.

@benyaminsalimi
Last active December 26, 2018 09:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benyaminsalimi/37f8174f60e53ecf29e111b9dfb186f4 to your computer and use it in GitHub Desktop.
Save benyaminsalimi/37f8174f60e53ecf29e111b9dfb186f4 to your computer and use it in GitHub Desktop.
python function for login to puya.birjandut.ir
# this function can be use for loging to every old sadaf university portal ! also can use for evil thing :)
# there is no captcha and childern can do EVIL thing with this portal :-D
# sadaf portal developed by this company : http://dpm.ir/
# sadaf portal used for Birjand university of techonology and Ferdowsi university of Mashhad
# usage as you know : check('9313344449','123456')
import requests
import hashlib
import bs4
def check(username, password):
md5 = hashlib.md5()
passw=str(password)
user =str(username)
md5.update(passw)
head={'UserID': user ,'UserPassword':md5.hexdigest() , 'pswdStatus': 'strong', 'DummyVar': ''}
url = 'http://puya.birjandut.ir/gateway/UserInterim.php'
page = requests.post(url, data=head)
soup = soup = bs4.BeautifulSoup(page.text,'html.parser')
if soup.title.string == 'browser error':
return False
else:
return True
@benyaminsalimi
Copy link
Author

you can also read my full blog post here it so intersting 👍

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