请选择 进入手机版 | 继续访问电脑版
查看: 858|回复: 19

[我要灌水] 捕获一道难度系数为 0.6 的程序题,解开有重奖!!

[复制链接]
最佳答案
0 
Cissy 发表于 2017-10-24 15:02:08 | 显示全部楼层 |阅读模式
捕获一道难度系数为 0.6 的程序题,解开有重奖!!
a2gjgu47780365289596.jpg

又是一年 0 和 1 的好时节,全国程序猿现同台打 CALL,由各路程序猿响应监制,集加班、加班和加班于一体的《1024》在全国范围内同步上映。

这么一个不安分的节,POLYV 程序小编们粗来搞事情啦~

登登登,这是一道由 Java、JS、C++、Objective C 的同事用半根白发换来的题。解出题目的猿儿们将有机会获得蓝牙耳机一副!

兄弟姐妹,敢来挑战手动解题、拾取你的小幸运吗?


【活动规则】
以下四种语言的代码中含有相应的加密暗语,您可以从中选取其中一组代码对暗语进行解密,然后在本帖下方回复“昵称MD5 串+暗语翻译”(不含引号)。
我们将在活动结束后从回帖中随机抽出 5 位通过验证的幸运儿,送上精美礼品一份~


===============以下为四种语言代码===============


1、Java(需使用 commons-codec-1.10.jar 包)
  1. package com.rode.main;

  2. import java.io.UnsupportedEncodingException;
  3. import java.util.Scanner;

  4. import org.apache.commons.codec.binary.Base64;
  5. import org.apache.commons.codec.digest.DigestUtils;

  6. public class Entrance {

  7.     private static final String POLYV_PROPAGANDA = "RXN0YWJsaXNoZWQgaW4gMjAxMiwgR3Vhbmd6aG91IEVhc3lmdW4gSW5mb3JtYXRpb24gVGVjaG5vbG9neSBDby4sIEx0ZC4gaXMgYSBuYXRpb25hbC1jZXJ0aWZpY2F0ZWQgaGlnaC10ZWNoIGNvbXBhbnksIHdoaWNoIHRoZSBjb3JlIG1lbWJlcnMgYXJlIGZyb20gdG9wLXJhbmtpbmcgaW50ZXJuZXQgY29ycG9yYXRpb25zIGxpa2UgTmV0ZWFzZSwgQWxpYmFiYSBhbmQgQmFpZHUuIFByb3ZpZGluZyBWaWRlbyBDbG91ZCBhbmQgTGl2ZSBTdHJlYW1pbmcgQ2xvdWQgc2VydmljZXMgZm9yIGJ1c2luZXNzLCBQT0xZViBpcyBib3JuIGludG8gYSBzdWNoIGEgZ3JlYXQgY29tcGFueS4=";
  8.     private static final String POLYV_MD5_PART = "PolyV";

  9.     public static void main(String[] arges) {
  10.         try {
  11.             byte[] decode = Base64.decodeBase64(POLYV_PROPAGANDA.getBytes("UTF-8"));
  12.             String decodeStr = new String(decode, "UTF-8");
  13.             System.out.print("Please input your nick name: ");
  14.             Scanner str = new Scanner(System.in);
  15.             String input = str.next();
  16.             System.out.println(decodeStr);
  17.             System.out.println("MD5: " + md5Hex(input + decodeStr + POLYV_MD5_PART));
  18.             str.close();
  19.         } catch (UnsupportedEncodingException e) {
  20.             e.printStackTrace();
  21.         }
  22.     }

  23.     /**
  24.      * md5 encrypt
  25.      * @param text to be encrypted.
  26.      * @return the encrypted result.
  27.      */
  28.     public static String md5Hex(String text) {
  29.         return DigestUtils.md5Hex(text);
  30.     }

  31. }
