• WHAT THE ERROR ON MY CODE???

    From =?UTF-8?B?16DXqteZINep15jXqNef?=@21:1/5 to All on Tue Jun 28 16:35:22 2022
    import requests
    from requests.structures import CaseInsensitiveDict

    url = "https://api.crowdstrike.com/oauth2/token"

    headers = CaseInsensitiveDict()
    headers["Content-Type"] = "application/x-www-form-urlencoded" headers["Authorization"] = "Basic YjMwMzcwODY3NTUzNDMwNTg5NzA2MjkyNDFmMDE1YWY6VjNKYTk2Y1F4RTFzeTdYbzRnbkt0a2k1djhscXUyU01oSE5VWUwwRg=="

    data = "POST"


    resp = requests.post(url, headers=headers, data=data)

    print(resp.text)
    print(resp.status_code)


    import requests
    from requests.structures import CaseInsensitiveDict

    MYurl = " https://api.crowdstrike.com/intel/combined/indicators/v1?q=123.123.123.123"

    headersa = CaseInsensitiveDict()
    headersa["Authorization"] = "Bearer "+resp.text

    resp1 = requests.get(MYurl, headers=headersa)

    print(resp1.status_code)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Lowry-Duda@21:1/5 to All on Tue Jun 28 11:42:01 2022
    Please don't use all caps in the subject line. It comes across as if
    you're yelling at the list --- this doesn't make people want to be more helpful.

    Instead, use meaningful, specific subject headers. Also, please be
    precise and informative about what your problem is. It's not clear what
    you expect your code to do or what happens differently than you expect.

    On Tue, Jun 28, 2022 at 04:35:22PM +0300, נתי שטרן wrote:
    import requests
    from requests.structures import CaseInsensitiveDict

    url = "https://api.crowdstrike.com/oauth2/token"

    Further, testing your code makes random api calls to some website, which
    I'm disinclined to do without proper context.

    For more advice, I suggest reading "How to Ask Questions" at

    http://www.catb.org/~esr/faqs/smart-questions.html

    - DLD

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Chris Angelico@21:1/5 to nsh531@gmail.com on Wed Jun 29 01:41:43 2022
    ‪On Wed, 29 Jun 2022 at 01:37, ‫נתי שטרן‬‎ <nsh531@gmail.com> wrote:‬
    headers["Authorization"] = "Basic YjMwMzcwODY3NTUzNDMwNTg5NzA2MjkyNDFmMDE1YWY6VjNKYTk2Y1F4RTFzeTdYbzRnbkt0a2k1djhscXUyU01oSE5VWUwwRg=="


    The error is that you just revealed your credentials to the whole
    world. This is a public mailing list.

    In fact, you just revealed your credentials to TWO mailing lists at once.

    Good job.

    ChrisA

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From De ongekruisigde@21:1/5 to Chris Angelico on Tue Jun 28 18:54:05 2022
    On 2022-06-28, Chris Angelico <rosuav@gmail.com> wrote:
    ‪On Wed, 29 Jun 2022 at 01:37, ‫נתי שטרן‬‎ <nsh531@gmail.com> wrote:‬
    headers["Authorization"] = "Basic
    YjMwMzcwODY3NTUzNDMwNTg5NzA2MjkyNDFmMDE1YWY6VjNKYTk2Y1F4RTFzeTdYbzRnbkt0a2k1djhscXUyU01oSE5VWUwwRg=="


    The error is that you just revealed your credentials to the whole
    world. This is a public mailing list.

    In fact, you just revealed your credentials to TWO mailing lists at once.

    I think the term 'script kiddie' applies here.


    Good job.

    ChrisA


    --
    Without followers, evil cannot spread.
    [Spock, "And The Children Shall Lead", stardate 5029.5]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?B?16DXqteZINep15jXqNef?=@21:1/5 to All on Wed Jun 29 08:32:51 2022
    Sorry but i forgor to delete this token data

    בתאריך יום שלישי, 28 ביוני 2022, מאת De ongekruisigde < ongekruisigde@news.eternal-september.org>:

    On 2022-06-28, Chris Angelico <rosuav@gmail.com> wrote:
    ‪On Wed, 29 Jun 2022 at 01:37, ‫נתי שטרן‬‎ <nsh531@gmail.com> wrote:‬
    headers["Authorization"] = "Basic
    YjMwMzcwODY3NTUzNDMwNTg5NzA2MjkyNDFmMDE1YWY6VjNKYTk2Y1F4RTFz eTdYbzRnbkt0a2k1djhscXUyU01oSE5VWUwwRg=="


    The error is that you just revealed your credentials to the whole
    world. This is a public mailing list.

    In fact, you just revealed your credentials to TWO mailing lists at once.

    I think the term 'script kiddie' applies here.


    Good job.

    ChrisA


    --
    Without followers, evil cannot spread.

    [Spock, "And The Children Shall Lead", stardate 5029.5]
    --
    https://mail.python.org/mailman/listinfo/python-list



    --
    <https://netanel.ml>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Calvin Spealman@21:1/5 to nsh531@gmail.com on Wed Jun 29 15:34:21 2022
    You also forgot to include any information about an error or problem you
    got in using this code.

    We can't help you if you don't have an actual question to ask.

    ‪On Wed, Jun 29, 2022 at 1:36 AM ‫נתי שטרן‬‎ <nsh531@gmail.com> wrote:‬

    Sorry but i forgor to delete this token data

    בתאריך יום שלישי, 28 ביוני 2022, מאת De ongekruisigde < ongekruisigde@news.eternal-september.org>:

    On 2022-06-28, Chris Angelico <rosuav@gmail.com> wrote:
    ‪On Wed, 29 Jun 2022 at 01:37, ‫נתי שטרן‬‎ <nsh531@gmail.com> wrote:‬
    headers["Authorization"] = "Basic
    YjMwMzcwODY3NTUzNDMwNTg5NzA2MjkyNDFmMDE1YWY6VjNKYTk2Y1F4RTFz eTdYbzRnbkt0a2k1djhscXUyU01oSE5VWUwwRg=="


    The error is that you just revealed your credentials to the whole
    world. This is a public mailing list.

    In fact, you just revealed your credentials to TWO mailing lists at
    once.

    I think the term 'script kiddie' applies here.


    Good job.

    ChrisA


    --
    Without followers, evil cannot spread.

    [Spock, "And The Children Shall Lead", stardate 5029.5]
    --
    https://mail.python.org/mailman/listinfo/python-list



    --
    <https://netanel.ml>
    --
    https://mail.python.org/mailman/listinfo/python-list



    --

    CALVIN SPEALMAN

    SENIOR QUALITY ENGINEER

    calvin.spealman@redhat.com M: +1.336.210.5107
    [image: https://red.ht/sig] <https://red.ht/sig>
    TRIED. TESTED. TRUSTED. <https://redhat.com/trusted>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)