FICTURE7 / CoCSharp

Clash of Clans library, proxy and server written in .NET [Unmaintained]
MIT License
109 stars 57 forks source link

CoCSharp.Server default village.json missing? #44

Closed illarum closed 9 years ago

illarum commented 9 years ago

Hello. If I run CoCSharp.server project, it errors and tells me that I do not have a defaultvillage.json. I've looked in the files and can not find it either. Thanks!

circa94 commented 9 years ago

Go to the bin folder from CoCSharp.Server an create the file: default_village.json

Paste the following json: {"buildings":[{"data":1000001,"lvl":0,"x":21,"y":20},{"data":1000004,"lvl":0,"x":20,"y":16,"res_time":8770},{"data":1000000,"lvl":0,"x":26,"y":19,"units":[],"storage_type":0},{"data":1000015,"lvl":0,"x":18,"y":20},{"data":1000014,"lvl":0,"locked":true,"x":25,"y":32}],"obstacles":[{"data":8000007,"x":5,"y":13},{"data":8000007,"x":15,"y":29},{"data":8000008,"x":7,"y":7},{"data":8000005,"x":29,"y":4},{"data":8000006,"x":15,"y":37},{"data":8000000,"x":20,"y":4},{"data":8000008,"x":15,"y":22},{"data":8000005,"x":37,"y":18},{"data":8000007,"x":6,"y":4},{"data":8000003,"x":26,"y":10},{"data":8000004,"x":21,"y":9},{"data":8000008,"x":32,"y":21},{"data":8000005,"x":20,"y":36},{"data":8000003,"x":29,"y":34},{"data":8000005,"x":5,"y":29},{"data":8000005,"x":8,"y":10},{"data":8000005,"x":5,"y":17},{"data":8000002,"x":4,"y":33},{"data":8000002,"x":5,"y":21},{"data":8000002,"x":10,"y":32},{"data":8000008,"x":5,"y":37},{"data":8000001,"x":9,"y":4},{"data":8000001,"x":13,"y":31},{"data":8000001,"x":7,"y":35},{"data":8000007,"x":4,"y":9},{"data":8000004,"x":9,"y":23},{"data":8000004,"x":6,"y":26},{"data":8000003,"x":35,"y":21},{"data":8000005,"x":32,"y":28},{"data":8000005,"x":34,"y":13},{"data":8000001,"x":14,"y":18},{"data":8000001,"x":35,"y":5},{"data":8000012,"x":24,"y":30},{"data":8000012,"x":31,"y":10},{"data":8000010,"x":26,"y":38},{"data":8000010,"x":14,"y":5},{"data":8000013,"x":34,"y":33},{"data":8000013,"x":13,"y":9},{"data":8000014,"x":10,"y":17},{"data":8000014,"x":24,"y":7},{"data":8000006,"x":36,"y":26},{"data":8000011,"x":23,"y":34},{"data":8000011,"x":24,"y":37},{"data":8000000,"x":27,"y":35},{"data":8000000,"x":25,"y":35},{"data":8000000,"x":26,"y":30},{"data":8000007,"x":23,"y":32},{"data":8000001,"x":28,"y":31},{"data":8000014,"x":28,"y":29}],"traps":[],"decos":[],"respawnVars":{"secondsFromLastRespawn":0,"respawnSeed":1529463799,"obstacleClearCounter":0},"cooldowns":[],"newShopBuildings":[1,0,1,1,1,1,1,0,2,0,0,0,0,0,1,5,0,0,0,0,0,0,0,0,0,0,0,0],"newShopTraps":[0,0,0,0,0,0,0],"newShopDecos":[1,4,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"last_league_rank":0,"last_league_shuffle":0,"last_news_seen":-1,"edit_mode_shown":false}

i hope it helps

illarum commented 9 years ago

Thank you. It works!

FICTURE7 commented 9 years ago

default_village.json is not there because I am not taking the server development seriously. Sorry about that. ^^'

illarum commented 9 years ago

No problem. I'm trying to port cocdp over to python, so this project was a big help overall for me! Thanks!

FICTURE7 commented 9 years ago

But isn't cocdp written in python already?

illarum commented 9 years ago

I mean a complete python script, because I don't know how to implement / open sockets and such with the scripts provided in cocdp. Would you know how to do that using the preexisting python scripts? I'm trying to make the two rc4 sockets and login and then make another two sockets, basically what's in your C# code but in python. Thanks

FICTURE7 commented 9 years ago

It shouldn't be that difficult to use the scripts, take a look at unpack.py or xorstream.py. You should get the idea from there on how to use them because they are well made in my opinion.

illarum commented 9 years ago

The problem with those is that it doesn't actually open a stream - I don't think. It just unpacks/decodes it and I'm not entirely sure how to implement them within a real stream

FICTURE7 commented 9 years ago

Ok, good luck with your project! :]

illarum commented 9 years ago

Thank you

illarum commented 9 years ago

Hold on, does it start the xorstream for login? Then opens two rc4's?

FICTURE7 commented 9 years ago

The 'xorstream' is just the two RC4 stream. One for encryption and the other one decryption, you need those stream always for decrypting and encrypting the network traffic.

illarum commented 9 years ago

Thanks. I will try using the functions provided (makerc4, xor stuff) to do it, but I have little knowledge on how to use them

FICTURE7 commented 9 years ago

Or to sum it up, the 'xorstream' is a stream of bytes that you must XOR with data to either encrypt or decrypt it.

FICTURE7 commented 9 years ago

I feel like you have no idea of what you're doing, do you?

FICTURE7 commented 9 years ago

Take a look at CoCCrypto. You might get an idea of how the stuff works. :]

DumpXORStream, will do exactly what xorstream.py does.