maiquocthinh / Terabox-DL

A web tool to get direct download link of Terabox
https://terabox-dl.qtcloud.workers.dev/
128 stars 119 forks source link

Update getDownload.ts #5

Closed SH20RAJ closed 1 year ago

SH20RAJ commented 1 year ago

the previous website is not working

maiquocthinh commented 1 year ago

the previous website is not working

Hey, @SH20RAJ What link type not working?

SH20RAJ commented 1 year ago

the previous website is not working

Hey, @SH20RAJ What link type not working?

terabox.com isn't working 8n India

maiquocthinh commented 1 year ago

terabox.com isn't working 8n India

I checked with vpn and everything is fine.

maiquocthinh commented 1 year ago

@SH20RAJ can you send me the link where you got the error?

SH20RAJ commented 1 year ago

@SH20RAJ can you send me the link where you got the error?

gyguiguyugf6

also your api https://terabox-dl.qtcloud.workers.dev/api/get-download has cross origin issue allow it or inspite you can create an api from users will be able to send request with id and get all the details {name,size,downloadurl and manymore } in json format

maiquocthinh commented 1 year ago

gyguiguyugf6

also your api https://terabox-dl.qtcloud.workers.dev/api/get-download has cross origin issue allow it or inspite you can create an api from users will be able to send request with id and get all the details {name,size,downloadurl and manymore } in json format

The getlink download is run on the backend (cloudflare). So terabox not working in your country does not create a problem. And if the direct download link does not work in your country, it is obvious that you cannot download it.

SH20RAJ commented 1 year ago

No, It's not obvious, we can download it easily even if terabox is banned , we just need an api for this like my api will get the video in chunks and store it my websites server like its in USA so the video can be downloaded and terabox isnt banned in india it works but with differeent url like https://www.1024tera.com/sharing/link?surl=SrQl0DOxXkdaKDpyHV5EdQ or https://momerybox.com/s/1SrQl0DOxXkdaKDpyHV5EdQ

so you just create or provideo mne an api as in previus mentioned so i will access the download link directly and provide a tunnell through which even if the direct link is banned in india ui will provide my serers for indian users...

i created an script by using your website

<?php

if(isset($_GET['pass'])){
  $pass= $_GET['pass'];
} else {
  $pass= "";

}

// URL for the GET request
$url = "https://terabox-dl.qtcloud.workers.dev/api/get-info?shorturl=1".$_GET['id']."&pwd=".$pass;

// Make the GET request and get the JSON response
$response = file_get_contents($url);

// Check if the response is not empty
if (!empty($response)) {
    // Decode the JSON response into an associative array
    $responseData = json_decode($response, true);

    // Set the Content-Type header to JSON
    //header('Content-Type: application/json');

    // Output the JSON response
    //echo json_encode($responseData);
} else {
    echo "Error: No response received.";
}
// API endpoint URL
$url = "https://terabox-dl.qtcloud.workers.dev/api/get-download";

// POST data
$data = array(
    "shareid" => $responseData['shareid'],
    "uk" => $responseData['uk'],
    "sign" => $responseData['sign'],
    "timestamp" => $responseData['timestamp'],
    "fs_id" => $responseData['list'][0]['fs_id']
);

// Initialize cURL session
$ch = curl_init($url);

// Set cURL options for POST request
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'Content-Type: application/json'
));

// Execute cURL session
$response = curl_exec($ch);

// Check for cURL errors
if (curl_errno($ch)) {
    echo 'Error: ' . curl_error($ch);
}

// Close cURL session
curl_close($ch);

// Handle the response
if (!empty($response)) {
    $responseData = json_decode($response, true);
   // print_r($responseData);
  // Convert the PHP array to a JSON string
$jsonString = json_encode($responseData, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);

// Output the JSON string
echo $jsonString;
} else {
    echo "Error: No response received.";
}

See Demo Here :- https://sopdrive.sh20raj.repl.co/terabox.php?id=117NfiRSK_e4ImEEDqQGh_g

But it's generating wrong link :- like

