SHARE
TWEET

Untitled

a guest Aug 7th, 2017 128 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SUB parseNode(node AS XmlNode)
  2.   DIM t, t1 AS Integer
  3.   DIM x AS Integer
  4.   DIM node1 AS XmlNode
  5.   DIM node2 AS XmlNode
  6.   DIM node3 AS XmlNode
  7.   DIM buf AS String
  8.   DIM bssid, encryption, essid, maxsignal, channel AS String
  9.   DIM title, description, item_link AS String
  10.  
  11.   FOR t = 0 TO node.Children.Count - 1
  12.     node1 = node.Children[t]
  13.     IF node1.name = "wireless-network" THEN
  14.       FOR x = 0 TO node1.Attributes.Count - 1
  15.         PRINT node1.AttributeNode[x]
  16.       NEXT
  17.       FOR t1 = 0 TO node1.Children.Count - 1
  18.         IF node1.Children[t1].name = "BSSID" THEN
  19.          bssid = node1.Children[t1].Value
  20.         END IF
  21.         IF node1.Children[t1].name = "channel" THEN
  22.          channel = node1.Children[t1].Value
  23.         END IF
  24.         IF node1.Children[t1].Name = "SSID" THEN  
  25.           node2 = node1.Children[t1]
  26.           FOR x = 0 TO node2.Children.Count - 1
  27.             IF node2.Children[x].name = "essid" THEN
  28.               essid = node2.Children[x].Value
  29.             ENDIF
  30.             IF node2.Children[x].name = "encryption" THEN
  31.               encryption = node2.Children[x].Value
  32.             ENDIF
  33.           NEXT
  34.         END IF
  35.         IF node1.Children[t1].Name = "snr-info" THEN  
  36.           node2 = node1.Children[t1]
  37.           FOR x = 0 TO node2.Children.Count - 1
  38.             IF node2.Children[x].name = "max_signal_dbm" THEN
  39.               maxsignal = node2.Children[x].Value
  40.             ENDIF
  41.           NEXT
  42.         END IF
  43.       NEXT
  44.       PRINT maxsignal & "," & bssid & "," & essid & "," & encryption & "," & channel
  45.     ELSE
  46.       IF node1.Children.Count > 0 THEN parseNode(node1)
  47.     END IF
  48.   NEXT
  49. END
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top