Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

17
LINES

< > BotCompany Repo | #1031702 // Password Salter Service

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Uses 1113K of libraries. Click here for Pure Java version (2461L/13K).

cmodule2 SalterService > DynPrintLog {
  set flag NoNanoHTTPD.
  !include #1029545 // API for Eleu
  
  switchable S allowedIP;
  switchable S passwordLocation;
  
  O html(IWebRequest req) ctex {
    if (!eq(req.clientIP(), allowedIP))
      ret "Not allowed";
      
    if (empty(passwordLocation) || !fileExists(passwordLocation))
      ret "Misconfigured";
      
    ret md5(req.get("pw") + trimLoadTextFile(passwordLocation));
  }
}

Author comment

Began life as a copy of #1030416

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1031702
Snippet name: Password Salter Service
Eternal ID of this version: #1031702/2
Text MD5: a6b92a4f8d20240897e39c5ef67911ba
Transpilation MD5: 7b78b3338ae5781e119d43fddc86080a
Author: stefan
Category: javax
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-06-27 06:40:09
Source code size: 455 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 73 / 38517
Version history: 1 change(s)
Referenced in: [show references]