Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@kanzakikaoruuuu/yt-dl

Latest version: v0.2.0

Overview

Last scanned
27 Nov 2026
Published
27 Nov 2026
npm package Publisher: kanzakikaoruuuu
0 Stars
0 Forks
2 Versions
JavaScript Repo language

Scan summary

@kanzakikaoruuuu/yt-dl was last scanned on 27 Nov 2026 at version 0.2.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 2 versions, all published on 27 Nov 2026.
  • Findings: No rules fired in version 0.2.0.

Versions

2 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.2.0 LATEST 27 Nov 2026 No rules fired
0.1.0 27 Nov 2026 No rules fired

No rules fired in 0.2.0

Findings

Findings for v0.2.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.2.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

@kanzakikaoruuuu/yt-dl

Wrapper yt-dlp untuk Node.js (>= 18), mendukung ESM dan CommonJS. Binary yt-dlp diunduh otomatis dari GitHub Releases memakai fetch, jadi tidak perlu install manual.

Semua fitur ada di satu class: setCookies.

Install

npm i @kanzakikaoruuuu/yt-dl

Untuk menggabungkan video + audio (resolusi di atas 360p) dan konversi mp3, pasang juga ffmpeg.

Pakai

// ESM
import { setCookies } from "@kanzakikaoruuuu/yt-dl";

// CommonJS
const { setCookies } = require("@kanzakikaoruuuu/yt-dl");
const c = new setCookies({ file: "./cookies.txt" });

c.setHeaders({ "Accept-Language": "id-ID", Referer: "https://www.youtube.com/" }); // header HTTP (opsional)
await c.setHandler({ remoteComponents: false, jsRuntime: false });                 // opsi default (opsional)

const info = await c.metadata("https://youtu.be/xxxx");
const list = await c.resolutions("https://youtu.be/xxxx");          // resolusi yang tersedia

// download mengembalikan Buffer, bukan path file
const r = await c.download(url, { type: "mp4", quality: 1080 });    // 144 / 240 / 360 / 480 / 720 / 1080 / 1440 / 2160 / 4320 / "best"
r.buffer;    // Buffer
r.filename;  // "Judul Video.mp4"
r.mime;      // "video/mp4"
r.size;      // byte

await c.download(url, { type: "mp3" });
await c.ytmp4(url, { quality: "480p", h264: true });                 // H.264, paling kompatibel
await c.ytmp3(url, { bitrate: 192 });

await c.tikDown("https://vt.tiktok.com/xxxx/");
await c.igDown("https://www.instagram.com/reel/xxxx/", { download: true });

Contoh kirim ke WhatsApp / HTTP response / simpan sendiri:

const r = await c.ytmp3(url);
await conn.sendMessage(jid, { audio: r.buffer, mimetype: r.mime });   // langsung dari memori
res.type(r.mime).send(r.buffer);                                       // Express
fs.writeFileSync(r.filename, r.buffer);                                // simpan ke disk kalau perlu

Contoh lengkap: example.mjs (ESM) dan example.cjs (CommonJS).

Di CommonJS, await harus berada di dalam fungsi async (lihat example.cjs).

Cara ambil cookies (Firefox)

Cookies diperlukan untuk video dengan batas umur, video privat/member, dan kalau YouTube menampilkan "Sign in to confirm you're not a bot".

  1. Pasang addon. Buka Firefox, masuk ke Add-ons (about:addons) atau situs Firefox Add-ons, cari cookies.txt (varian local / Get cookies.txt LOCALLY, yang mengekspor di perangkat tanpa mengirim cookies ke server), lalu Add to Firefox.
  2. Izinkan di jendela privat. Di about:addons buka addon tadi, lalu pada Run in Private Windows pilih Allow.
  3. Buka Private Window (Ctrl+Shift+P), lalu buka youtube.com dan login ke akun YouTube kamu (belum punya akun? lihat bagian berikutnya).
  4. Di tab yang sama, buka https://www.youtube.com/robots.txt. Ini supaya YouTube tidak memutar ulang (rotate) cookies sesudah diekspor.
  5. Klik ikon addon, pilih Export (atau Copy) cookies untuk youtube.com dalam format Netscape.
  6. Simpan sebagai cookies.txt di folder project, atau tempel lewat kode:
    const c = new setCookies({ file: "./cookies.txt" });
    c.write(`# Netscape HTTP Cookie File ... (hasil salinan)`);

    Hasil export berupa JSON juga bisa: c.write(arrayCookieJson) akan diubah ke format Netscape otomatis.

  7. Tutup Private Window sekarang juga dan jangan buka sesi itu lagi di browser. Cookies sudah siap dipakai.

