Talk about the pits encountered in the base and others

In fact, it's just a hydrology, I just want to arrange some pits
. If there are mistakes, I hope you can put them in the comment area. I'll be fine, tks.

base58

The first thing to take out is that
many people who encounter base58 code other than base64 base32 base16 will search directly for the first time. For example, they directly search for "base58 code" on Baidu,
and the first search is a toolbox.
The website mentioned:
Base58是用于比特币(Bitcoin)中使用的一种独特的编码方式,主要用于产生Bitcoin的钱包地址。 相比Base64,Base58不使用数字"0",字母大写"O",字母大写"I",和字母小写"l",以及"+"和"/"符号。比特币的Base58字母表:123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz
Yes, there is no problem with it. It is indeed the alphabet of Bitcoin. You also use bitcoin by default when you use cyberchef. In addition, Ripple's alphabet is commonly used.
But when using a toolbox, it is obvious that the encoded code cannot be solved by cyberchef.
Because the code table used by a toolbox is the code table of the short url, that is, the code table is the one 123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ
you can see in the online hex conversion . Therefore, although a toolbox is talking about bitcoin from the beginning to the following examples, it actually does not use the alphabet used by bitcoin at all.

base92

A few days ago, when I was in the water group, someone sent a red envelope question. I clicked it and opened it quickly. I tried all the bases and still can't solve it. The person who asked the question said it was base92, and it was encrypted using the bugku tool, but everyone still couldn't solve it.
This is strange, is it possible that the table of bugku is not correct?
Here I use the base92 library in python, which needs to be used in py2.

import base92
print base92.encode('testbase92')

This is the output: [email protected]+J6B
get the bugku solution and try it out?
insert image description here
So far there has been no problem.
As we all know, some competitions like to use the base doll as a sign-in question. If the plaintext is base64 10 times, base85 is performed 5 times, and then encrypted once with bugku's base92, can the obtained result be solved by bugku? This is the result of base64+base85 encryption:
insert image description here
a long list of decrypted results obtained after the base92 encryption of bugku:
insert image description here
even if the cache is cleared, the result is still the same, so try it with python?
insert image description here
Well, still not working. Then use python's base92 encryption and then go to bugku to decode it?
insert image description here
The result is that it can be solved, so what is the difference between the two of them? (s1 is bugku encryption, s2 is python)

s1 = r'''>U.xN%a]xE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QFU)]|@Lh(+rAv:$=B(+^%)#jt@*DA/R;LOV6X\!khWV<ELaPT]P.RrUuOWF;dC2%:n7,yxAAzn|Gm@D09:6Zpy:ZE@K0zD[1s4r3>FLv3(!J+@g^';a-/PoF,(#x63d2GF|6mn'O|>IGU3@I:0daM4ii_<gg@>sH1)\2yPmWhRf[@@?R[;y0][KOpVi9]6/jw696l5)s|+B+ADt_4D3\I/3@JSXj!:CtOsj3,.LAr'fRzK6'4;R)Z.LT--$LwDx$9?l/HxOgEn2F}-i<$Tr6HPVRo+YOo?W\ak;7pK9{/m=]b9_<j9$+C\0sL@*ac3>F'/3V=hb\\A@p5>6]VZv\K/fUW(Zg,=O^[sj-<.{mhY&URD4]2Za\g@qF)-,+e?\%*hTcg/CHtkmLp<oHvD@85J:a'C8+m=70))Z0_4}iOV).HLB1&!B4oPo9Bpuj6:?F_]M^A$Z^bke%r@AS}vT1C.&>B*mOgAJin4u*O(y^]SPuHDsG4Py/V!}gPUmUL<)<I\%cxPuo5W>%i8X2ha>YZz'iQ'N3DI1GX)Q5V#O?.?MX%6o0Y;jYY$:Q}%\]v:_&xn)\Z!sWS@K+lImQwoI+V:4O6*UDY<0w.fzUd?bAooP4)=3_4,*^C@oy$U#3}Ik&;BhYXxASR&HS$A$k>w_\'OxV:(+6e<(G4,:0}P{?bC0RfK5&SN%5y:iiR%47&9?05Sk/).HQF<om69}G0@3/VsHgO)?+a>VT$x'^3t/R$(AAu3b%sYHcvEdTn-,>}17_lsYbt$BUUpmP)Mf_3]Pc'.e?sRedVIk'DR!Z_K'VtBlRW=rkCn81C[Wj=@*A}-c%&a-Xt$0temhj)JST1:<0=VgM,k}?Q.J=kVG[e/tWi(saf72t,6,1RFB[iCX13EYJ'''

print("s1 len",len(s1),"\t\ts2 len",len(s2))

for i in range(len(s1)):
    if(s1[i] != s2[i]):
        print(i)

insert image description here

It can be found that although they have the same length, the letters are different in some places. See the output?
insert image description here
"Corresponding to python!" in bugku, `corresponding to python _ in bugku'
is strange. Is there a problem with the table of bugku?
insert image description hereinsert image description here

Because we cannot see the specific process, we will not continue to study and draw conclusions here. In short, please try to use the base92 library when generating.

Mengxin FAQ: base62

To put it simply, the base62 solution of some platforms is a long string of numbers, because his base62 refers to the hex conversion. You can also use the base58 conversion mentioned in base58 to convert. In general, the base62 that CTF says refers to the base62 encoding, that is, 62 printable characters are used to represent binary data. Cyberchef is still recommended here.
In addition, there is a foreign platform http://decode-base62.nichabi.com/ The base62 he uses is his own creation, and the grouping method is adopted.insert image description here

It is recommended to remember more about different platforms to avoid finding the questioner to use. After all, encryption is for good friends ***, and we are an intermediary hacker to get his information.

My binary is missing a 0 at the beginning?

This problem is a relatively common problem. I have encountered this problem in the question I wrote on bugku in February last year, a foreign game, bamboofox, and two domestic games. This is typical because the highest position is 0 is therefore omitted. The most common is the base conversion I mentioned earlier. It is an honest 8bit except for the highest bit, and the highest one is that there is no 0 at the beginning. Therefore, it is recommended that if you want to use an online website to convert, you can use cyberchef. In short, cyberchef is recommended.

How can I get rid of his zero width

I can't say, first of all, there are four common zero-width websites, which can be found by going to Tokeii's CTF site navigation .
Secondly, some questioners deliberately tick all of them and do not give prompts. When using vim to view, they cannot see that all the
insert image description here
general questions are what they have ticked. If they still can't solve it, it is recommended to open them ( Sometimes python's zero-width library can't come up with it) That's
about it. Go to sleep
insert image description hereinsert image description hereinsert image description hereinsert image description hereinsert image description hereinsert image description hereinsert image description hereinsert image description hereinsert image description hereinsert image description hereinsert image description hereinsert image description here

Guess you like

Origin blog.csdn.net/qq_42880719/article/details/122767201