复制代码
2、C++
  1. /*****************************************Festival.h*****************************************/
  2. #include "ui_Festival.h"
  3. #include <qcryptographichash.h>

  4. class Festival : public QMainWindow
  5. {
  6.     Q_OBJECT

  7. public:
  8.     Festival(QWidget *parent = Q_NULLPTR);

  9. private:
  10.     Ui::FestivalClass ui;
  11.         private slots:
  12.         void on_generateBtn_clicked();
  13. };

  14. /*****************************************Festival.cpp*****************************************/
  15. #include "Festival.h"
  16. #include <qcryptographichash.h>

  17. #define QT_UTF8(str) QString::fromUtf8(str)
  18. #define QT_TO_UTF8(str) str.toUtf8().constData()

  19. Festival::Festival(QWidget *parent)
  20.         : QMainWindow(parent)
  21. {
  22.         ui.setupUi(this);
  23.         this->setFixedHeight(120);
  24.         this->setFixedWidth(500);
  25.         ui.plainTextEdit->setReadOnly(true);
  26.         this->setStyleSheet("background-color:  #ffffff");
  27.         ui.encryNickNameLbl->setStyleSheet("font: bold; font-size:20px; color:red; ");
  28.         ui.plainTextEdit->setStyleSheet("font: bold; font-size:14px; color: #26a0f5; ");
  29.         ui.generateBtn->setStyleSheet("font: bold; color:#26a0f5;font-size:14px; border:1px solid #26a0f5; ");
  30.         ui.nickNameEdit->setStyleSheet("border:1px solid #26a0f5;font:normal 14px Microsoft YaHei;color:#5f7958;");
  31.         ui.nickNameLbl->setStyleSheet("font: bold; color:#26a0f5;font-size:14px; ");
  32. }

  33. void Festival::on_generateBtn_clicked()
  34. {
  35.         this->setFixedHeight(300);
  36.         this->setFixedWidth(500);
  37.         char val[] = { 32 ,43, 86, 120, 0157, 0154, 160, 0171, 33, 0157, 0154, 125, 0163, 127, 0120};
  38.         QString nickNameStr = ui.nickNameEdit->text().trimmed();
  39.         std::string val1 = val;
  40.         QString val2 = val1.c_str();
  41.         QString val3 = val2.mid(14, 1) + val2.mid(9, 2) + val2.mid(7, 1) + val2.mid(2, 2);
  42.         QString generateCode64Str =QStringLiteral("UE9MWVYgaXMgdGhlIGNsb3VkIGNvbXB1dGluZyBwbGF0Zm9ybSBmdWxseSBvd25lZCBieSBFYXN5ZnVuLCBpbmNsdWRpbmcgVmlkZW8gQ2xvdWQsIExpdmUgU3RyZXdpbmcgQ2xvdWQgYW5kIG90aGVyIHZpZGVvIHNlcnZpY2VzLiBXaXRoIGNvbXBsZXRlIHNldHMgb2YgQVBJLCBTREsgYW5kIGRldmVsb3BlciBkb2N1bWVudHMsIHRoZSBuYXRpb25hbC1wYXRlbnRlZCBQbGF5U2FmZSBEUk0gRWNvc3lzdGVtLCBQT0xZViBkZWxpdmVycyBzdGFibHkgc2FmZSBkaXRkIHNwZWVkeSB2aWRlbyBzZXJ2aWNlIGZvciBidXNpbmVzcyBhbmQgZW50ZXJwcmlzZSB1c2Vycy4=");

  43.         QString generateCodeStr = QByteArray::fromBase64(generateCode64Str.toUtf8());
  44.         QString signStr = QString("%1%2%3").arg(nickNameStr).arg(generateCodeStr).arg(val3.mid(0, 5));
  45.         QString md5String = QCryptographicHash::hash(QT_TO_UTF8(signStr), QCryptographicHash::Md5).toHex();
  46.         //Show MD5 String
  47.         ui.encryNickNameLbl->setText(md5String);
  48.         //Generate Code Str
  49.         ui.plainTextEdit->setPlainText(generateCodeStr);
  50. }
