Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. JavaScript
    5. Problem bei Javascript, um einen Hash zu erzeugen

    NEWS

    • UPDATE 31.10.: Amazon Alexa - ioBroker Skill läuft aus ?

    • Monatsrückblick – September 2025

    • Neues Video "KI im Smart Home" - ioBroker plus n8n

    Problem bei Javascript, um einen Hash zu erzeugen

    This topic has been deleted. Only users with topic management privileges can see it.
    • SBorg
      SBorg Forum Testing Most Active last edited by

      Ev. liegt es am schlechten Javascript, keiner Erfahrung mit dem hashen, ggf. verstehe ich auch das System einfach falsch oder schlimmstenfalls eine Kombi aus all dessen...

      Ich wollte eigentlich nur prüfen ob der JDownloader noch läuft. Aber egal was ich bisher versucht habe, deren API-Server kann mit meiner Anfrage nix anfangen.

      Aktuell sieht es so aus (zum testen mit der "Uptime", später einfach die DL-Geschwindigkeit):

      const axios = require('axios').default;
      const CryptoJS = require('crypto');
      const axiosJDL = axios.create({
      	baseURL: 'https://api.jdownloader.org',
      	timeout: 6000,
         responseType: 'text'
      });
      
      const url = "/jd/uptime";
      const requestID = Date.now();
      const sha256Hasher = CryptoJS.createHmac("sha256", "_mein_JD_Passwort_");
      
      let queryString = url+"?email=_meine_JD-Email-Addy_@mail.blabla&rid="+requestID;
      queryString += "&signature=" + sha256Hasher.update(encodeURI(queryString)).digest("hex");
      console.log("str: "+queryString);
      
      
      axiosJDL.get(queryString)
      	.then(response => {
      		console.log("Ausgabe: "+response.data);
      	})
      	.catch(err => {
      		console.log(err);
      	});
      
      

      Hier ist die Beschreibung zur API: https://my.jdownloader.org/developers/#tag_211
      Vielleicht bringt jemand freundlicherweise Licht ins Dunkel 🙂

      1 Reply Last reply Reply Quote 0
      • First post
        Last post

      Support us

      ioBroker
      Community Adapters
      Donate

      1.1k
      Online

      32.4k
      Users

      81.2k
      Topics

      1.3m
      Posts

      javascript
      1
      1
      232
      Loading More Posts
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      Community
      Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
      The ioBroker Community 2014-2023
      logo