Friday 28 December 2012

Setting up Sprint 3G/4G modem (Franklin U600) under Archlinux

Last month I bought this modem, internet access urgently was needed. I have no time back there, so first time I've used this dongle under virtualized Windows machine. But after a while it was enough).

So I've done some lurking over the internet, found many folks were complaining about problem exactly with this model. No, I won't surrender, I thought.

So, first the first thing is I'm using Archlinux, kernel version 3.7.1-2-ARCH.

The second thing is - forget about Sprint Guide on how to set up this modem under linux, it won't work, all this 'modprobe usbserial vendor=0x0foo product=0x0bar' stuff.

All you need to do is next few steps:
  1. Install 'usb_modeswitch' and 'wvdial', nothing hard here.
  2. Make sure usbserial module isn't loaded (just 'rmmod usbserial').
  3. Insert your dongle, see what 'lsusb' is telling you, there must be device with ID 1fac:0150.
  4. Here we go. Look over file '/etc/usb_modeswitch.setup', and find a part exact with your ID, copy section below into the end of '/etc/usb_modeswitch.conf' file.
  5. Run 'usb_modeswitch -c /etc/usb_modeswitch.conf -W' and patiently wait. -W is just for verbosity.
  6. Then run 'lsusb' again, make sure device with ID 1fac:0151 appear. Here is the most interesting part: indeed cdc_acm module takes care about modem, not usbserial. And even more - if you doesn't unload usbserial module - cdc_acm wouldn't work out properly.
  7. Run 'dmesg|grep -i acm' to determine to which tty your modem is binded. In my case it was ttyACM0.
We almost done, just run 'wvdialconf' to make defaut wvdial config, and then edit '/etc/wvdial.conf', add ' Carrier Check' and 'Stupid Mode' options. My final conf looks like this:
[Dialer Defaults]
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = USB Modem
Phone = #777
ISDN = 0
Username = your username if needed
Init1 = ATZ
Password = your pass if needed
Modem = /dev/ttyACM0
Baud = 460800
Carrier Check = no
Stupid Mode = yes
And, finally type in 'wvdial' - and you on-line! Good luck, folks.

PS: forgive my bad english, I'm too sleepy right now).

Thursday 30 August 2012

Small Tips: Sounds in Pidgin

Many times from different people I've heard about sounds won't work in Pidgin. Let me clear this out. First of go 'Tools' -> 'Prefernces' (or just press Ctrl-P) menu, find 'Sounds' tab on the left, and check out three simple things in there:


1. If 'Method' set to 'Automatic', try to change it to more certain variant, e.g. 'ALSA';
2. Be suree to uncheck 'Mute Sounds' checkbox;
3. And choose 'Always' option in 'Enable Sounds' listbox.
Be attentive, see ya.

Setting up metasploit under Archlinux.

Hi folks, let me share my expirience of setting up metasploit under Archlinux.

First of all you need to install metasploit-svn and postgresql packages:

# yaourt -S metasploit-svn postgresql
Then you need to set up your postgresql installation right. Don't forget to run postgresql (I like to do it oldschool):
# /etc/rc.d/postgresql start
and you could add it to your DAEMONS in rc.conf.

After that I created database msf3 from postgresql user shell:
$ createdb msf3
Because of lack of some install script, you need to create file in /etc/profile.d/ (I named it metasploit.sh, you can call it whatever you want, just be sure to make it executable) and put this in there:
export PATH=$PATH:/usr/src/metasploit
export MSF_DATABASE_CONFIG=/usr/src/metasploit/database.yml
$MSF_DATABASE_CONFIG must point to YAML file (this file contains database configuration, my sample file you can find here). As you can see, I've put it to /usr/src/metasploit/, since it must be accessable by armitage and msfrpcd (that's what this file for). This variables will be initialized on reboot, or you can run:
# . /etc/profile.d/metasploit.sh
to get it right on fly.

Next, you need to run msfrpcd:
# msfrpcd -a 127.0.0.1 -U user -P pass -S -f
'-a' to bind to localhost, '-S' to turn off SSL, '-f' to foreground server, '-U' and '-P' is for user and password respectively. Username and password are arbitrary, just remember to enter the same values in armitage start-up window.

After all, we ready to go. Just type in:
# armitage
enter username and password, press 'Connect' and enjoy your hackerish things:). Good luck!