Kalau cookies cepat kedaluwarsa, ulangi langkah di atas dari awal.

Penting: cookies.txt sama saja dengan akses login akunmu, jadi jangan dibagikan dan jangan di-commit ke GitHub (sudah ada di .gitignore). Memakai cookies akun untuk unduhan otomatis bisa membuat akun dibatasi sementara atau permanen, jadi sebaiknya pakai akun cadangan.

Register / login akun YouTube

Buat akun baru (akun Google):

  1. Buka youtube.com lalu klik Sign in / Masuk.
  2. Pilih Create account / Buat akun → For my personal use / Untuk penggunaan pribadi.
  3. Isi nama, tanggal lahir, dan gender, lalu pilih alamat Gmail dan password.
  4. Ikuti verifikasi yang diminta Google (misalnya nomor telepon), lalu setujui ketentuan.

Login akun yang sudah ada:

  1. Buka youtube.com → Sign in / Masuk.
  2. Masukkan email dan password, lalu selesaikan verifikasi 2 langkah kalau aktif.
  3. Pastikan foto profil muncul di pojok kanan atas. Kalau sudah, lanjut ke langkah ambil cookies di atas.

Gunakan akun yang usianya terverifikasi supaya video dengan batas umur bisa diakses.

API

new setCookies({ file, base, content, output, domain, headers, handler })
Opsi Keterangan
file sumber cookies, lihat tabel di bawah. Default ./cookies.txt, null = tanpa cookies
base folder dasar untuk path relatif (default process.cwd())
content tulis ke file cookies saat dibuat
output simpan cookies dari memori ke path ini (default: file sementara yang dihapus otomatis)
domain domain untuk cookies bentuk a=b; c=d / object (default .youtube.com)
headers header HTTP default (sama seperti setHeaders)
handler opsi default awal (sama seperti setHandler)
Sumber cookies (file)
Sumber Contoh
path "./cookies.txt", path.join(__dirname, "cookies.txt"), "~/cookies.txt", folder (otomatis cookies.txt)
array segmen [process.cwd(), "data", "cookies.txt"]
URL file new URL("./cookies.txt", import.meta.url)
fs stream fs.createReadStream("cookies.txt")
fs Dirent fs.readdirSync(dir, { withFileTypes: true })[0]
fd fs.openSync("cookies.txt", "r")
Buffer fs.readFileSync("cookies.txt")
isi langsung teks Netscape, string JSON, header cookie "SID=...; HSID=..."
array / object array cookie JSON (export ekstensi), { cookies: [...] }, atau { SID: "..." }

Sumber async dipakai lewat await c.load(...): URL http(s), fs.promises.open(...) (FileHandle), stream apa pun, dan Promise seperti fs.promises.readFile("cookies.txt").

const c = new setCookies({ file: fs.readFileSync("./cookies.txt") });  // Buffer
await c.load("https://example.com/cookies.txt");                       // ambil lewat fetch
await c.load(fs.promises.readFile("./cookies.txt"));                   // Promise

Teks tanpa header # Netscape HTTP Cookie File ditambahi otomatis, dan cookies tanpa tanggal kedaluwarsa diberi masa berlaku 1 tahun supaya terbaca yt-dlp.

