Care Unlock  
Your online unlock store
GSM-Forum  

Welcome to the GSM-Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Go Back   GSM-Forum > Other Gsm/Mobile Related Forums > GSM Programming & Reverse Engineering

GSM Programming & Reverse Engineering Here you can post all Kind of GSM Programming and Reverse Engineering tools and Secrets.

Reply
 
LinkBack Thread Tools Display Modes
Old 07-19-2012, 17:41   #1 (permalink)
Crazy Poster
 
Join Date: May 2008
Location: Poland ;)
Age: 27
Posts: 56
Member: 776944
Status: Offline
Thanks: 47
Thanked 25 Times in 14 Posts
[Source] TinyServer - Client/Server App! Build your own Server and sell accounts :)

READ BEFORE DOWNLOAD!

I. Introduction

Today I want to present a little project called TinyServer.
Its an educational-purposed project, DEDICATED for beginners, that shows how easy is to build Client-Server Application.
TinyServer is designed especially for handling SERVICES FOR CREDITS/LOGS, so basing on this project, you can easilly build server to generate unlock codes from imei with credit consumption etc.

II. Project features

Server-Side Application (of course unfinished) supports at the moment:

- Multi threading - its an absolute basic, when you want to build server-app. Each connected client-application is served by threads, so there is no problems with synchronisation when your server handle 10/50/100 and more connected customers at the same time.

- Simple Protocol improved for the Demo - yea.. server and client applications, already have Easy Protocol (so Client/Server can recognize what they receiving from second side of the connection and do corresponding action depending on PacketType).
Also, It handle packets via special PacketStream Class made by me, so dealing with packets is freakin' easy. SAY STOP TO STRING LOVERS!
Of course, that protocol is very tiny, so sniff it when you play with launched Client&Server and you will see how its works indeed.
Source of Packet-Handling so freakin easy, so making additional packet protection systems like Each-Packet Checksum, or Custom Packet Crypt is a piece of cake! Also, it should contain any client-version authorizing system, for additional server protection, or for recognizing version of connected Client-App by the Server...

- Easy Auth System Demonstration - yea, you can send via Client-App Login & Password, and then server validating this, checking credits if login is OK, and sending hello msg & credits count to the client.
I was to lazy to implement even MySQL support to handling ACCOUNTS, so each account is saved as INI file. Of course thats a crap, implemmented only to show that Auth-System Demo works fine
If you really want to make something bigger, writing SQL support to server-app is highly recommended!

- Simple Anti-Flood Protection - Server handling each received packet, and when Client sends incompatible packet with server protocol, it have been kicked!
Also Auth-System is easilly protected - client can send login packet once for session, so any tries to send login-packet when its logged-in will threated like FLOOD - so kick!
I forgot to build demo of ban-system, but its freakin easy, just put for example IP or LOGIN @ separated list (file or database), and handle it when client connecting. If client is on the list - KICK

III) Few words more

Here's a Screen-shot! ImageShack® - Online Photo and Video Hosting

Of course its not a finished solution! That project require from you many work on:
- database support,
- additional protection (Chksums/Crypto etc),
- also it needs service algorhitms (Algos for calculating unlock codes etc),
so ALL IS IN YOUR HANDS NOW


Make services, setup server, make accounts, charge credits, and get the money!

Catch it while is hot!
http://www.kaladvance.yoyo.pl/download/tinyServer.rar

Please Note:
Project designed in Delphi 7, All you need to compile it is D7 + Borland Socket Components.

At screen shot we see that Server app is skinned, Yea - I used AlphaLite Components, but if you delete all AL declarations, it will compile without it

ARCHIVE FILE DOESNT CONTAINS ANY COMPILED BINARIES - JUST THE SOURCE CODE - so be sure that archive is clean
  Reply With Quote
The Following 2 Users Say Thank You to McManiek For This Useful Post:
Old 07-19-2012, 17:58   #2 (permalink)
Freak Poster
 
Ta@of!k's Avatar
 
Join Date: May 2012
Location: AsanSam-inG!
Posts: 136
Member: 1754434
Status: Offline
Sonork: 100.1603928
Thanks: 191
Thanked 37 Times in 21 Posts
Quote:
Originally Posted by McManiek View Post
READ BEFORE DOWNLOAD!

I. Introduction

Today I want to present a little project called TinyServer.
Its an educational-purposed project, DEDICATED for beginners, that shows how easy is to build Client-Server Application.
TinyServer is designed especially for handling SERVICES FOR CREDITS/LOGS, so basing on this project, you can easilly build server to generate unlock codes from imei with credit consumption etc.

II. Project features

