-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/hduisa/hctf2015-all-problems
- Loading branch information
Showing
575 changed files
with
105,308 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
open_basedir=/home/wwwroot/admin.hack123.pw:/tmp/:/proc/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
you are not admin. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<IfModule mod_rewrite.c> | ||
RewriteEngine On | ||
RewriteBase / | ||
RewriteCond %{REQUEST_FILENAME} !-f | ||
RewriteCond %{REQUEST_FILENAME} !-d | ||
RewriteRule ^(.*)$ /index.php/$1 [L] | ||
</IfModule> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
open_basedir=/home/wwwroot/kirie.hack123.pw:/tmp/:/proc/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
include 'common.php'; | ||
include 'header.php'; | ||
include 'menu.php'; | ||
?> | ||
|
||
<div class="main"> | ||
<div class="body container"> | ||
<?php include 'page-title.php'; ?> | ||
<div class="row typecho-page-main" role="form"> | ||
<div class="col-mb-12 col-tb-6 col-tb-offset-3"> | ||
<?php Typecho_Widget::widget('Widget_Metas_Category_Edit')->form()->render(); ?> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<?php | ||
include 'copyright.php'; | ||
include 'common-js.php'; | ||
include 'form-js.php'; | ||
include 'footer.php'; | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
<?php if(!defined('__TYPECHO_ADMIN__')) exit; ?> | ||
<script src="<?php $options->adminStaticUrl('js', 'jquery.js?v=' . $suffixVersion); ?>"></script> | ||
<script src="<?php $options->adminStaticUrl('js', 'jquery-ui.js?v=' . $suffixVersion); ?>"></script> | ||
<script src="<?php $options->adminStaticUrl('js', 'typecho.js?v=' . $suffixVersion); ?>"></script> | ||
<script> | ||
(function () { | ||
$(document).ready(function() { | ||
// 处理消息机制 | ||
(function () { | ||
var prefix = '<?php echo Typecho_Cookie::getPrefix(); ?>', | ||
cookies = { | ||
notice : $.cookie(prefix + '__typecho_notice'), | ||
noticeType : $.cookie(prefix + '__typecho_notice_type'), | ||
highlight : $.cookie(prefix + '__typecho_notice_highlight') | ||
}, | ||
path = '<?php echo Typecho_Cookie::getPath(); ?>'; | ||
|
||
if (!!cookies.notice && 'success|notice|error'.indexOf(cookies.noticeType) >= 0) { | ||
var head = $('.typecho-head-nav'), | ||
p = $('<div class="message popup ' + cookies.noticeType + '">' | ||
+ '<ul><li>' + $.parseJSON(cookies.notice).join('</li><li>') | ||
+ '</li></ul></div>'), offset = 0; | ||
|
||
if (head.length > 0) { | ||
p.insertAfter(head); | ||
offset = head.outerHeight(); | ||
} else { | ||
p.prependTo(document.body); | ||
} | ||
|
||
function checkScroll () { | ||
if ($(window).scrollTop() >= offset) { | ||
p.css({ | ||
'position' : 'fixed', | ||
'top' : 0 | ||
}); | ||
} else { | ||
p.css({ | ||
'position' : 'absolute', | ||
'top' : offset | ||
}); | ||
} | ||
} | ||
|
||
$(window).scroll(function () { | ||
checkScroll(); | ||
}); | ||
|
||
checkScroll(); | ||
|
||
p.slideDown(function () { | ||
var t = $(this), color = '#C6D880'; | ||
|
||
if (t.hasClass('error')) { | ||
color = '#FBC2C4'; | ||
} else if (t.hasClass('notice')) { | ||
color = '#FFD324'; | ||
} | ||
|
||
t.effect('highlight', {color : color}) | ||
.delay(5000).slideUp(function () { | ||
$(this).remove(); | ||
}); | ||
}); | ||
|
||
|
||
$.cookie(prefix + '__typecho_notice', null, {path : path}); | ||
$.cookie(prefix + '__typecho_notice_type', null, {path : path}); | ||
} | ||
|
||
if (cookies.highlight) { | ||
$('#' + cookies.highlight).effect('highlight', 1000); | ||
$.cookie(prefix + '__typecho_notice_highlight', null, {path : path}); | ||
} | ||
})(); | ||
|
||
|
||
// 导航菜单 tab 聚焦时展开下拉菜单 | ||
(function () { | ||
$('#typecho-nav-list').find('.parent a').focus(function() { | ||
$('#typecho-nav-list').find('.child').hide(); | ||
$(this).parents('.root').find('.child').show(); | ||
}); | ||
$('.operate').find('a').focus(function() { | ||
$('#typecho-nav-list').find('.child').hide(); | ||
}); | ||
})(); | ||
|
||
|
||
if ($('.typecho-login').length == 0) { | ||
$('a').each(function () { | ||
var t = $(this), href = t.attr('href'); | ||
|
||
if ((href && href[0] == '#') | ||
|| /^<?php echo preg_quote($options->adminUrl, '/'); ?>.*$/.exec(href) | ||
|| /^<?php echo substr(preg_quote(Typecho_Common::url('s', $options->index), '/'), 0, -1); ?>action\/[_a-zA-Z0-9\/]+.*$/.exec(href)) { | ||
return; | ||
} | ||
|
||
t.attr('target', '_blank'); | ||
}); | ||
} | ||
}); | ||
})(); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?php | ||
if (!defined('__DIR__')) { | ||
define('__DIR__', dirname(__FILE__)); | ||
} | ||
|
||
define('__TYPECHO_ADMIN__', true); | ||
|
||
/** 载入配置文件 */ | ||
if (!defined('__TYPECHO_ROOT_DIR__') && !@include_once __DIR__ . '/../config.inc.php') { | ||
file_exists(__DIR__ . '/../install.php') ? header('Location: ../install.php') : print('Missing Config File'); | ||
exit; | ||
} | ||
|
||
/** 初始化组件 */ | ||
Typecho_Widget::widget('Widget_Init'); | ||
|
||
/** 注册一个初始化插件 */ | ||
Typecho_Plugin::factory('admin/common.php')->begin(); | ||
|
||
Typecho_Widget::widget('Widget_Options')->to($options); | ||
Typecho_Widget::widget('Widget_User')->to($user); | ||
Typecho_Widget::widget('Widget_Security')->to($security); | ||
Typecho_Widget::widget('Widget_Menu')->to($menu); | ||
|
||
/** 初始化上下文 */ | ||
$request = $options->request; | ||
$response = $options->response; | ||
|
||
/** 检测是否是第一次登录 */ | ||
$currentMenu = $menu->getCurrentMenu(); | ||
list($prefixVersion, $suffixVersion) = explode('/', $options->version); | ||
$params = parse_url($currentMenu[2]); | ||
$adminFile = basename($params['path']); | ||
|
||
if (!$user->logged && !Typecho_Cookie::get('__typecho_first_run') && !empty($currentMenu)) { | ||
|
||
if ('welcome.php' != $adminFile) { | ||
$response->redirect(Typecho_Common::url('welcome.php', $options->adminUrl)); | ||
} else { | ||
Typecho_Cookie::set('__typecho_first_run', 1); | ||
} | ||
|
||
} else { | ||
|
||
/** 检测版本是否升级 */ | ||
if ($user->pass('administrator', true) && !empty($currentMenu)) { | ||
$mustUpgrade = (!defined('Typecho_Common::VERSION') || version_compare(str_replace('/', '.', Typecho_Common::VERSION), | ||
str_replace('/', '.', $options->version), '>')); | ||
|
||
if ($mustUpgrade && 'upgrade.php' != $adminFile) { | ||
$response->redirect(Typecho_Common::url('upgrade.php', $options->adminUrl)); | ||
} else if (!$mustUpgrade && 'upgrade.php' == $adminFile) { | ||
$response->redirect($options->adminUrl); | ||
} else if (!$mustUpgrade && 'welcome.php' == $adminFile && $user->logged) { | ||
$response->redirect($options->adminUrl); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php if(!defined('__TYPECHO_ADMIN__')) exit; ?> | ||
<div class="typecho-foot" role="contentinfo"> | ||
<div class="copyright"> | ||
<a href="http://typecho.org" class="i-logo-s">Typecho</a> | ||
<p><?php _e('由 <a href="http://typecho.org">%s</a> 强力驱动, 版本 %s (%s)', $options->software, $prefixVersion, $suffixVersion); ?></p> | ||
</div> | ||
<nav class="resource"> | ||
<a href="http://docs.typecho.org"><?php _e('帮助文档'); ?></a> • | ||
<a href="http://forum.typecho.org"><?php _e('支持论坛'); ?></a> • | ||
<a href="https://github.com/typecho/typecho/issues"><?php _e('报告错误'); ?></a> • | ||
<a href="http://extends.typecho.org"><?php _e('资源下载'); ?></a> | ||
</nav> | ||
</div> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php if(!defined('__TYPECHO_ADMIN__')) exit; ?> | ||
<script> | ||
$(document).ready(function () { | ||
// 自定义字段 | ||
$('#custom-field-expand').click(function() { | ||
var btn = $('i', this); | ||
if (btn.hasClass('i-caret-right')) { | ||
btn.removeClass('i-caret-right').addClass('i-caret-down'); | ||
} else { | ||
btn.removeClass('i-caret-down').addClass('i-caret-right'); | ||
} | ||
$(this).parent().toggleClass('fold'); | ||
return false; | ||
}); | ||
|
||
function attachDeleteEvent (el) { | ||
$('button.btn-xs', el).click(function () { | ||
if (confirm('<?php _e('确认要删除此字段吗?'); ?>')) { | ||
$(this).parents('tr').fadeOut(function () { | ||
$(this).remove(); | ||
}); | ||
} | ||
}); | ||
} | ||
|
||
$('#custom-field table tbody tr').each(function () { | ||
attachDeleteEvent(this); | ||
}); | ||
|
||
$('#custom-field button.operate-add').click(function () { | ||
var html = '<tr><td><input type="text" name="fieldNames[]" placeholder="<?php _e('字段名称'); ?>" class="text-s w-100"></td>' | ||
+ '<td><select name="fieldTypes[]" id="">' | ||
+ '<option value="str"><?php _e('字符'); ?></option>' | ||
+ '<option value="int"><?php _e('整数'); ?></option>' | ||
+ '<option value="float"><?php _e('小数'); ?></option>' | ||
+ '</select></td>' | ||
+ '<td><textarea name="fieldValues[]" placeholder="<?php _e('字段值'); ?>" class="text-s w-100" rows="2"></textarea></td>' | ||
+ '<td><button type="button" class="btn btn-xs"><?php _e('删除'); ?></button></td></tr>', | ||
el = $(html).hide().appendTo('#custom-field table tbody').fadeIn(); | ||
|
||
attachDeleteEvent(el); | ||
}); | ||
}); | ||
</script> |
Oops, something went wrong.