Skip to content

Commit 3c01cc5

Browse files
committed
Change the default msg
1 parent e231b47 commit 3c01cc5

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

way2sms.rb

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
URL = 'http://site1.way2sms.com'
99
username = '' ## way2sms login
1010
password = '' ## way2sms password
11-
message = "Hello I'm Cheating Way2SMS :)" ## Message to be Sent
11+
message = "Hello World :)" ## Message to be Sent
1212
number = '' # Receiver mobile number
1313

1414
## With the above change you need to provide your Action on line number
@@ -17,39 +17,39 @@
1717

1818
def set_header(cookie=nil,referer=nil)
1919
{"Cookie" => cookie , "Referer" => referer ,"Content-Type" => "application/x-www-form-urlencoded","User-Agent" => "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.3) Gecko/20091020 Ubuntu/9.10 (karmic) Firefox/3.5.3 GTB7.0" }
20-
end
20+
end
2121

2222
http = Net::HTTP.new(uri.host,uri.port)
23-
23+
2424
if uri.scheme == "https"
2525
http.use_ssl = true
2626
http.ca_path = "/etc/ssl/certs"
2727
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
28-
end
28+
end
2929

3030

3131

3232

33-
def fetch(http,path,header,data=nil,method=:get,limit=10)
33+
def fetch(http,path,header,data=nil,method=:get,limit=10)
3434
raise ArgumentError, 'HTTP redirect too deep' if limit == 0
3535
cookie ||= header['Cookie']
3636
referer ||= header['Referer']
3737
if method == :get
3838
response = http.get(path,header.delete_if {|i,j| j.nil? })
39-
else
39+
else
4040
response = http.post(path,data,header.delete_if {|i,j| j.nil? })
4141
cookie ||= response['set-cookie']
42-
end
43-
44-
case response.code
42+
end
43+
44+
case response.code
4545
when /2\d{2}/
46-
return [cookie,referer,response,http]
46+
return [cookie,referer,response,http]
4747
when /3\d{2}/
4848
cookie,referer,response,http = fetch(http,("/"+response['location'].match(URL_REGEX)[1]),set_header(cookie,(URL+path)),limit-1)
4949
return [cookie,referer,response,http]
5050
else
5151
return "HTTP Error"
52-
end
52+
end
5353
end
5454

5555

@@ -65,9 +65,9 @@ def fetch(http,path,header,data=nil,method=:get,limit=10)
6565

6666
message = CGI.escape(message)
6767

68-
## The Action obtained from the way2sms on page after successful login the form of the quick message submission by inespecting it using firebuglite
69-
## Action need to be replace with yours --------
70-
# |
68+
## The Action obtained from the way2sms on page after successful login the form of the quick message submission by inespecting it using firebuglite
69+
## Action need to be replace with yours --------
70+
# |
7171
sms_data = 'HiddenAction=instantsms&Action=hgfgh5656fgd&MobNo='+number+'&textArea='+message
7272

7373
cookie,referer,response,http = fetch(http,'/quicksms.action',set_header(cookie,referer),sms_data,:post)

0 commit comments

Comments
 (0)