Make your own SMS sender in LINUX!!! [Warid, Telenor Added]

Discussion of programming on Linux, including shell scripting, perl, python, c/c++, mono, java. Whatever tickles your fancy.

Make your own SMS sender in LINUX!!! [Warid, Telenor Added]

Postby masud » Thu Sep 02, 2004 2:44 pm

salamz
i got som thing for programmers :) its a open source code for sms sending protocol use by mobile companies ,,, follow the instruction and make a one for your self thnx....

Mobilink:
http://www.linuxpakistan.net/forum2x/vi ... 6326#26326

Ufone:
http://www.linuxpakistan.net/forum2x/vi ... 6338#26338

Warid::
http://www.linuxpakistan.net/forum2x/vi ... 6700#26700

Telenor:
http://www.linuxpakistan.net/forum2x/vi ... 0035#30035

Detail: (paktel, insta)
http://www.linuxpakistan.net/forum2x/vi ... 6662#26662

Thanks
Last edited by masud on Sun Oct 01, 2006 10:55 pm, edited 5 times in total.
--SP--
masud
Havaldaar
 
Posts: 108
Joined: Thu Aug 05, 2004 12:15 am
Website: http://fedoraproject.org/wiki/MasoodMehmood
WLM: silentplayer@internet-criminals.com
Yahoo Messenger: xlx_silentplayer_xlx
Location: Fremont, CA

Re:

Postby LinuxFreaK » Thu Sep 02, 2004 3:26 pm

Dear masud,
Salam,

Great !!

Best Regards.
Farrukh Ahmed
LinuxFreaK
Site Admin
 
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
ICQ: 82075802
Website: http://www.linuxpakistan.net/wiki/index.php?pagename=LinuxFreak
WLM: f4fahmed@hotmail.com
Yahoo Messenger: f4fahmed@yahoo.com
AOL: linuxpakistan@aol.com
Location: Karachi

Postby Kdaemon » Thu Sep 02, 2004 5:32 pm

Code: Select all

#!/usr/bin/perl
# Mobilink SMS Gateway Interface

$aginame="sms300";

use Net::Telnet;
$telnet = new Net::Telnet ( Timeout=>3, Port=>51215, Errmode=>'die');
$telnet->open('202.125.143.22');
$telnet->waitfor('//');
$telnet->print('#LOGIN#SMS Messenger');
($output)=$telnet->getline;
$pin = substr($output,9,7);
$telnet1 = new Net::Telnet ( Timeout=>3, Port=>51215, Errmode=>'die');
$telnet1->open('202.125.143.22');
$telnet1->waitfor('//');
$telnet1->print("#JAFERY#\$#CELL#\$$ARGV[0]\$#MSG#\$CONVE: $ARGV[1]\$#FROM#\$$pin\$#IP#\$202.125.143.22\$#END#\$");
$telnet->print('quit');


#perl script.pl cellno 'message'

this was the perl sms script used to send sms back last year, I think they have changed something and script is not working... :roll:
reg linux user #298274
Kdaemon
Naib Subedar
 
Posts: 346
Joined: Sat Nov 30, 2002 12:22 pm
Location: Islamabad. GPS: LHR

Postby masud » Fri Sep 03, 2004 1:10 am

yes they do change it IP and port number remains the same but all they included is a junk of data with msg as
WEBCHAT||12345678||SPLAYER: hi
now they folow this rule to send sms

adopt coding from my intro n make a one for perl :)
thnx
--SP--
masud
Havaldaar
 
Posts: 108
Joined: Thu Aug 05, 2004 12:15 am
Website: http://fedoraproject.org/wiki/MasoodMehmood
WLM: silentplayer@internet-criminals.com
Yahoo Messenger: xlx_silentplayer_xlx
Location: Fremont, CA

Postby n3m3sis » Sun Oct 10, 2004 11:01 am

great!!

Thanks!
n3m3sis
Havaldaar
 
Posts: 123
Joined: Sun Apr 18, 2004 2:35 pm
Location: Islamabad

Postby whizkid » Sat Oct 16, 2004 8:54 pm

In an independent approach... I made an application for it. You can download the j2me app here:
http://nasim.org/mobile/download.wml

and send free messages through GPRS from your cell phone to ufone/mobilink!

:-)
whizkid
Cadet
 
Posts: 8
Joined: Sat Oct 16, 2004 8:18 pm
Yahoo Messenger: faisalwhiz
Location: Karachi

Postby n3m3sis » Mon Oct 18, 2004 5:48 am

salamz
i got som thing for programmers Smile its a open source code for sms sending protocol use by mobile companies ,,, follow the instruction and make a one for your self thnx....

http://www.aosp.net/sms.htm
http://www.aosp.net/sms.doc


All the programs given in these links have a simple mistake!

The line 166 is:
gets(&sms);

and from man pages I see that
char *gets(char *s);

and sms is define as
char sms[100];

since sms is an array and the identifier of the array automatically holds the address of the first memory location occupied by the first item in the array, we do not need to pass the address-of operator

simply

gets(sms);

when compiling it says that gets is a dangerous function to use
any one know why?
n3m3sis
Havaldaar
 