Method
Method Keterangan
.exists / .read() / .write(content, { append }) / .remove() operasi file cookies (fs)
await .load(source) ganti sumber cookies (URL, FileHandle, stream, Promise, atau semua yang diterima file)
.setHeaders(headers, { replace }) set header HTTP untuk semua request, bisa di-chain. Nilai null menghapus header
.getHeaders() / .clearHeaders() lihat / hapus semua header
await .setHandler(opts) set opsi default untuk semua method, hasilnya this
.getHandler() lihat opsi default saat ini
.metadata(url) judul, durasi, thumbnail, daftar format, dll
.resolutions(url) resolusi video yang tersedia
.download(url, opts) hasil Buffer. Opsi: type mp4 / mp3, quality, h264, bitrate, playlist, progress, progressStep, tmpDir
.ytmp3(url, opts) / .ytmp4(url, opts) pintasan download
.tikDown(url, { download }) link video/audio TikTok (+ headers). download: true menambah buffer, filename, mime, size
.igDown(url, { download }) link media Instagram (reel/carousel). download: true menambah downloads (array berisi buffer)
.search(query, { limit }) cari video YouTube
.playlist(url) daftar isi playlist
.raw(args) jalankan yt-dlp dengan argumen sendiri
.install() / .update() / .version() pasang binary, unduh ulang binary terbaru, lihat versi
Headers
c.setHeaders({ "User-Agent": "Mozilla/5.0 ...", "Accept-Language": "id-ID" });
c.setHeaders({ "Accept-Language": null });                  // hapus satu header
c.setHeaders({ Origin: "https://www.youtube.com" }, { replace: true }); // ganti semuanya
await c.metadata(url, { headers: { Referer: "https://m.youtube.com/" } }); // hanya untuk panggilan ini

Header diteruskan ke yt-dlp sebagai --add-headers. Nama header tidak peka huruf besar/kecil. Untuk login pakai cookies (jangan lewat header Cookie).

Download: Buffer, file sementara, dan progress
  • download() tidak mengembalikan path file. Hasilnya { buffer, size, mime, ext, filename, title, id, type, quality, items }.
  • Yt-dlp mengunduh ke folder sementara (os.tmpdir(), atau tmpDir), isinya dibaca jadi Buffer, lalu folder sementara dihapus otomatis, juga kalau terjadi error.
  • Selama unduhan, persen dicetak lewat console.log:
    [yt-dl] Download video: 5%
    [yt-dl] Download video: 10%
    ...
    [yt-dl] Download video: 100%
    [yt-dl] Download audio: 100%

    Video dan audio (di atas 360p) diunduh terpisah, jadi persennya muncul dua kali.

  • Atur lewat opsi: progress: false (matikan), progressStep: 10 (log tiap 10%), atau progress: (p) => ... untuk callback sendiri (p.percent, p.label, p.speed, p.eta, p.downloaded, p.total).
  • playlist: true (atau igDown carousel) mengisi items dengan banyak hasil, masing-masing punya buffer.
  • Buffer ada di RAM, jadi video yang sangat besar memakan memori sebesar filenya.
Opsi setHandler (atau per panggilan, yang per panggilan menang)
Opsi Keterangan
remoteComponents false matikan, atau string (default "ejs:github")
jsRuntime false matikan, atau "node" / "deno" / "bun" (default "node")
ffmpeg, proxy, userAgent, limitRate, retries diteruskan ke yt-dlp
headers sama seperti setHeaders
flags { "geo-bypass": true, "sleep-interval": 2 } menjadi --geo-bypass --sleep-interval 2
args argumen mentah tambahan, mis. ["--no-check-certificates"]
type, quality, h264, bitrate, progress, progressStep, tmpDir default untuk download
ytdlp path binary yt-dlp kustom (atau env YTDLP_PATH)
install: true unduh binary yt-dlp sekarang

Catatan

  • Kalau resolusi yang diminta tidak tersedia, dipakai resolusi terdekat di bawahnya.
  • Instagram biasanya butuh cookies login. Postingan foto saja tidak didukung yt-dlp.
  • Di Termux/Android binary yang diunduh berupa script Python (butuh python3).
  • Gunakan sesuai aturan platform dan hak cipta.

Lisensi

MIT

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @kanzakikaoruuuu/yt-dl

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Copy of Template Design OX Blog (3)
Research

Ruby2Shell: Ruby Memory Corruption Flaws Expose Applications to Remote Code Execution, But is it an Actual Risk?

PolinRider Returns
Research

PolinRider Returns: Hijacked npm Packages Use Ethereum Blockchain to Conceal Malware Infrastructure

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

Frame 2085668439 (1)
Group 1261154229