复制代码
3、JS
  1. var nickname = "1024"; // 您的昵称
  2. var str = 'V2l0aCB0aGUgdmlzaW9uIG9mICJkcml2aW5nIHZpZGVvIHdpdGggdmFsdWUiLFBPTFlWIG5vdyBwcm92aWRlcyBncmVhdCB2aWRlbyBwcm9kdWN0cyBpbmNsdWRpbmcgVmlkZW8gQ2xvdWQgYW5kIExpdmUgU3RyZWFtaW5nIENsb3VkIGZvciBidXNpbmVzcyB1c2Vycy5DdXJyZW50bHksIG92ZXIgMzcsMDAwIGNvcnBvcmF0aW9ucyBhbmQgb3JnYW5pemF0aW9ucyBhcmUgdXNpbmcgUE9MWVbigJlzIHZpZGVvIHNlcnZpY2UsIGdhaW5pbmcgaGlnaCByZXB1dGF0aW9uIGFtb25nIG9ubGluZSBlZHVjYXRpb24gaW5kdXN0cnkgYXMgd2VsbCBhcyBkb21lc3RpYyBhbmQgaW50ZXJuYXRpb25hbCBjbGllbnRzIGxpa2UgQXNpYW4gSW5mcmFzdHJ1Y3R1cmUgSW52ZXN0bWVudCBCYW5rIChBSUlCKSwgQ0NUViwgRGVsbCwgQm9zY2ggJiBTaWVtZW5zIEhvbWUgQXBwbGlhbmNlcyAoQlNIKSBhbmQgTGlua2VkaW4u';
  3. var b = new Base64();
  4. str = b.decode(str);  
  5. console.log(str);
  6. var code = "";
  7. var val = [80,111,108,121,86,127,136,102];
  8. for (var i = 0; i < val.length; i++) {
  9.   code += String.fromCharCode(val[i]);
  10. }
  11. code = code.substring(0,5);
  12. var sign = hex_md5(nickname + str + code);
  13. console.log(sign);
复制代码
4、Objective C

  1. ```Objective-C
  2.    // 您的昵称
  3.    NSString *nickName = @"";
  4.    NSString *EncodeStr = @"UE9MWVYsIGEgY2xvdWQgY29tcHV0aW5nIHBsYXRmb3JtIHdpdGggdmlkZW8gcHJvZHVjdHMsIGhhcyBub3cgZGV2ZWxvcGVkIDE1NyBmZWF0dXJlcyBmb3IgVmlkZW8gQ2xvdWQsIGFuZCAyMDggZm9yIExpdmUgU3RyZWFtaW5nIENsb3VkICh3aXRoIDEwMiB0YWlsb3JlZCBmb3IgZWR1Y2F0aW9uIGluZHVzdHJ5KS4gV2l0aCB0aGUgY29taW5nIG9mIDExLjExLCBhbmQgaW4gYWNjb3JkYW5jZSB3aXRoIHRoZSBwcm9tb3Rpb24gaXNzdWVzLCBQT0xZViB3aWxsIHByb3ZpZGUgZXhjbHVzaXZlIGRpc2NvdW50cyBvZiB0aGUgeWVhciwgYW5kIHJlbGVhc2Ugc2VydmljZSB1cGRhdGVzIGF0IHRoZSBzYW1lIHRpbWUu";
  5.   
  6.    NSData *decodeData = [GTMBase64 decodeString:EncodeStr];
  7.    NSString *content = [[NSString alloc] initWithData:decodeData encoding:NSUTF8StringEncoding];
  8.    
  9.    NSString *key = [[content substringToIndex:4] capitalizedString];
  10.    NSString *combinationStr = [nickName stringByAppendingFormat:@"%@%@V",content,key];
  11.    
  12.    NSString *sign = [PLVUtil md5HexDigest:combinationStr];
  13.    
  14.    NSLog(@"%@\n%@",content,sign);
  15. ```
复制代码

===============代码环节结束分割线===============

顺便宣布一件大事,距举国关注的双十一还有不到 20 天,云视频服务商保利威视在双十一也将推出全年最低价的云视频大聚惠,敬请期待!【正经脸】


