ÆÄÀ̽ã - BasicAuth.¾öû³ª°Ô °£´ÜÇÑ HTTP ±âº» ÀÎÁõ ±¸Çö | |
Áö±Ý ´Ù¿î·Îµå |
ÆÄÀ̽ã - BasicAuth. ¼øÀ§ ¹× ¿ä¾à
±¤°í
- ƯÇã:
- Other/Proprietary Li...
- °¡°Ý:
- FREE
- °Ô½ÃÀÚ À̸§:
- Randall Degges
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://github.com/comradeb14ck/
ÆÄÀ̽ã - BasicAuth. ű×
ÆÄÀ̽ã - BasicAuth. ¼³¸í
Python-BasicAuth´Â Á×Àº °£´ÜÇÑ HTTP ±âº» ÀÎÁõ ¿£ÄÚ´õ ¹× µðÄÚ´õÀÔ´Ï´Ù. ¿Ö¿ä? HTTP¸¦ ½±°Ô µå·ÓÇؾßÇϱ⠶§¹®¿¡. ±× ÀÌÀ¯´Â``python-basicauth``¸¦ ¼³Ä¡ÇÏ°í``pip ¼³Ä¡ basicAuth````À» ¼³Ä¡ÇÏ°í ÃֽŠ¹öÀüÀ» outpount.ustageto¸¦ ¼³Ä¡ÇÕ´Ï´Ù.```python >>> basicauth¿¡¼ ÀÎÄÚµù µÈ ±âº» ÀÎÁõ ¹®ÀÚ¿À» »ý¼ºÇÕ´Ï´Ù °¡Á® ¿À±â >>> »ç¿ëÀÚ À̸§, ¾ÏÈ£ = 'rdegges', 'omghax !!!'>>> encoded_str = encode (»ç¿ëÀÚ À̸§, ¾ÏÈ£) >>> Àμâ encoded_str'basic cmrlz2dlczpvbwdoyxglmjelmjelmje = '```````````ÀÎÄÚµù µÈ ±âº» ÀÎÁõ ¹®ÀÚ¿ :```python >>> basicauth °¡Á® ¿À±â µðÄڵ忡¼ >>> À§ÀÇ ¿¹¿¡¼ ±âº» cmrlz2dlczpvbwdoyxglmjelmjelmje = '#. >>> username, password = decode (encodeed_str) >>> Àμâ (»ç¿ëÀÚ À̸§, ¾ÏÈ£) (' rdegges ','omghax !!! ')```````python >>> basicauth °¡Á® ¿À±â >>>¿¡¼````python >>> À§ÀÇ ¿¹Á¦¿¡¼. >>> »ç¿ëÀÚ À̸§, ¾ÏÈ£ = µðÄÚµå (ENCODED_STR) >>> Àμâ (»ç¿ëÀÚ À̸§, ¾ÏÈ£) ( 'rdegges', 'omghax !!!)```````python >>> BasicAuth °¡Á® ¿À±â µðÄڵ忡¼, DecodeError >>> Enco. ded_str = 'lol omg cmrlz2dlczpvbwdoyxglmjelmjelmje ='# À߸øµÈ Çؽà = 'À߸øµÈ ÇؽÃ. >>> username, password = decode (encoded_str) ÃßÀû (°¡Àå ÃÖ±ÙÀÇ È£Ãâ ¸¶Áö¸·) : "
ÆÄÀ̽ã - BasicAuth. °ü·Ã ¼ÒÇÁÆ®¿þ¾î