{"ok":true,"downloadLink":"https://data.terabox.com/file/cdf66c90b3a51a39395287f7ff005746?bkt=en-06f5c65000af0ed6018956b2f222065a809160ea8768c5ca5cd3e4ed237ac47d4ca6f9a72e9c8a92&fid=4399332906414-250528-970904863198325&time=1690633530&sign=FDTAXUGERQlBHSKfWa-DCb740ccc5511e5e8fedcff06b081203-FSGFWtI%2F7rMNvXaOPIhYM%2F3gu9Q%3D&signbak=&to=140&size=1494581198&sta_dx=1494581198&sta_cs=9&sta_ft=mp4&sta_ct=6&sta_mt=6&fm2=MH%2Cdefault_region%2CAnywhere%2C%2C%2Cany®ion=default_region&ctime=1671720540&mtime=1671720543&resv0=-1&resv1=0&resv2=rlim&resv3=5&resv4=1494581198&vuk=4402336688533&iv=2&htype=&randtype=&newver=1&newfm=1&secfm=1&flow_ver=3&pkey=en-d4828e771b4c76208289f89eba1422a7e67c015eec88c93b550e1fe709a28128951a414edf3a4367&expires=1690662330&rt=sh&r=235733749&sh=1&vbdid=-&fin=Ng%C6%B0%E1%BB%9Di+Ph%E1%BB%A5+N%E1%BB%AF+H%E1%BA%AFc+%C3%81m+2+Thi%C3%AAn+S%E1%BB%A9+T%E1%BB%AD+Th%E1%BA%A7n+%282019%29.mp4&rtype=1&dp-logid=255352124187290417&dp-callid=0.1&hps=1&tsl=0&csl=0&fsl=-1&csign=Qd%2BPN9wnKVnoY6jABiQQM2ucwek%3D&so=0&ut=1&uter=0&serv=1&uc=0&ti=14a3010384c1ca3c241af22d06dcb04799a0294d35f93a5d305a5e1275657320&adg=&reqlabel=250528_f_4e43f5db8c9f79d7484707e0908263d5_-1_a95c5a58f28c5bf633061c7590ed4816&ccn=IN&by=themis"}

it reurns https://data.terabox.com/file/cdf66c90b3a51a39395287f7ff005746?bkt=en-06f5c65000af0ed6018956b2f222065a809160ea8768c5ca5cd3e4ed237ac47d4ca6f9a72e9c8a92&fid=4399332906414-250528-970904863198325&time=1690633530&sign=FDTAXUGERQlBHSKfWa-DCb740ccc5511e5e8fedcff06b081203-FSGFWtI%2F7rMNvXaOPIhYM%2F3gu9Q%3D&signbak=&to=140&size=1494581198&sta_dx=1494581198&sta_cs=9&sta_ft=mp4&sta_ct=6&sta_mt=6&fm2=MH%2Cdefault_region%2CAnywhere%2C%2C%2Cany®ion=default_region&ctime=1671720540&mtime=1671720543&resv0=-1&resv1=0&resv2=rlim&resv3=5&resv4=1494581198&vuk=4402336688533&iv=2&htype=&randtype=&newver=1&newfm=1&secfm=1&flow_ver=3&pkey=en-d4828e771b4c76208289f89eba1422a7e67c015eec88c93b550e1fe709a28128951a414edf3a4367&expires=1690662330&rt=sh&r=235733749&sh=1&vbdid=-&fin=Ng%C6%B0%E1%BB%9Di+Ph%E1%BB%A5+N%E1%BB%AF+H%E1%BA%AFc+%C3%81m+2+Thi%C3%AAn+S%E1%BB%A9+T%E1%BB%AD+Th%E1%BA%A7n+%282019%29.mp4&rtype=1&dp-logid=255352124187290417&dp-callid=0.1&hps=1&tsl=0&csl=0&fsl=-1&csign=Qd%2BPN9wnKVnoY6jABiQQM2ucwek%3D&so=0&ut=1&uter=0&serv=1&uc=0&ti=14a3010384c1ca3c241af22d06dcb04799a0294d35f93a5d305a5e1275657320&adg=&reqlabel=250528_f_4e43f5db8c9f79d7484707e0908263d5_-1_a95c5a58f28c5bf633061c7590ed4816&ccn=IN&by=themis

