<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/21221" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2022-11-26T13:53:45-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/21221</id>

		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2022-11-26T13:53:45-04:00</updated>

		<published>2022-11-26T13:53:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111535#p111535</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111535#p111535"/>
		<title type="html"><![CDATA[Unable to parse json, I need some help please]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111535#p111535"><![CDATA[
First, "global" is used for variables, not procedures.<br><br>And if you create a dict called parse, you must use the dict utilities:<div class="codebox"><p>Code: </p><pre><code>proc getjson get data} {   set parse [::json::json2dict $data]   if {![dict exists $parse security $get]} {      return ""   } else {      return [dict get $parse security $get]   }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Sat Nov 26, 2022 1:53 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[cnecrea]]></name></author>
		<updated>2022-11-26T08:13:15-04:00</updated>

		<published>2022-11-26T08:13:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111534#p111534</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111534#p111534"/>
		<title type="html"><![CDATA[Unable to parse json, I need some help please]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111534#p111534"><![CDATA[
Hi there,<br><br>I am unable to parse json from <a href="http://api.ipregistry.co" class="postlink">http://api.ipregistry.co</a><br><br>The json output is like:<br><div class="codebox"><p>Code: </p><pre><code>{"security": {"is_abuser": false,"is_attacker": false,"is_bogon": false,"is_cloud_provider": false,"is_proxy": false,"is_relay": false,"is_tor": false,"is_tor_exit": false,"is_vpn": false,"is_anonymous": false,"is_threat": false}}</code></pre></div>And this is a part of my TCL. Can some one help me with this, please? I'll appreciate a lot<br><div class="codebox"><p>Code: </p><pre><code># json parseproc getjson {get data} {   set parse [::json::json2dict $data]   set return ""   foreach {name info} $parse {    if {[string equal -nocase $name $get]} {      set return $info      break;      }    }    return $return    }# process check proxyproc proxy_check {ip} {global getjsonset link "http://api.ipregistry.co/$ip?key=s1nr112dyxmw3oy9"set ipq [http::config -useragent "lynx"]set ipq [::http::geturl $link]set data [http::data $ipq]    ::http::cleanup $ipq    set is_abuser [getjson "is_abuser" $data]    set is_attacker [getjson "is_attacker" $data]    set is_bogon [getjson "is_bogon" $data]    set is_cloud_provider [getjson "is_cloud_provider" $data]    set is_proxy [getjson "is_proxy" $data]    set is_relay [getjson "is_relay" $data]    set is_tor [getjson "is_tor" $data]    set is_tor_exit [getjson "is_tor_exit" $data]    set is_vpn [getjson "is_vpn" $data]    set is_anonymous [getjson "is_anonymous" $data]    set is_threat [getjson "is_threat" $data]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12985">cnecrea</a> — Sat Nov 26, 2022 8:13 am</p><hr />
]]></content>
	</entry>
	</feed>
