<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    escout

    代碼、心情

    常用鏈接

    統(tǒng)計(jì)

    SOA相關(guān)

    我參與的團(tuán)隊(duì)

    最新評(píng)論

    一步一步破解JIRA3.6

    一步一步破解 JIRA3.6

    上周在springside上看到j(luò)ira這個(gè)團(tuán)隊(duì)軟件,下載下來(lái)試用了一番,覺(jué)得挺好用得,正好前一段看到了jad這個(gè)反編譯軟件,就想試手一下自己破解這個(gè)jira。下面詳細(xì)敘述了破解的過(guò)程,因?yàn)椴惶煜み@個(gè)破解,只是以前大概知道,幾乎沒(méi)有用過(guò)所以想試手一下。整個(gè)過(guò)程花費(fèi)了昨天晚上一晚上,從6點(diǎn)多到11點(diǎn),總算破解好了。

    先說(shuō)一下我用得工具吧
    eclipse3.2,這個(gè)就不用說(shuō)了吧,主要是試一下3.2的新特性,用3.1也可以的
    winrar?? 解壓*.jar文件
    然后就是我關(guān)鍵的工具了, Jad 1.5.8e for Windows 9x/NT/2000 on Intel platform
    其實(shí)我最開始使用的不是這個(gè)版本,而是1.5.7然后再破解的過(guò)程中,反編譯java文件總是有問(wèn)題,說(shuō)

    JavaClassFileParseException: Class file version mismatch

    Parsing atlassian-extras-0.7.19/com\atlassian\license\applications\perforceplugi

    n/PeforcePluginLicenseTypeStore.class...The class file version is 47.0 (only 45.

    3 and 46.0 are supported)

    然后就去google了一下,發(fā)現(xiàn)原來(lái)是jad的版本問(wèn)題,所以到http://www.kpdus.com/jad.html#download 下載了最新的JAD,就是1.5.8e這個(gè)版本。

    下面說(shuō)一下我破解的過(guò)程吧,首先,我們可以使用評(píng)估版本的license搭建并且跑起來(lái)jira,那么可以看到在每一個(gè)具體頁(yè)面底部,都可以看到一個(gè)license信息。既然這個(gè)頁(yè)面可以看到license信息,那么,這個(gè)文件肯定最終是去讀取了license文件信息的,那么具體邏輯是在哪里呢,我就看了一下web.xml,可以知道,jira是使用sitemath來(lái)做頁(yè)面布局的,具體查看 sitemath.xml以及相應(yīng)的 decorator.xml,可以知道每個(gè)頁(yè)面底部幾乎都是使用 footer.jsp來(lái)顯示的
    打開footer.jsp,可以看到最初幾句

    1?<%@?page?import="com.atlassian.jira.config.properties.APKeys,
    2??????????????????com.atlassian.jira.util.BuildUtils,
    3??????????????????com.atlassian.jira.ManagerFactory,
    4??????????????????com.atlassian.license.*,
    5??????????????????com.atlassian.license.applications.jira.JiraLicenseTypeStore,
    6??????????????????com.atlassian.jira.web.action.util.JiraLicenseUtils"%>
    7?
    看到其中com.atlassian.license. *,那么我們可以猜測(cè),具體的license就應(yīng)該與這個(gè)相關(guān)了


    ?

    footer.jsp 中可以發(fā)現(xiàn)下面這句

    License?curLicense? = ? null ;
    if ?(JiraLicenseUtils.isLicenseSetup())
    ????curLicense?
    = ?LicenseManager.getInstance().getLicense(JiraLicenseUtils.JIRA_LICENSE_KEY);


    使用如下命令行,反編譯atlassian-extras-0.7.19.jar包(注:這個(gè)包JIRA 3.6破解

    http://m.tkk7.com/martinx/archive/2006/05/07/44914.html 這篇文章也提到了,但是沒(méi)有給出如何確定這個(gè)包的,其實(shí)可以通過(guò)eclipse的工程,把整個(gè)工程加載,包括類庫(kù),然后就可以看到類層次結(jié)構(gòu)了,然后就可以知道具體在那個(gè)包了)
    jad -o -r -sjava -dsrc atlassian-extras-0.7.19/**/*.class
    這樣可以把整個(gè)atlassian-extras-0.7.19.jar包下的文件都反編譯,然后我把反編譯的結(jié)果java文件導(dǎo)入到了eclipse,新建了一個(gè)工程,這樣方便后續(xù)的處理和查找以及編譯等等。

    接著,從反編譯出來(lái)的

    JiraLicenseUtils.java 可以發(fā)現(xiàn)如下定義

    public ? static ? final ?String?JIRA_LICENSE_KEY? = ? " JIRA " ;

    分析這一句

    curLicense? = ?LicenseManager.getInstance().getLicense(JiraLicenseUtils.JIRA_LICENSE_KEY);

    主要是 LicenseManager getLicense 方法

    License?license? = ?LicenseDecoder.getLicense(pair,?applicationName);
    licenseList.put(applicationName,?license);

    可以看出,是通過(guò) LicenseDecoder 類得到 License 方法的,后面一句是作緩存。

    在繼續(xù)跟蹤 LicenseDecoder

    可以發(fā)現(xiàn)是通過(guò)

    License?loadLicense(LicensePair?pair,?PublicKey?publicKey,?String?applicationName)

    方法來(lái)初始化 License

    繼續(xù)看下去,可以發(fā)現(xiàn)只有這一句具體實(shí)例化了一個(gè) Lisence

    return ? new ?DefaultLicense(dateCreated,?datePurchased,?organisation,?licenseType,?users,?partnerName,?licenseId);
    到現(xiàn)在,就已經(jīng)定位到具體的License類了,但是具體是不是這個(gè)類呢,這時(shí)候就是使用eclipse強(qiáng)大的功能的時(shí)候了
    使用classic search,如下,可以發(fā)現(xiàn)聲明中有License的,大約有7、8個(gè)類,具體看一下,可以發(fā)現(xiàn)僅有剛才的DefaultLIcense是繼承了License接口的,那么可以基本確定就是這個(gè)類了。


    classic_search.jpg

    但是,又不是很放心,所以又在License接口上如下查看了一下

    implementator.jpg

    這個(gè)兩個(gè)綜合,可以印證一個(gè)思想,就是所有的
    License只有一個(gè)實(shí)現(xiàn),就是DefaultLicense,那么,問(wèn)題就好辦了,只要修改DefaultLicense類文件就可以了

    看看反編譯的文件,知道License接口如下,在具體看一下License接口:

    ?1public?interface?License
    ?2?2{
    ?3?3
    ?4?4????public?abstract?Date?getDateCreated();
    ?5?5
    ?6?6????public?abstract?Date?getDatePurchased();
    ?7?7
    ?8?8????public?abstract?String?getOrganisation();
    ?9?9
    1010????public?abstract?LicenseType?getLicenseType();
    1111
    1212????public?abstract?boolean?isExpired();
    1313
    1414????public?abstract?Date?getExpiryDate();
    1515
    1616????public?abstract?String?toString();
    1717
    1818????public?abstract?boolean?isLicenseLevel(Collection?collection);
    1919
    2020????public?abstract?int?getUsers();
    2121
    2222????public?abstract?String?getPartnerName();
    2323
    2424????public?abstract?String?getLicenseId();
    2525}

    26


    可以猜想,修改這個(gè)接口的實(shí)現(xiàn),使其返回我們需要的值,那么就可以繞過(guò)License驗(yàn)證了。另外,我們注意到

    public ? abstract ?LicenseType?getLicenseType();
    這個(gè)方法,返回值是LicenseType,大概就是我們不同的License類型的一個(gè)區(qū)別吧,突然想到,其實(shí)把這些LicenseType都改成JIRA_ENTERPRISE_FULL_LICENSE幾乎類似的,那么也可以繞過(guò)這個(gè),不過(guò)這個(gè)沒(méi)有具體試過(guò),有興趣的可以一試。

    public ??? class ??JiraLicenseTypeStore?? extends ??LicenseTypeStore
    ?
    2 ???? {
    ?
    3 ??
    ?
    4 ?????? public ??JiraLicenseTypeStore()
    ?
    5 ???????? {
    ?
    6 ?????????applicationLicenseTypes.add(JIRA_STANDARD_ACADEMIC);
    ?
    7 ?????????applicationLicenseTypes.add(JIRA_STANDARD_EVALUATION);
    ?
    8 ?????????applicationLicenseTypes.add(JIRA_STANDARD_NON_PROFIT);
    ?
    9 ?????????applicationLicenseTypes.add(JIRA_STANDARD_FULL_LICENSE);
    10 ?????????applicationLicenseTypes.add(JIRA_PROFESSIONAL_ACADEMIC);
    11 ?????????applicationLicenseTypes.add(JIRA_PROFESSIONAL_EVALUATION);
    12 ?????????applicationLicenseTypes.add(JIRA_PROFESSIONAL_NON_PROFIT);
    13 ?????????applicationLicenseTypes.add(JIRA_PROFESSIONAL_FULL_LICENSE);
    14 ?????????applicationLicenseTypes.add(JIRA_ENTERPRISE_ACADEMIC);
    15 ?????????applicationLicenseTypes.add(JIRA_ENTERPRISE_EVALUATION);
    16 ?????????applicationLicenseTypes.add(JIRA_ENTERPRISE_NON_PROFIT);
    17 ?????????applicationLicenseTypes.add(JIRA_ENTERPRISE_FULL_LICENSE);
    18 ?????}
    ?
    19 ??
    20 ?????? public ??Collection?getAllLicenses()
    21 ???????? {
    22 ?????????? return ??applicationLicenseTypes;
    23 ?????}
    ?
    24 ??
    25 ?????? public ??String?getPublicKeyFileName()
    26 ???????? {
    27 ?????????? return ??publicKeyFileName;
    28 ?????}
    ?
    29 ??
    30 ?????? public ??String?getPrivateKeyFileName()
    31 ???????? {
    32 ?????????? return ??privateKeyFileName;
    33 ?????}
    ?
    34 ??
    35 ?????? public ??? static ??LicenseType?JIRA_STANDARD_ACADEMIC?? = ??? new ??DefaultLicenseType(? 197 ?,?? " ?JIRA?Standard:?Academic? " ?,?? false ?,?? false ?);
    36 ?????? public ??? static ??LicenseType?JIRA_STANDARD_EVALUATION?? = ??? new ??DefaultLicenseType(? 109 ?,?? " ?JIRA?Standard:?Evaluation? " ?,?? true ?,?? false ?);
    37 ?????? public ??? static ??LicenseType?JIRA_STANDARD_NON_PROFIT?? = ??? new ??DefaultLicenseType(? 157 ?,?? " ?JIRA?Standard:?Non-Profit?/?Open?Source? " ?,?? false ?,?? false ?);
    38 ?????? public ??? static ??LicenseType?JIRA_STANDARD_FULL_LICENSE?? = ??? new ??DefaultLicenseType(? 179 ?,?? " ?JIRA?Standard:?Commercial?Server? " ?,?? false ?,?? false ?);
    39 ?????? public ??? static ??LicenseType?JIRA_PROFESSIONAL_ACADEMIC?? = ??? new ??DefaultLicenseType(? 91 ?,?? " ?JIRA?Professional:?Academic? " ?,?? false ?,?? false ?);
    40 ?????? public ??? static ??LicenseType?JIRA_PROFESSIONAL_EVALUATION?? = ??? new ??DefaultLicenseType(? 47 ?,?? " ?JIRA?Professional:?Evaluation? " ?,?? true ?,?? false ?);
    41 ?????? public ??? static ??LicenseType?JIRA_PROFESSIONAL_NON_PROFIT?? = ??? new ??DefaultLicenseType(? 76 ?,?? " ?JIRA?Professional:?Non-Profit?/?Open?Source? " ?,?? false ?,?? false ?);
    42 ?????? public ??? static ??LicenseType?JIRA_PROFESSIONAL_FULL_LICENSE?? = ??? new ??DefaultLicenseType(? 87 ?,?? " ?JIRA?Professional:?Commercial?Server? " ?,?? false ?,?? false ?);
    43 ?????? public ??? static ??LicenseType?JIRA_ENTERPRISE_ACADEMIC?? = ??? new ??DefaultLicenseType(? 269 ?,?? " ?JIRA?Enterprise:?Academic? " ?,?? false ?,?? false ?);
    44 ?????? public ??? static ??LicenseType?JIRA_ENTERPRISE_EVALUATION?? = ??? new ??DefaultLicenseType(? 201 ?,?? " ?JIRA?Enterprise:?Evaluation? " ?,?? true ?,?? false ?);
    45 ?????? public ??? static ??LicenseType?JIRA_ENTERPRISE_NON_PROFIT?? = ??? new ??DefaultLicenseType(? 213 ?,?? " ?JIRA?Enterprise:?Non-Profit?/?Open?Source? " ?,?? false ?,?? false ?);
    46 ?????? public ??? static ??LicenseType?JIRA_ENTERPRISE_FULL_LICENSE?? = ??? new ??DefaultLicenseType(? 267 ?,?? " ?JIRA?Enterprise:?Commercial?Server? " ?,?? false ?,?? false ?);
    47 ?????? public ??? static ??String?publicKeyFileName?? = ??? " ?com/atlassian/jira/issue/Bug.class? " ?;
    48 ?????? public ??? static ??String?privateKeyFileName?? = ??? " ?jira/jira.byte? " ?;
    49 ??
    50 ?}
    ?


    那么,分析了上述的類,那么,就來(lái)修改一下DefaultLicense了,首先把初始化修改一下,如下:

    ?1 public ?DefaultLicense(Date?dateCreated,?Date?datePurchased,?String?organisation,?LicenseType?licenseType,? int ?users,?String?partnerName,?String?licenseId)
    ?2 ? 2 ???? {????????
    ?3 ? 3 ????????????Calendar?calendar = Calendar.getInstance();
    ?4 ? 4 ????????????calendar.set( 1982 , 4 , 21 );
    ?5 ? 5 ???????????? this .dateCreated? = ?calendar.getTime();
    ?6 ? 6 ???????????? this .datePurchased? = calendar.getTime();?
    ?7 ? 7 ???????????? this .organisation? = ? " escout@sjtu " ;
    ?8 ? 8 ???????????? this .licenseType? = JiraLicenseTypeStore.JIRA_ENTERPRISE_ACADEMIC;
    ?9 ? 9 ???????????? this .users? = ? 10000 ;
    10 10 ???????????? this .partnerName? = ?partnerName;
    11 11 ???????????? this .licenseId? = ?licenseId;
    12 12 ????}


    接著,把修改的DefaultLicense文件,覆蓋到atlassian-extras-0.7.19.jar解壓開的同名文件處覆蓋,同時(shí)使用下面的命令重新打包

    D:\develope\jadnt157\atlassian-extras-0.7.19>jar cvf atlassianextras-0.7.19.jar

    ?./
    然后把修改后的jar放到web-inf/lib目錄下覆蓋同名文件。重啟tomcat,這時(shí)候,我本來(lái)想應(yīng)該就可以了,誰(shuí)知打開瀏覽器,白屏!沒(méi)有任何頁(yè)面顯示,ft。
    ??? 想了想,打開tomcat的log文件,發(fā)現(xiàn)如下幾行。

    2006-05-12 21:26:08,421 ERROR [web.action.util.JiraLicenseUtils] The current license is too old (Mon Jun 14 21:26:05 CST 1982) to run this version (3.6 - Tue Apr 11 00:00:00 CST 2006) of JIRA.
    ????埃,本來(lái)想用一個(gè)比較有紀(jì)念意義的日期呢,看來(lái)不能隨心所欲啊。
    后來(lái)又改了一下,最終如下:

    ??1 public ? class ?DefaultLicense
    ??2 ???? implements ?License
    ??3 {
    ??4
    ??5 ???? public ?DefaultLicense(Date?dateCreated,?Date?datePurchased,?String?organisation,?LicenseType?licenseType,? int ?users,?String?partnerName)
    ??6 ???? {
    ??7 ????????Calendar?calendar = Calendar.getInstance();
    ??8 ????????calendar.add(Calendar.DAY_OF_MONTH,? - 5 );
    ??9 ???????? this .dateCreated? = ?calendar.getTime();
    ?10 ???????? this .datePurchased? = calendar.getTime();?
    ?11 ???????? this .organisation? = ? " escout@sjtu " ;
    ?12 ???????? this .licenseType? = JiraLicenseTypeStore.JIRA_ENTERPRISE_ACADEMIC;
    ?13 ???????? this .users? = ? 10000 ;
    ?14 ???????? this .partnerName? = ?partnerName;
    ?15 ???????? this .licenseId? = ? "" ;
    ?16 ????}

    ?17
    ?18 ???? public ?DefaultLicense(Date?dateCreated,?Date?datePurchased,?String?organisation,?LicenseType?licenseType,? int ?users,?String?partnerName,?String?licenseId)
    ?19 ???? {????????
    ?20 ????????????Calendar?calendar = Calendar.getInstance();
    ?21 ????????????calendar.add(Calendar.DAY_OF_MONTH,? - 1 );
    ?22 ???????????? this .dateCreated? = ?calendar.getTime();
    ?23 ???????????? this .datePurchased? = calendar.getTime();?
    ?24 ???????????? this .organisation? = ? " escout@sjtu " ;
    ?25 ???????????? this .licenseType? = JiraLicenseTypeStore.JIRA_ENTERPRISE_ACADEMIC;
    ?26 ???????????? this .users? = ? 10000 ;
    ?27 ???????????? this .partnerName? = ?partnerName;
    ?28 ???????????? this .licenseId? = ?licenseId;
    ?29 ????}

    ?30
    ?31 ???? public ?Date?getDateCreated()
    ?32 ???? {
    ?33 ???????? return ?dateCreated;
    ?34 ????}

    ?35
    ?36 ???? public ?Date?getDatePurchased()
    ?37 ???? {
    ?38 ???????? return ?datePurchased;
    ?39 ????}

    ?40
    ?41 ???? public ?String?getOrganisation()
    ?42 ???? {
    ?43 ???????? return ?organisation;
    ?44 ????}

    ?45
    ?46 ???? public ?LicenseType?getLicenseType()
    ?47 ???? {
    ?48 ???????? return ?licenseType;
    ?49 ????}

    ?50
    ?51 ???? public ?String?toString()
    ?52 ???? {
    ?53 ???????? return ?licenseType.getNiceName()? + ? " ?licensed?to? " ? + ?organisation;
    ?54 ????}

    ?55
    ?56 ???? public ? boolean ?isExpired()
    ?57 ???? {
    ?58 ??????? return ? false ;
    ?59 ????}

    ?60
    ?61 ???? public ?Date?getExpiryDate()
    ?62 ???? {
    ?63 ???????? return ? null ;
    ?64 ????}

    ?65
    ?66 ???? public ?String?getPartnerName()
    ?67 ???? {
    ?68 ???????? return ?partnerName;
    ?69 ????}

    ?70
    ?71 ???? public ? boolean ?isLicenseLevel(Collection?levels)
    ?72 ???? {
    ?73 ???????? for (Iterator?iterator? = ?levels.iterator();?iterator.hasNext();)
    ?74 ???????? {
    ?75 ????????????String?level? = ?(String)iterator.next();
    ?76 ???????????? if (getLicenseType().getDescription().toLowerCase().indexOf(level.toLowerCase())? != ? - 1 )
    ?77 ???????????????? return ? true ;
    ?78 ????????}

    ?79
    ?80 ???????? return ? false ;
    ?81 ????}

    ?82
    ?83 ???? public ? int ?getUsers()
    ?84 ???? {
    ?85 ???????? return ? - 1 ;
    ?86 ????}

    ?87
    ?88 ???? public ?String?getLicenseId()
    ?89 ???? {
    ?90 ???????? return ?licenseId;
    ?91 ????}

    ?92
    ?93 ???? public ? static ? long ?EVALUATION_PERIOD? = ? 0x9fa52400L ;
    ?94 ???? protected ?Date?dateCreated;
    ?95 ???? protected ?Date?datePurchased;
    ?96 ???? protected ?String?organisation;
    ?97 ???? protected ?LicenseType?licenseType;
    ?98 ???? private ? int ?users;
    ?99 ???? private ?String?partnerName;
    100 ???? private ?String?licenseId;
    101
    102 }



    再次打包放到j(luò)ira/web-inf/lib/目錄下,重啟,這下好了,jira license detail顯示:

    escout@sjtu
    08/五月/06
    JIRA Enterprise: Commercial Server
    R5AM<<8X9R
    Your commercial JIRA support and updates are available until 09/五月/07.
    哈哈,初次破解成功!!
    附記:初次破解,沒(méi)有多少經(jīng)驗(yàn),所以更多記錄了一下實(shí)際的步驟。后來(lái)我測(cè)試了一下,當(dāng)把系統(tǒng)時(shí)間更改了之后,Support Period在重啟tomcat之后才會(huì)更新,所以大概這個(gè)狀態(tài)在運(yùn)行時(shí)是保存在Application對(duì)象中的吧

    posted on 2006-05-13 21:54 綠色使者、綠色心情 閱讀(4636) 評(píng)論(5)  編輯  收藏 所屬分類: java 安全eclipse 相關(guān)

    評(píng)論

    # re: 一步一步破解JIRA3.6 2006-05-14 12:00 martin xus

    呵呵,那個(gè) atlassian-extras-0.7.19 就在web-inf/lib下面,怎么會(huì)無(wú)法找到呢:)

    Support Period 的修改在LicenseUtils里面:
    public static long getSupportPeriodEnd(License license)   回復(fù)  更多評(píng)論   

    # re: 一步一步破解JIRA3.6 2006-05-14 14:50 綠色使者、綠色心情

    我的意思是有很多atlassian-*.jar,那么如何確定是在具體那個(gè).jar文件啊  回復(fù)  更多評(píng)論   

    # 轉(zhuǎn)自daniel_zhy 2006-05-23 14:44 jirafan

    daniel_zhy 發(fā)表于2006-05-01 8:13 AM IP: 218.1.148.*
    JIRA我們使用快兩年了。 JIRA的確恨容易破解, 但看到JIRA對(duì)開源社區(qū)的巨大貢獻(xiàn), 如果手中還有Money的話,還是付吧,至少?gòu)牧夹纳线^(guò)得去。
      回復(fù)  更多評(píng)論   

    # JIRA中文論壇及演示站點(diǎn) 2006-05-23 14:45 jirafan

    JIRA中文論壇:

    http://www.czsm.com.cn/bbs/

    JIRA中文演示站點(diǎn):
    http://www.czsm.com.cn:8080/jira/  回復(fù)  更多評(píng)論   

    # re: 一步一步破解JIRA3.6 2006-05-23 14:58 綠色使者、綠色心情

    恩,謝謝提醒。
    其實(shí)我也只是在學(xué)校實(shí)驗(yàn)室用的,應(yīng)該是license中的academic類型,所以上面只是把方法貼上來(lái),全當(dāng)學(xué)習(xí)了,并沒(méi)有把破解的jar貼上來(lái)啊  回復(fù)  更多評(píng)論   


    只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。

    網(wǎng)站導(dǎo)航:
     
    主站蜘蛛池模板: 国产男女猛烈无遮挡免费视频| 啦啦啦完整版免费视频在线观看| 亚洲国产成人精品无码一区二区| 最近2019中文字幕免费直播| 一级女性全黄久久生活片免费| 成人免费淫片在线费观看| 国产成人无码免费看片软件| 成人免费福利视频| 免费国产成人午夜私人影视 | 国产美女无遮挡免费网站| 亚洲国产综合精品中文第一区| 97se亚洲国产综合自在线| 国产午夜精品久久久久免费视 | 亚洲天然素人无码专区| 88xx成人永久免费观看| 亚洲中文字幕不卡无码| 亚洲一区二区三区在线网站| 免费国产99久久久香蕉| 亚洲综合色成在线播放| 爱情岛亚洲论坛在线观看| 一个人免费高清在线观看| 内射少妇36P亚洲区| 本免费AV无码专区一区| 99re热免费精品视频观看 | 中文字幕无码免费久久99| 亚洲av日韩av激情亚洲| 久久水蜜桃亚洲AV无码精品| 久久国产乱子免费精品| 区久久AAA片69亚洲| 特级毛片全部免费播放a一级 | 亚洲一久久久久久久久| 亚洲国产成人综合| 精品久久久久久无码免费| 亚洲国产欧美国产综合一区| 免费影院未满十八勿进网站| 国产成人3p视频免费观看| 亚洲xxxx18| 国产一卡2卡3卡4卡无卡免费视频| 久久精品国产亚洲AV无码偷窥| 精品国产一区二区三区免费| 亚洲国产精品无码久久久蜜芽 |