Server-Side Application (of course unfinished) supports at the moment:

- Multi threading - its an absolute basic, when you want to build server-app. Each connected client-application is served by threads, so there is no problems with synchronisation when your server handle 10/50/100 and more connected customers at the same time.

- Simple Protocol improved for the Demo - yea.. server and client applications, already have Easy Protocol (so Client/Server can recognize what they receiving from second side of the connection and do corresponding action depending on PacketType).
Also, It handle packets via special PacketStream Class made by me, so dealing with packets is freakin' easy. SAY STOP TO STRING LOVERS!
Of course, that protocol is very tiny, so sniff it when you play with launched Client&Server and you will see how its works indeed.
Source of Packet-Handling so freakin easy, so making additional packet protection systems like Each-Packet Checksum, or Custom Packet Crypt is a piece of cake! Also, it should contain any client-version authorizing system, for additional server protection, or for recognizing version of connected Client-App by the Server...

- Easy Auth System Demonstration - yea, you can send via Client-App Login & Password, and then server validating this, checking credits if login is OK, and sending hello msg & credits count to the client.
I was to lazy to implement even MySQL support to handling ACCOUNTS, so each account is saved as INI file. Of course thats a crap, implemmented only to show that Auth-System Demo works fine
If you really want to make something bigger, writing SQL support to server-app is highly recommended!

- Simple Anti-Flood Protection - Server handling each received packet, and when Client sends incompatible packet with server protocol, it have been kicked!
Also Auth-System is easilly protected - client can send login packet once for session, so any tries to send login-packet when its logged-in will threated like FLOOD - so kick!
I forgot to build demo of ban-system, but its freakin easy, just put for example IP or LOGIN @ separated list (file or database), and handle it when client connecting. If client is on the list - KICK

III) Few words more

Here's a Screen-shot! ImageShack® - Online Photo and Video Hosting

Of course its not a finished solution! That project require from you many work on:
- database support,
- additional protection (Chksums/Crypto etc),
- also it needs service algorhitms (Algos for calculating unlock codes etc),
so ALL IS IN YOUR HANDS NOW


Make services, setup server, make accounts, charge credits, and get the money!

Catch it while is hot!
http://www.kaladvance.yoyo.pl/download/tinyServer.rar

Please Note:
Project designed in Delphi 7, All you need to compile it is D7 + Borland Socket Components.

At screen shot we see that Server app is skinned, Yea - I used AlphaLite Components, but if you delete all AL declarations, it will compile without it

ARCHIVE FILE DOESNT CONTAINS ANY COMPILED BINARIES - JUST THE SOURCE CODE - so be sure that archive is clean

Please check link


















BR
Asangsm team
  Reply With Quote
Old 07-19-2012, 18:32   #3 (permalink)
Crazy Poster
 
Join Date: May 2008
Location: Poland ;)
Age: 27
Posts: 56
Member: 776944
Status: Offline
Thanks: 47
Thanked 25 Times in 14 Posts
Ahh... crazy free hostings...
Here's an mirror
Zippyshare.com - tinyServer.rar
  Reply With Quote
The Following 3 Users Say Thank You to McManiek For This Useful Post:
Old 07-19-2012, 19:56   #4 (permalink)
Product Supporter and selective member Nsspro
 
Bph&co's Avatar
 
Join Date: Feb 2000
Location: UK
Posts: 3,166
Member: 1024
Status: Offline
Thanks: 618
Thanked 5,447 Times in 655 Posts
Quote:
Originally Posted by McManiek View Post
- Multi threading - its an absolute basic, when you want to build server-app. Each connected client-application is served by threads, so there is no problems with synchronisation when your server handle 10/50/100 and more connected customers at the same time.
Thanks for sharing ! Just few thoughts about multi-threading in a gsm server.

If you have own algo, coded as a separate thread ok. But still, you sell logs
for say 20 USD, the whole word is now connected on 100-200 mS ping. So
even if the server is single threaded with thread locking, you need to make
more than 100 USD/second so customers can experience any delay. And
who make that much ? Five years ago, ok, but now ? One code per day, hehe.

Also if you use some kind of dongle, smart card for algos (would be stupid
to have important algo in windows anyway!!!) you still need to serialize
calls from multiple threads to APDU/USB API.

But still good to have multi threaded server and feel good about yourself.

BR
  Reply With Quote
The Following User Says Thank You to Bph&co For This Useful Post:
Old 07-20-2012, 08:56   #5 (permalink)
No Life Poster
 
Join Date: Feb 2002
Location: Russia
Age: 33
Posts: 1,345
Member: 9519
Status: Offline
Thanks: 2
Thanked 1,199 Times in 230 Posts
@McManiek:

