Skip to content
  • Home
  • Recent
  • Tags
  • 0 Unread 0
  • Categories
  • Unreplied
  • Popular
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
ioBroker Logo

Community Forum

  1. ioBroker Community 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 ?
    apollon77A
    apollon77
    48
    3
    8.2k

  • Monatsrückblick – September 2025
    BluefoxB
    Bluefox
    13
    1
    1.9k

  • Neues Video "KI im Smart Home" - ioBroker plus n8n
    BluefoxB
    Bluefox
    15
    1
    2.2k

Problem bei Javascript, um einen Hash zu erzeugen

Scheduled Pinned Locked Moved JavaScript
javascript
1 Posts 1 Posters 235 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • SBorgS Offline
    SBorgS Offline
    SBorg
    Forum Testing Most Active
    wrote on last edited by
    #1

    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 :)

    LG SBorg ( SBorg auf GitHub)
    Projekte: Lebensmittelwarnung.de | WLAN-Wetterstation | PimpMyStation

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    Support us

    ioBroker
    Community Adapters
    Donate

    287

    Online

    32.4k

    Users

    81.4k

    Topics

    1.3m

    Posts
    Community
    Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
    ioBroker Community 2014-2025
    logo
    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Home
    • Recent
    • Tags
    • Unread 0
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe