[BSidesCF 2020]Cards
1 | 发现大量字符,用{}包括的是json数据“”:“” |
我们在每次请求都会有一个SecretState参数,用来保存游戏状态,并且在客户端和服务端同步。这个参数没法篡改。每次请求,服务端都会生成一个新的SecretState,但是旧的SecretState并不失效,问题就出在于此。
游戏如果赢了,就更新SecretState,如果输了,则不更新SecretState。这样就可以达到类似一种分数只增不减的效果。
但是有个问题,下注之后要开牌的话,必须得用新的SecretState,而下注的时候分数已经扣了,这样输的状态依然存在。
这就需要利用21点里一个规则,如果先发的2张牌已经是21点(black jack),则直接赢(直接1.5倍)。这种状态下可以省去开牌那一步。
首先在这个url下面获取一个secret,因为后面在出牌的时候需要使用
(旧SecretState还有效带来的问题,再加上21点特殊的规则,发牌在特定情况下可以直接赢)
直接在每次dea时提交A+10的SecretState就行了
python脚本:
1 | #secret='6dcf49949620f7d43497fe0971b059e8a3fa599b4d8b4493072fcf8aca667d0da69365f3ec9aa0ca520001dc65f731b5faacb84d3af689bd405a7594f44eaddff55bf568678d098ade861b65f83419b71716c102b08beadc37e05cdfc7cebd9cca47426b3ec8199bc08c04645243e2c38e4f86e758d112a950b2924bbbd01535841db11c7e2ee38f916284ca2d689d27c6c05d71d561d727010775290b07078cb24bb5d247af49a963df723806d97bb0fe9db886355866976ff65e2bc2d3ac10405e181723d20865f9ab3763dfdab13f5597022b970d7cd1f627886efe517e4e603e3b9a9d75a4d3caddeacbad24683157bcb169d02758059187aac0a4f8347a16760ce25d3813129fe13d95bb1bc994dc56aadf3de983bac4c84da0ae959382eb4ddbf74320eb970fb601232d1b7b9b0db6780c19273e14ad6da0a210607d8acda0af308be2454942929a48862a9e4bec5a66d0793e4f7303e807d1f151216948d5b527bad3f5599d83fb6a67e082996d382eb1ca8681b2db2a61288fe2b0609b212cba182719ecf55f53bc6dd4f763fa89a6a6db9255beee51dd1901d95233726c98eaa2611752f394f6312e34dcd8c2b11be916dc03ec0f6339da4a37864304ad715a00ccf8252ed54ac82245dddb34e5f3b31a9103ea5789cd66cc37b88fec2afc2e2bafce0eb22ed81abba8c4a10451fb49e2c9dc193dd2aeefd0cb4257844c4a6e231ff495c05686c841e11f1ba3392151c907c330a2a9c88002693b06482de03c68ed5257bdd51b683c93111068fff57d4de157981cb3189831c4a8b022b84544a377ce0f157e1d7453d795d6698e785ea69001890949807e6fa97f26540617c9f43b5d687c4848226da7d57f17a35b0b68f2362371a2c1b213641dd3ca10f4a096644e3f2afbf8679bcbf437a154f3881eaeb2c0b546746740d88b57430f2965eb39d6a17892468d48796652cb4f66425d12236d262ef21b3e04164682220b1c7e86464795c1765f665754a4d0073563492854e3d7b7aa5d2f5dfc5d3cba7ef8ad992e97712d2ec9053da948919cc25812857a769541f9cde5e374520bd0237058f250f2f2bd49b79fc8b8492a6f927b6db4e9ef7de14a4cb2bf03e608fad99ef76fe54f8b204d478f7d78b707b5d48f1dbd15eb5f5a623a3c45ffc7d673d40c916b162047bf6e9b08f3ec41086b09b0dad4489d565b56dea64c83ffb2d698580567f4af25fdb027ad00e7ad214589b87fd6ede106eaeb188a9c0431cbafcf567f3831df8ca0df6ab97602b0261acdaa3815523d0c719c204ebdf9e63edf7bd356b883e9aa22cca9e221b7cdd5f2fcb45c4b8d1904e7d1f30238b440a8ddb8788b104a583e26ea5224d7170cc0ac5d8258e15a52052d6f000180b0d847aabbf66561f9856fea706eb526d6938d038eb45f1dd10ccf90c1e3aabed756cf1bf7469a836008af0b391e61558f5a961dc1a488511047adadda4a93519387b4f19fc2ccfa7ca79bafce508d0da40bab1055b47b104f49e0e1cc41a3790cc8ae06f71f8c2058434a4670e38d99160815af9704f7c90f43329bb5a73db512d2f6d2edbef386e71ef13423c8be41baa568059d7bfdc4e210a84d7503b1f6a7884d0aff42928f8f8c673338b2b09f2dc62d856530ff87814d68289ae07f85f655262f51aae96e427d892a1920d77163ebbbbf3758fce7d44c2d4f7c2c223f84ee9463291c987f814ff0f880f5b8a98d790079271ba82cc962def32286a6a7b72b68c089ea2ed542812204bb10a9915ffe9853c3a618ef524ae905b1' |
(这个题目在于json数据的提交,之前都没见过~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~)
参考链接:https://blog.csdn.net/solitudi/article/details/109186061