accessing vcl controls directly from thread WILL bring you a lot of problems, which are quite hard to track.
your server (client ) will hang randomly.
one example:

Code:
procedure TRecvThread.Execute;
................
                    begin
                      Form1.sLog.Lines.Add('    > (TCID:'+IntToStr(SocketID)+') Invalid packet! Closing connection!');
..........................
                    end;
end;
either use sendmessage,synchronize procedure or other workarounds.
  Reply With Quote
The Following User Says Thank You to the_laser For This Useful Post:
Old 07-20-2012, 12:09   #6 (permalink)
Freak Poster
 
Join Date: Mar 2009
Location: Unlocking SL3 Without BF
Posts: 232
Member: 984268
Status: Offline
Thanks: 32
Thanked 150 Times in 58 Posts
This seems nice, i made such application in the past worked like this :

Server - Client
Client > Server Enc("SetKey|Randomkey)
Server - Accept key, set in database and use it for the traffic encryption
Server > Client "Key Accepted"
Client < Server "HTC|IMEI"
Server - Calculate code / Dec(Credit)
Server > Client "Code|00000000"

I use something like that for my current server stress testing application :
www.mptools.info/IPKiller.png

Also don;'t think multithreading is necessary, Im using one socket for all jobs and never got any problem hehe:P
http://puu.sh/K8oQ
  Reply With Quote
Old 07-20-2012, 13:21   #7 (permalink)
Product Manager
 
TestBox2's Avatar
 
Join Date: May 2008
Location: Ukraine
Age: 34
Posts: 1,119
Member: 772096
Status: Offline
Sonork: 100.69222
Thanks: 4
Thanked 5,734 Times in 601 Posts
Quote:
Originally Posted by McManiek View Post


Dead link - reupload project here.
  Reply With Quote
Old 07-20-2012, 14:54   #8 (permalink)
Crazy Poster
 
Join Date: May 2008
Location: Poland ;)
Age: 27
Posts: 56
Member: 776944
Status: Offline
Thanks: 47
Thanked 25 Times in 14 Posts
Quote:
Originally Posted by the_laser View Post
@McManiek:

accessing vcl controls directly from thread WILL bring you a lot of problems, which are quite hard to track.
your server (client ) will hang randomly.
one example:

Code:
procedure TRecvThread.Execute;
................
                    begin
                      Form1.sLog.Lines.Add('    > (TCID:'+IntToStr(SocketID)+') Invalid packet! Closing connection!');
..........................
                    end;
end;
either use sendmessage,synchronize procedure or other workarounds.
Perhaps you have right, but I never had problems with that.
Currently I'm trying to rewrite idea of that program using clean WinAPI + WinSock
  Reply With Quote
Old 07-20-2012, 14:56   #9 (permalink)
Product Supporter
 
xxxman's Avatar
 
Join Date: Mar 2004
Location: jamshedpur
Age: 27
Posts: 3,779
Member: 59185
Status: Online
Sonork: 100.1593175
Thanks: 693
Thanked 4,125 Times in 1,278 Posts
Quote:
Originally Posted by TestBox2 View Post
Dead link - reupload project here.

HERE IT IS .


tinyServer.rar
  Reply With Quote
Old 07-20-2012, 22:38   #10 (permalink)
No Life Poster
 
Join Date: Feb 2002
Location: Russia
Age: 33
Posts: 1,345
Member: 9519
Status: Offline
Thanks: 2
Thanked 1,199 Times in 230 Posts
@McManiek:

believe me, problems will arise. did you tested your server with 20-30 simultaneous clients ?
synchronize is MUST when you accessing VCL controls from threads.
well, or sendmessage

clean winapi + winsock ? why ? it will not be either faster or better, but you will meet with multiple workarounds and tricks, which are hidden beneath tcustomwinsocket component.
  Reply With Quote
The Following 3 Users Say Thank You to the_laser For This Useful Post:
Old 07-21-2012, 10:50   #11 (permalink)
Product Supporter and selective member Nsspro
 
Bph&co's Avatar
 
Join Date: Feb 2000
Location: UK
Posts: 3,166
Member: 1024
Status: Offline
Thanks: 618
Thanked 5,447 Times in 655 Posts
Quote:
Originally Posted by the_laser View Post
synchronize is MUST when you accessing VCL controls from threads.
well, or sendmessage
Second that. It will not happen on your PC, it will not happen when you test
it, but absolutely random, with a customer PC, with Klingon version of Windows, etc..
  Reply With Quote
The Following User Says Thank You to Bph&co For This Useful Post:
Old 07-21-2012, 11:09   #12 (permalink)
Product Manager
 
