Compare commits
4 Commits
86ba3a1a76
...
master
Author | SHA1 | Date | |
---|---|---|---|
221d963975 | |||
cea900b8e3
|
|||
4dcf1fcfd5
|
|||
5a3e23de49
|
@ -17,7 +17,7 @@ const VERSION = '1.1'; // Script version
|
||||
const DBVERSION = 8; // Database layout version
|
||||
const REQUIRE_APPROVAL = false; // require admin approval of new sites? true/false
|
||||
const CANONICAL_URL = 'https://onions.danwin1210.de'; // our preferred domain for search engines
|
||||
const CAPTCHA = 0; // Captcha difficulty (0=off, 1=simple, 2=moderate, 3=extreme)
|
||||
const CAPTCHA = 0; // Captcha difficulty (0=off, 1=simple, 2=moderate, 3=hard, 4=extreme)
|
||||
// Language selection
|
||||
const LANGUAGES = [
|
||||
'cs' => ['name' => 'čeština', 'locale' => 'cs_CZ', 'flag' => '🇨🇿', 'show_in_menu' => true, 'dir' => 'ltr'],
|
||||
@ -26,6 +26,7 @@ const LANGUAGES = [
|
||||
'fa' => ['name' => 'فارسی', 'locale' => 'fa_IR', 'flag' => '🇮🇷', 'show_in_menu' => true, 'dir' => 'rtl'],
|
||||
'fr' => ['name' => 'Français', 'locale' => 'fr_FR', 'flag' => '🇫🇷', 'show_in_menu' => true, 'dir' => 'ltr'],
|
||||
'ja' => ['name' => '日本語', 'locale' => 'ja_JP', 'flag' => '🇯🇵', 'show_in_menu' => true, 'dir' => 'ltr'],
|
||||
'nl' => ['name' => 'Nederlands', 'locale' => 'nl_NL', 'flag' => '🇳🇱', 'show_in_menu' => true, 'dir' => 'ltr'],
|
||||
'pl' => ['name' => 'Polski', 'locale' => 'pl_PL', 'flag' => '🇵🇱', 'show_in_menu' => true, 'dir' => 'ltr'],
|
||||
'pt' => ['name' => 'Português', 'locale' => 'pt_PT', 'flag' => '🇵🇹', 'show_in_menu' => true, 'dir' => 'ltr'],
|
||||
'ru' => ['name' => 'Русский', 'locale' => 'ru_RU', 'flag' => '🇷🇺', 'show_in_menu' => true, 'dir' => 'ltr'],
|
||||
|
@ -24,7 +24,7 @@ function check(string $link, string $phishing_link): void
|
||||
if(!empty($links) && !empty($phishing_links)){
|
||||
$phishings=$db->prepare('INSERT IGNORE INTO ' . PREFIX . 'phishing (onion_id, original) VALUES ((SELECT id FROM onions WHERE md5sum=?), ?);');
|
||||
$select=$db->prepare('SELECT id FROM ' . PREFIX . 'onions WHERE md5sum=?;');
|
||||
$insert=$db->prepare('INSERT INTO ' . PREFIX . 'onions (address, md5sum, timeadded, timechanged) VALUES (?, ?, ?, ?);');
|
||||
$insert=$db->prepare('INSERT INTO ' . PREFIX . 'onions (address, md5sum, timeadded, timechanged, description) VALUES (?, ?, ?, ?, "");');
|
||||
$update=$db->prepare('UPDATE ' . PREFIX . 'onions SET locked=1, timechanged=? WHERE md5sum=?;');
|
||||
preg_match_all('~(https?://)?([a-z0-9]*\.)?([a-z2-7]{55}d).onion(/[^\s><"]*)?~i', $links, $addr);
|
||||
preg_match_all('~(https?://)?([a-z0-9]*\.)?([a-z2-7]{55}d).onion(/[^\s><"]*)?~i', $phishing_links, $phishing_addr);
|
||||
|
@ -90,7 +90,7 @@ function add_onions(&$onions, $db): void
|
||||
}
|
||||
}
|
||||
$time=time();
|
||||
$insert=$db->prepare('INSERT INTO ' . PREFIX . 'onions (address, md5sum, timeadded, timechanged) VALUES (?, ?, ?, ?);');
|
||||
$insert=$db->prepare('INSERT INTO ' . PREFIX . 'onions (address, md5sum, timeadded, timechanged, description) VALUES (?, ?, ?, ?, "");');
|
||||
$db->beginTransaction();
|
||||
foreach($onions as $md5=>$addr){
|
||||
$insert->execute([$addr, $md5, $time, $time]);
|
||||
|
Binary file not shown.
@ -6,17 +6,18 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Report-Msgid-Bugs-To: daniel@danwin1210.de\n"
|
||||
"POT-Creation-Date: 2023-01-26 21:02+0100\n"
|
||||
"PO-Revision-Date: 2023-01-01 17:57+0100\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"PO-Revision-Date: 2024-11-06 01:48+0000\n"
|
||||
"Last-Translator: Akira <kawaiisenpai@waifu.club>\n"
|
||||
"Language-Team: Japanese <https://weblate.danwin1210.de/projects/DanWin/"
|
||||
"onion-link-list/ja/>\n"
|
||||
"Language: ja_JP\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Generator: Poedit 3.1.1\n"
|
||||
"X-Generator: Weblate 5.8.2\n"
|
||||
|
||||
#: www/index.php:37
|
||||
msgid "All legitimate"
|
||||
@ -207,7 +208,7 @@ msgstr "追加された日"
|
||||
|
||||
#: www/index.php:349
|
||||
msgid "Actions"
|
||||
msgstr "操作"
|
||||
msgstr "アクション"
|
||||
|
||||
#: www/index.php:361 www/index.php:379 www/index.php:418
|
||||
msgid "Never"
|
||||
@ -235,7 +236,7 @@ msgstr "ページ:"
|
||||
|
||||
#: www/index.php:516
|
||||
msgid "Copy:"
|
||||
msgstr ""
|
||||
msgstr "コピー:"
|
||||
|
||||
#: www/index.php:523 www/index.php:538 www/index.php:590
|
||||
msgid "captcha image"
|
||||
@ -293,7 +294,7 @@ msgstr "ログイン"
|
||||
|
||||
#: www/admin.php:39
|
||||
msgid "Wrong Password!"
|
||||
msgstr "パスワードが違います!"
|
||||
msgstr "パスワードが間違っています!"
|
||||
|
||||
#: www/admin.php:55 www/admin.php:211
|
||||
msgid "Remove"
|
||||
|
@ -536,6 +536,45 @@ function send_captcha(): void
|
||||
imagesetpixel($im, mt_rand(0, 55), mt_rand(0, 24), $dots);
|
||||
}
|
||||
echo ' <img width="55" height="24" alt="'._('captcha image').'" src="data:image/gif;base64,';
|
||||
}elseif(CAPTCHA === 3){
|
||||
$im = imagecreatetruecolor(55, 24);
|
||||
$bg = imagecolorallocatealpha($im, 0, 0, 0, 127);
|
||||
$fg = imagecolorallocate($im, 255, 255, 255);
|
||||
$cc = imagecolorallocate($im, 200, 200, 200);
|
||||
$cb = imagecolorallocatealpha($im, 0, 0, 0, 127);
|
||||
imagefill($im, 0, 0, $bg);
|
||||
$line = imagecolorallocate($im, 255, 255, 255);
|
||||
$deg = (mt_rand(0,1)*2-1)*mt_rand(10, 20);
|
||||
|
||||
$background = imagecreatetruecolor(120, 80);
|
||||
imagefill($background, 0, 0, $cb);
|
||||
|
||||
for ($i=0; $i<20; ++$i) {
|
||||
$char = imagecreatetruecolor(12, 16);
|
||||
imagestring($char, 5, 2, 2, $captchachars[mt_rand(0, $length)], $cc);
|
||||
$char = imagerotate($char, (mt_rand(0,1)*2-1)*mt_rand(10, 20), $cb);
|
||||
$char = imagescale($char, 24, 32);
|
||||
imagefilter($char, IMG_FILTER_SMOOTH, 0.6);
|
||||
imagecopy($background, $char, rand(0, 100), rand(0, 60), 0, 0, 24, 32);
|
||||
}
|
||||
|
||||
imagestring($im, 5, 5, 5, $code, $fg);
|
||||
$im = imagescale($im, 110, 48);
|
||||
imagefilter($im, IMG_FILTER_SMOOTH, 0.5);
|
||||
imagefilter($im, IMG_FILTER_GAUSSIAN_BLUR);
|
||||
$im = imagerotate($im, $deg, $bg);
|
||||
$im = imagecrop($im, array('x'=>0, 'y'=>0, 'width'=>120, 'height'=>80));
|
||||
imagecopy($background, $im, 0, 0, 0, 0, 110, 80);
|
||||
imagedestroy($im);
|
||||
$im = $background;
|
||||
|
||||
for($i=0; $i<1000; ++$i){
|
||||
$c = mt_rand(100,230);
|
||||
$dots = imagecolorallocate($im, $c, $c, $c);
|
||||
imagesetpixel($im, mt_rand(0, 120), mt_rand(0, 80), $dots);
|
||||
}
|
||||
imagedestroy($char);
|
||||
echo '<img width="120" height="80" src="data:image/png;base64,';
|
||||
}else{
|
||||
$im = imagecreatetruecolor(150, 200);
|
||||
$bg = imagecolorallocate($im, 0, 0, 0);
|
||||
|
@ -78,7 +78,7 @@ if(!empty($_REQUEST['addr'])){
|
||||
$stmt=$db->prepare('SELECT null FROM ' . PREFIX . 'onions WHERE md5sum=?;');
|
||||
$stmt->execute([$md5]);
|
||||
if(!$stmt->fetch(PDO::FETCH_NUM)){
|
||||
$db->prepare('INSERT INTO ' . PREFIX . 'onions (address, md5sum, timeadded) VALUES (?, ?, ?);')->execute([$addr, $md5, time()]);
|
||||
$db->prepare('INSERT INTO ' . PREFIX . 'onions (address, md5sum, timeadded, description) VALUES (?, ?, ?, "");')->execute([$addr, $md5, time()]);
|
||||
}
|
||||
$db->prepare('UPDATE ' . PREFIX . 'onions SET lasttest=?, lastup=lasttest, timediff=0 WHERE md5sum=?;')->execute([time(), $md5]);
|
||||
if(preg_match('~window\.location\.replace\("http://'.$addr.'.onion/(.*?)"\)~', $content, $matches)){
|
||||
|
Reference in New Issue
Block a user