Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- #1.to use this code you must have one modem smartfren zte
- #2.you save into your Linux Ubuntu, e.g namefile.py
- #3.run it $ python namefile.py
- print """
- ~_~_~_~_~_~_~_~
- Code by Fird05 ~_~_~_~_~_~
- [email protected] ~_~_~_~_~
- _~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~
- """
- import os
- if not os.path.exists("/etc/wvdial.conf"):
- print "you must install wvdial"
- try:
- a = raw_input("do you sure install wvdial(y/n) = ")
- if a == 'y':
- os.system("sudo apt-get install wvdial")
- elif a == 'n':
- exit()
- else:
- print "terjadi kesalahan silahkan ulangi"
- except KeyboardInterrupt:
- print "You hit control-c"
- setup = """[Dialer Defaults]
- Init1 = ATZ
- Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
- Stupid Mode = 1
- Modem Type = Analog Modem
- Command Line = ATDT
- ISDN = 0
- New PPPD = yes
- Phone = #777
- Modem = /dev/ttyUSB0
- Username = smart
- Password = smart
- Baud = 9600
- """
- if os.path.exists("/etc/wvdial.conf"):
- os.system("sudo chmod -R 777 /etc/wvdial.conf")
- ab = open("/etc/wvdial.conf", "r+")
- ab.write(setup)
- ab.close()
- os.system("sudo modprobe usbserial vendor=0x19d2 product=0xffdd")
- os.system("sudo wvdialconf")
- os.system("sudo wvdial")
Advertisement
Add Comment
Please, Sign In to add comment