rhilip / bencode Goto Github PK
View Code? Open in Web Editor NEWA pure and simple PHP library for encoding and decoding Bencode data, with torrent file parse and vaildate.
License: MIT License
A pure and simple PHP library for encoding and decoding Bencode data, with torrent file parse and vaildate.
License: MIT License
It could be useful to have build-in method for uploaded files validation
true === \Rhilip\Bencode\TorrentFile::isValid($filepath);
Because getting an exception with 500 code on load PNG file (as example of wrong file type)
$torrent = \Rhilip\Bencode\TorrentFile::load($filepath);
Invalid integer format or integer overflow: �PNG
For right now, I'm using external construction like this
public function isValid(
string $filepath
): bool
{
try
{
\Rhilip\Bencode\TorrentFile::load(
$filepath
);
}
catch (\Rhilip\Bencode\ParseException $error)
{
return false;
}
return true;
}
p.s. thanks for your work!
Not sure that's library bug (may be just qBittorrent client issue)
when I create torrent file using 2 version format, get following exception:
Uncaught PHP Exception Rhilip\Bencode\ParseException: "Checking Dictionary missing key: piece layers"
to reproduce this issue, please generate v2 or hybrid torrent file using qBittorrent or any other client with v2 support.
Line 504 in d646aa8
magnet:?xt=urn:btmh:<tagged-info-hash>&dn=<name>&tr=<tracker-url>
If input is "ddd" or let's say "li", it will create infinite cpu & memory intensive loop.
Dependabot can't resolve your PHP dependency files.
As a result, Dependabot couldn't update your dependencies.
The error Dependabot encountered was:
error: failed to write new configuration file /home/dependabot/.gitconfig.lock
If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.
I've found, that files list randomized in the TorrentFile::getFileTree
method result.
Would be useful to add build-in sort ordering ASC by default
Thanks
upd.
Just added PR
Hello, how could we extract from key "pieces root" hashes of files to show them in our web page.
Would be grateful for your help, we are trying to give our users ability to search by file hashes.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.