Posts: 123
Joined: Sun Apr 18, 2004 2:35 pm
Location: Islamabad

Postby zaeemarshad » Mon Oct 18, 2004 4:51 pm

yes gets is definitely dangerous because it does no bound checking. That means that you can just fill in as many characters as you like. So if sms is a 100 element array and you use something like

gets(sms);

a carefully crafted input that exceeds 100 characters will exceed the array boundary and will overwrite the other memorylocations in the stack. Now with a carefully crafted input, one can change the value of the return pointer and cause arbitrary code to execute.

Instead of using gets() you should use fgets. There is another function for this but i cant recall it at the moment.

Cheers
Zaeem
zaeemarshad
Lieutenant Colonel
 
Posts: 660
Joined: Sat Jul 06, 2002 12:35 pm
Website: http://zaeem.no-ip.org
WLM: zarshadvirk@hotmail.com
Yahoo Messenger: negativecreep61@yahoo.com
AOL: zarshadvirk
Location: Islamabad

back

Postby masud » Thu Oct 28, 2004 11:31 pm

slamz!!
Ramzan Mubarak to every one :) sorry i was busy(or perhaps i m busy in LNMS http://sourceforge.net/projects/lnms .. sorry!!!!!
first of all thnx "n3m3sis" for read my code before doing anything , althoug u already given answer in ur question LOL
all we need is address :) and second thing about that gets()
you can use dat stuff in a local process , i mean the process whic is run by you, but for the process which hosts users and run by any privilage user then u already hav an exelent defination given bye "zaeemarshad"
anyway thnx u both :)
ALLAHHAFIZ
--SP--
masud
Havaldaar
 
Posts: 108
Joined: Thu Aug 05, 2004 12:15 am
Website: http://fedoraproject.org/wiki/MasoodMehmood
WLM: silentplayer@internet-criminals.com
Yahoo Messenger: xlx_silentplayer_xlx
Location: Fremont, CA

Mobilink has Changed Protocol

Postby wtiwana » Sun Oct 31, 2004 5:50 am

Salmz All;

Thanks for posting great messages. Your work has greated helped me in my own project.
NOw Iam stuck again. It seems that Mobilink has changed protocol again. Now previous techniques are not responding.
Please Help. My project is due for viva immediately after eid.

Thanks
wtiwana
Cadet
 
Posts: 6
Joined: Sun Oct 31, 2004 5:37 am

hehehe

Postby masud » Sun Oct 31, 2004 9:14 pm

Salamz!!
Good news! i will try, if i get time.
:)
AH
--SP--
masud
Havaldaar
 
Posts: 108
Joined: Thu Aug 05, 2004 12:15 am
Website: http://fedoraproject.org/wiki/MasoodMehmood
WLM: silentplayer@internet-criminals.com
Yahoo Messenger: xlx_silentplayer_xlx
Location: Fremont, CA

hi back!!

Postby masud » Wed Nov 03, 2004 9:17 pm

Salamz
ok try this new code !! working fine.
:arrow: http://aosp.net/sms/mobilinkv2.c
--SP--
masud
Havaldaar
 
Posts: 108
Joined: Thu Aug 05, 2004 12:15 am
Website: http://fedoraproject.org/wiki/MasoodMehmood
WLM: silentplayer@internet-criminals.com
Yahoo Messenger: xlx_silentplayer_xlx
Location: Fremont, CA

Thanks

Postby wtiwana » Thu Nov 04, 2004 2:28 am

Salam to All.
Thanks Masud. Your code really works. I was in the process of decompiling Mobilinks webchat applet, but you saved me. Thanks again.
How do you guys identify the protocol in any system such as this?

Thanks

I hope to learn, discover and distribute.

:D :)
wtiwana
Cadet
 
Posts: 6
Joined: Sun Oct 31, 2004 5:37 am

nice!!

Postby masud » Thu Nov 04, 2004 11:00 am

salamz!!
How do you guys identify the protocol in any system such as this?


Netwrok protocols are easy to identify unless they are not using any key to encrypt data back to them. Just use any packet sniffer to sniff packets and study them what they are sending and recieving but before doing any thing like this, please read RFC's of TCP/IP's because every packet is not a data packet or require packet.

I hope to learn, discover and distribute.

I like this but say it like this
I hope to learn , discover and distribute freely with source code. :)

For any kind of help reagarding low level programming (TCP/IP/UDP/ICMP/Ethernet)
" MAY HOUN NA"
ALLAHHAFIZ
--SP--
masud
Havaldaar
 
Posts: 108
Joined: Thu Aug 05, 2004 12:15 am
Website: http://fedoraproject.org/wiki/MasoodMehmood
WLM: silentplayer@internet-criminals.com
Yahoo Messenger: xlx_silentplayer_xlx
Location: Fremont, CA

Postby Kdaemon » Mon Nov 08, 2004 4:56 pm

Here is php code for sending sms to mobilinkers.
reg linux user #298274
Kdaemon
Naib Subedar
 
Posts: 346
Joined: Sat Nov 30, 2002 12:22 pm
Location: Islamabad. GPS: LHR


Return to “%s” Programming

Who is online

Users browsing this forum: No registered users and 0 guests

cron