Tags: programming
Rating:
Simple script to run this, just do not count 0 as the first number but 1.
```py
from pwn import *
r = remote("challs.n00bzunit3d.xyz", 13541)
for _ in range(100):
r.recvuntil(b"How many ")
num = int(r.recv(1).decode('utf-8'))
r.recvuntil(b"appear till ")
num2 = int(r.recv().decode('utf-8').replace('?\n',''))
a = 0
for i in range(num2):
a += str(i).count(str(num))
if num == 0:
a -= 1
r.sendline(bytes(str(a),'utf-8'))
print(r.recv())
```
Flag: `n00bz{4n_345y_pr0gr4mm1ng_ch4ll}`