rzander / ruckzuck

software package manager for windows
https://ruckzuck.tools
Microsoft Public License
221 stars 20 forks source link

API Get Software via Powershell returning 403 - Forbidden #187

Closed ruitpinheiro closed 1 year ago

ruitpinheiro commented 2 years ago

Hi,

In first place a great thank you for this product.

Since yesterday I've been receiving an return error 403 each time i try to get info from any app on the catalog.

The code that I'm using is

$url = Invoke-RestMethod -Uri "https://ruckzuck.tools/rest/v2/geturl" $AppShortName = 'LAPS' Invoke-RestMethod -Uri "$($url)/rest/v2/getsoftwares?shortname=$AppShortName"

and the output is Invoke-RestMethod : Web App - Unavailable

    html {
        height: 100%;
        width: 100%;
    }
    #feature {
        width: 960px;
        margin: 95px auto 0 auto;
        overflow: auto;
    }
    #content {
        font-family: "Segoe UI";
        font-weight: normal;
        font-size: 22px;
        color: #ffffff;
        float: left;
        width: 460px;
        margin-top: 68px;
        margin-left: 0px;
        vertical-align: middle;
    }
        #content h1 {
            font-family: "Segoe UI Light";
            color: #ffffff;
            font-weight: normal;
            font-size: 60px;
            line-height: 48pt;
            width: 800px;
        }
    p a, p a:visited, p a:active, p a:hover {
        color: #ffffff;
    }
    #content a.button {
        background: #0DBCF2;
        border: 1px solid #FFFFFF;
        color: #FFFFFF;
        display: inline-block;
        font-family: Segoe UI;
        font-size: 24px;
        line-height: 46px;
        margin-top: 10px;
        padding: 0 15px 3px;
        text-decoration: none;
    }
        #content a.button img {
            float: right;
            padding: 10px 0 0 15px;
        }
        #content a.button:hover {
            background: #1C75BC;
        }

        Error 403 - Forbidden
        The web app you have attempted to reach has blocked your access.

At line:1 char:1

rzander commented 2 years ago

It seems that your IP was blacklisted. The script is fine, the question is how often are you triggering this request ? ... and it's important to call the GetUrl , otherwise you will also blacklisted. The reason behind is that there are too many recuring requests that are using ruckzuck for something else that it was created for... At the end someone has to pay for all these requests.

ruitpinheiro commented 2 years ago

Hi Zander,

Thanks for your feedback, I'm going to check that and fix that "abusive" request usage.

Many thanks, Rui

ruitpinheiro commented 2 years ago

Hi Zander,

Can we request one ApiKey for our company?

We use the getsoftwares API request once a day to build the file list that is going to be used by all machines for detection purposes. We have 23 apps using this detection so once a day we do 23 getsoftwares API requests.

If this is too much we can change the schedule to even days or something like that.

Regards, Rui Pinheiro

rzander commented 2 years ago

Can you please send me an eMail to: roger at zander.ch, then I will send you an apikey... 23 Requests per day, is not a problem...