Linux v69820.1blu.de 4.15.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64
Apache/2.4.58
Server IP : 195.90.215.149 & Your IP : 216.73.216.250
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
share /
nodejs /
coveralls /
lib /
Delete
Unzip
Name
Size
Permission
Date
Action
convertLcovToCoveralls.js
3.59
KB
-rw-r--r--
2023-01-25 01:11
detectLocalGit.js
1.37
KB
-rw-r--r--
2023-01-25 01:11
fetchGitData.js
2.94
KB
-rw-r--r--
2023-01-25 01:11
getOptions.js
8.42
KB
-rw-r--r--
2023-01-25 01:11
handleInput.js
1.04
KB
-rw-r--r--
2023-01-25 01:11
logger.js
334
B
-rw-r--r--
2023-01-25 01:11
sendToCoveralls.js
689
B
-rw-r--r--
2023-01-25 01:11
Save
Rename
'use strict'; const fs = require('fs'); const path = require('path'); // branch naming only has a few excluded characters, see git-check-ref-format(1) const REGEX_BRANCH = /^ref: refs\/heads\/([^?*[\\~^:]+)$/; function detectLocalGit() { let dir = process.cwd(); let gitDir; while (path.resolve('/') !== dir) { gitDir = path.join(dir, '.git'); if (fs.existsSync(path.join(gitDir, 'HEAD'))) { break; } dir = path.dirname(dir); } if (path.resolve('/') === dir) { return; } const head = fs.readFileSync(path.join(dir, '.git', 'HEAD'), 'utf-8').trim(); const branch = (head.match(REGEX_BRANCH) || [])[1]; if (!branch) { return { git_commit: head }; } const commit = _parseCommitHashFromRef(dir, branch); return { git_commit: commit, git_branch: branch }; } function _parseCommitHashFromRef(dir, branch) { const ref = path.join(dir, '.git', 'refs', 'heads', branch); if (fs.existsSync(ref)) { return fs.readFileSync(ref, 'utf-8').trim(); } // ref does not exist; get it from packed-refs let commit = ''; const packedRefs = path.join(dir, '.git', 'packed-refs'); const packedRefsText = fs.readFileSync(packedRefs, 'utf-8'); packedRefsText.split('\n').forEach(line => { if (line.match(`refs/heads/${branch}`)) { commit = line.split(' ')[0]; } }); return commit; } module.exports = detectLocalGit;