oOXTCOo's Avatar
 
Join Date: Dec 2000
Location: J.A.U - Just Another Unlocker
Age: 33
Posts: 3,373
Member: 2878
Status: Offline
Thanks: 1,584
Thanked 8,984 Times in 1,516 Posts
i know some of this bad "random" error... i still searching for the reason..

on some customer pc when he is logged in by webserver and same
time logged in via credits server, he cant login!
he must log out from website before can login in programm.

but the creazy think is: the webserver is written in php and the
client access server is written in delphi, two different systems
but using same database.. so can any problem with database,
but on all my pc's its working fine.. so very hard to find the problem.

seems only possibility is the database.. but way?
  Reply With Quote
Old 07-21-2012, 15:53   #13 (permalink)
No Life Poster
 
..::SuB::..'s Avatar
 
Join Date: Aug 2008
Location: The Matrix :)
Age: 25
Posts: 566
Member: 833760
Status: Online
Sonork: 100.1597150
Thanks: 156
Thanked 90 Times in 42 Posts
Random idiot question: can we compile server app to linux/unix for example with cross kylix?
  Reply With Quote
Old 07-21-2012, 22:26   #14 (permalink)
Freak Poster
 
YuMERA's Avatar
 
Join Date: Feb 2004
Location: Serbia
Posts: 132
Member: 55980
Status: Offline
Thanks: 121
Thanked 43 Times in 28 Posts
Quote:
Originally Posted by oOXTCOo View Post
i know some of this bad "random" error... i still searching for the reason..

on some customer pc when he is logged in by webserver and same
time logged in via credits server, he cant login!
he must log out from website before can login in programm.

but the creazy think is: the webserver is written in php and the
client access server is written in delphi, two different systems
but using same database.. so can any problem with database,
but on all my pc's its working fine.. so very hard to find the problem.

seems only possibility is the database.. but way?
Maybe not a bad idea???

My server is on my Home PC and my public ip address is redirected in the name (eg yumera.serveftp.net) over dyn.com Host service.
Dyn client application every 5 min (can be changed) from my computer sends my momentary ip address to the Dyn Host Service, because it is dynamic not static.
In my router ADSL I made ​​a redirect incoming traffic from yumera.serveftp.net to the local IP address of the computer on which I was running server applications.
Redirection is created via a port in my case 3000.
My client application connect to the server via WinSock components. Application still test and so far no major problems.
The client and server applications created in Visual Basic database is MDB created using SQL syntax.

YuMERA
  Reply With Quote
Old 07-22-2012, 07:41   #15 (permalink)
Crazy Poster
 
Join Date: May 2008
Location: Poland ;)
Age: 27
Posts: 56
Member: 776944
Status: Offline
Thanks: 47
Thanked 25 Times in 14 Posts
Quote:
Originally Posted by the_laser View Post
@McManiek:

believe me, problems will arise. did you tested your server with 20-30 simultaneous clients ?
synchronize is MUST when you accessing VCL controls from threads.
well, or sendmessage

clean winapi + winsock ? why ? it will not be either faster or better, but you will meet with multiple workarounds and tricks, which are hidden beneath tcustomwinsocket component.
Quote:
Originally Posted by Bph&co View Post
Second that. It will not happen on your PC, it will not happen when you test
it, but absolutely random, with a customer PC, with Klingon version of Windows, etc..
Thanks for info, good to know that Server-App can be rewritten to a console, or as you said log should be served by sendmessage()
  Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
thread Thread Starter Forum Replies Last Post
what prog changes imei on 6110 and how do i do it? Ravetrancer Nokia Legacy Phones ( DCT-1 , DCT-2 , DCT-3 , DCT-L ) 3 07-31-2012 20:09
IR between 6150 and IBM TP 600 favdijck Nokia Legacy Phones ( DCT-1 , DCT-2 , DCT-3 , DCT-L ) 3 11-15-2011 12:08
FREECALLING HACKED SIM CARDS AND PROGRAMMERS SEE FREECELL'S NEW SITE FOR MORE!!! FREECELLUK Nokia Legacy Phones ( DCT-1 , DCT-2 , DCT-3 , DCT-L ) 0 06-26-1999 22:48
wt603 and .pkd ARt Nokia Legacy Phones ( DCT-1 , DCT-2 , DCT-3 , DCT-L ) 0 06-13-1999 19:18


All times are GMT +1. The time now is 15:06.



Powered by Searchlight © 2013 Axivo Inc.
- GSM Hosting Ltd. - 1999-2013 -
Page generated in 0.56794 seconds with 11 queries

SEO by vBSEO