【活动方】
保利威视是国内领先的视频云计算服务平台。站在云点播、云直播的技术前沿,帮助企业通过视频创造巨大的商业应用价值。欢迎进入保利威视官网了解视频加密原理和丰富的视频技术应用:http://www.polyv.net/

【福利】
1、奖品:蓝牙耳机一副(共 5 份)
2、所有参与活动的人都可获得一个大礼包:注册保利威视获“点播流量 12G+空间 4G、一年测试期、全功能开放”+“ 1 万直播分钟数” (礼包限 11 月份前注册有效)


【中奖规则】
1、活动时间:即日起至 10 月 29 日 24:00
2、使用随机数生成器抽出 5 位验证正确的中奖者,于活动结束后公布,并在活动结束一周内寄出奖品;
3、活动主办方在法律允许的范围内,保留此次活动的最终解释权。







最佳答案
0 
sadboy 发表于 2017-10-24 21:02:52 | 显示全部楼层
386e89d60ce4b948bd7dfbdac5fd6579Established in 2012, Guangzhou Easyfun Information Technology Co., Ltd. is a national-certificated high-tech company, which the core members are from top-ranking internet corporations like Netease, Alibaba and Baidu. Providing Video Cloud and Live Streaming Cloud services for business, POLYV is born into a such a great company.
最佳答案
0 
sadboy 发表于 2017-10-24 22:09:40 | 显示全部楼层


386e89d60ce4b948bd7dfbdac5fd6579 2012成立广州easyfun信息技术有限公司是国家认证的高新技术企业,其核心成员来自像网易这样的一流的互联网企业,阿里巴巴和百度。提供视频云直播云服务业务,PolyV出生在一个这样一个伟大的公司。
最佳答案
0 
myandroid 发表于 2017-10-25 12:43:35 | 显示全部楼层
很好,支持一下子
最佳答案
0 
dz2356 发表于 2017-10-25 14:11:13 | 显示全部楼层
围观围观大佬
最佳答案
0 
梦中的蝴蝶花 发表于 2017-10-25 17:34:18 | 显示全部楼层
6666666666666
最佳答案
0 
Grayon 发表于 2017-10-25 19:40:40 | 显示全部楼层
8a4a262ab1505fe6f4aedfb9f088b9d5+POLYV, a cloud computing platform with video products, has now developed 157 features for Video Cloud, and 208 for Live Streaming Cloud (with 102 tailored for education industry). With the coming of 11.11, and in accordance with the promotion issues, POLYV will provide exclusive discounts of the year, and release service updates at the same time.
最佳答案
0 
zwb520cy 发表于 2017-10-27 11:12:25 | 显示全部楼层
3498d4941381f0e4a34e213bb25a9149+With the vision of "driving video with value",POLYV now provides great video products including Video Cloud and Live Streaming Cloud for business users.Currently, over 37,000 corporations and organizations are using POLYV’s video service, gaining high reputation among online education industry as well as domestic and international clients like Asian Infrastructure Investment Bank (AIIB), CCTV, Dell, Bosch & Siemens Home Appliances (BSH) and Linkedin.
最佳答案
0 
zwb520cy 发表于 2017-10-27 11:34:17 | 显示全部楼层
JAVA:
8e01f50f4f2e245c59e41155a8fc78e4+Established in 2012, Guangzhou Easyfun Information Technology Co., Ltd. is a national-certificated high-tech company, which the core members are from top-ranking internet corporations like Netease, Alibaba and Baidu. Providing Video Cloud and Live Streaming Cloud services for business, POLYV is born into a such a great company.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

推荐阅读 More>

© 2001-2015 9秒社团

合作伙伴

公司简介 | 联系方式
COPYRIGHT©2015 ZHONGQINGLONGTU NETWORK CO.LTD ALL RIGHTS RESERVED.ICP备11023195号-4
北京中清龙图网络技术有限公司
返回顶部 返回列表