But I wants this URL that is generated by you https://d0.terabox.com/file/cdf66c90b3a51a39395287f7ff005746?bkt=en-06f5c65000af0ed6018956b2f222065a809160ea8768c5ca5cd3e4ed237ac47d4ca6f9a72e9c8a92&xcode=44b3409debb950fb3acabf8a8a7120cdc23cc37444d150842de83edf4ef05cc9bf7ea4e1cbf0b9d40bb664e1c96eab04&fid=4399332906414-250528-970904863198325&time=1690634105&sign=FDTAXUGERQlBHSKfa-DCb740ccc5511e5e8fedcff06b081203-Cnowtk%2Fc26CRyrgA1Z%2BDkJ3UtEU%3D&signbak=Cnowtk%2Fc26CRyrgA1Z%2BDkJ3UtEU%3D&to=d0&size=1494581198&sta_dx=1494581198&sta_cs=9&sta_ft=mp4&sta_ct=6&sta_mt=6&fm2=MH%2Cdefault_region%2CAnywhere%2C%2C%2Cany&region=default_region&ctime=1671720540&mtime=1671720543&resv0=-1&resv1=0&resv2=rlim&resv3=5&resv4=1494581198&vuk=4402336688533&iv=2&htype=&randtype=&newver=1&newfm=1&secfm=1&flow_ver=3&pkey=en-d4828e771b4c76208289f89eba1422a7e67c015eec88c93b550e1fe709a28128951a414edf3a4367&expires=1690662905&rt=sh&r=470342149&sh=1&vbdid=-&fin=Ng%C6%B0%E1%BB%9Di+Ph%E1%BB%A5+N%E1%BB%AF+H%E1%BA%AFc+%C3%81m+2+Thi%C3%AAn+S%E1%BB%A9+T%E1%BB%AD+Th%E1%BA%A7n+%282019%29.mp4&fn=Ng%C6%B0%E1%BB%9Di+Ph%E1%BB%A5+N%E1%BB%AF+H%E1%BA%AFc+%C3%81m+2+Thi%C3%AAn+S%E1%BB%A9+T%E1%BB%AD+Th%E1%BA%A7n+%282019%29.mp4&rtype=1&dp-logid=255506693432926402&dp-callid=0.1&hps=1&tsl=0&csl=0&fsl=-1&csign=Qd%2BPN9wnKVnoY6jABiQQM2ucwek%3D&so=0&ut=1&uter=4&serv=1&uc=567403056&ti=14a3010384c1ca3c49bf91797a39fc1b6548b775ee14b6ae305a5e1275657320&adg=&reqlabel=250528_f_6b79d95af0ab25ebc24d34973007c2b7_-1_058d47b477e4690db1ced8cc47388f3f&ccn=US&by=themis&Expires=1690662905&Signature=JuaNt~ikTsthK4ExgKIn9cp~Tj4uAhdFZCWpzWNOcjQy-Oc1q2CDGPR4NBHVeEBJFZdSGIbqcDOQDfPwhrYt8kSYYVx1NBHz9-NDYiUlyjyTYHG9Q2m7fnQ7o0qzCauMID3vPRWMrk0gBSuPrw6jyFY7dWlIkSb8FcizbDQfk19zlFi2dnZyLNohbPiRy5sA9xvxMSjLlHuax1Bgj-VT~yMaOYlUIOfMivuYMnrxKAbYk9PNnzhKn~LB72F-ejpU4vJM3HTV~XTVkuTUM2VblOQ7L8dY0NEAFuW4UM0JIkaMqqZN626rUNe7mLIGnuUCEgoFEddwwBGQhNtnw2jdbw__&Key-Pair-Id=K2UF6UUQLSZ84 It's not like what I'm getting from https://terabox-dl.qtcloud.workers.dev/

Contact Me :- t.me/sh20raj

maiquocthinh commented 1 year ago

@SH20RAJ, There are 2 things I need to say: First: each direct download link will only work for a different user-agent, so getting the download link at the server and then returning it to the end user (like in your code above) won't work. Second: the type of download link you want can only be obtained if you have a vip account and I don't want to maintain this getlink service with my account.