[Icecast] Send admin kill request to server

HGAlt hgalt at gmx.net
Sat Feb 18 12:23:52 UTC 2023


Hi everybody,



finally I found a solution!



First, Icecast requires a Basic Authorization, which has to provide via a
header.
But this can't be done via JavaScript or JQuery, due the security features
of the browsers.

For more detail information see
https://stackoverflow.com/questions/75463305/difference-basic-authorization-
between-postman-and-jquery-ajax/75493285#75493285.



Thanks for help,

HGA



Von: Icecast [mailto:icecast-bounces at xiph.org] Im Auftrag von HGAlt
Gesendet: Donnerstag, 16. Februar 2023 15:49
An: 'Icecast streaming server user discussions'
Betreff: Re: [Icecast] Send admin kill request to server



Hi Fred,



I am understand the requirements already a little bit better.

What I have to Do is a HTTP GET with a Basic Authorization in the header. I
have tested it with 'Postman' and it works fine with Icecast.

But I have to do it with Javascript or JQuery. Therefore curl doesn't help
me.



I try to use Ajax for that, but something goes wrong.
If I do it without Autorization, I got a return message which says
'Authentication required'.

If I enable the Autorization it tells me only readyState: 0.



If I will find a solution, I will post it here.



Cheers



Von: Icecast [mailto:icecast-bounces at xiph.org] Im Auftrag von Fred Gleason
Gesendet: Mittwoch, 15. Februar 2023 16:57
An: Icecast streaming server user discussions
Betreff: Re: [Icecast] Send admin kill request to server



On Feb 14, 2023, at 13:24, HGAlt <hgalt at gmx.net> wrote:



I am a little bit confused!

 <http://192.168.1.10:8000/admin/killclient?mount=/mystream.ogg&id=21>
http://192.168.1.10:8000/admin/killclient?mount=/mystream.ogg&id=21

This is an example of the Icecast documentation for kill a client.
And this is a HTTP GET, which is send to the Icecast server.
You also wrote, that there are no user and pass for an API.

What I have to know, what does the Icecast server expect?
If there is no user and pass, how the server knows, that is a valid request.



You should be able to send this with proper HTTP authentication parameters
by using CURL. Something like:



            curl -u admin:hackme
http://192.168.1.10:8000/admin/killclient?mount=/mystream.ogg
<http://192.168.1.10:8000/admin/killclient?mount=/mystream.ogg&id=21> &id=21



This is different from encoding the parameters as if they were part of an
HTML form.



Cheers!





|---------------------------------------------------------------------|

| Frederick F. Gleason, Jr. |             Chief Developer             |

|                           |             Paravel Systems             |

|---------------------------------------------------------------------|

|         A room without books is like a body without a soul.         |

|                                                                     |

|                                                         -- Cicero   |

|---------------------------------------------------------------------|







<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campai
gn=sig-email&utm_content=emailclient>

Virenfrei.
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campai
gn=sig-email&utm_content=emailclient> www.avast.com





--
Diese E-Mail wurde von Avast-Antivirussoftware auf Viren geprüft.
www.avast.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xiph.org/pipermail/icecast/attachments/20230218/f8d8d3c2/attachment.htm>


More information about the Icecast mailing list