[commits] [Wiki] changed: XmlRpcPythonHowTo
Wiki Guest
wikiguest at horde.org
Thu Jan 23 22:13:09 UTC 2020
guest [176.43.215.160] Thu, 23 Jan 2020 22:13:09 +0000
Modified page: https://wiki.horde.org/XmlRpcPythonHowTo
New Revision: 4
Change log: Hacked_By_Foker
@@ -1,66 +1,104 @@
-+ Using XML/RPC to interface with the Horde API using Python
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>THT/Foker</title>
+<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+<meta name="generator" content="Web Page Maker (unregistered version)">
+<style type="text/css">
+/*----------Text Styles----------*/
+.ws6 {font-size: 8px;}
+.ws7 {font-size: 9.3px;}
+.ws8 {font-size: 11px;}
+.ws9 {font-size: 12px;}
+.ws10 {font-size: 13px;}
+.ws11 {font-size: 15px;}
+.ws12 {font-size: 16px;}
+.ws14 {font-size: 19px;}
+.ws16 {font-size: 21px;}
+.ws18 {font-size: 24px;}
+.ws20 {font-size: 27px;}
+.ws22 {font-size: 29px;}
+.ws24 {font-size: 32px;}
+.ws26 {font-size: 35px;}
+.ws28 {font-size: 37px;}
+.ws36 {font-size: 48px;}
+.ws48 {font-size: 64px;}
+.ws72 {font-size: 96px;}
+.wpmd {font-size: 13px;font-family:
Arial,Helvetica,Sans-Serif;font-style: normal;font-weight: normal;}
+/*----------Para Styles----------*/
+DIV,UL,OL /* Left */
+{
+ margin-top: 0px;
+ margin-bottom: 0px;
+}
+</style>
-You can easily use Python to communicate with Horde through XML/RPC.
Recent versions of Python have a built-in library "xmlrpclib" which
even supports SSL (the "https://" protocol) and authentication! Below
you find an example which accesses Kronolith's API to enumerate and
download calendars. You can do similar things with other Horde modules.
+<script language="JavaScript1.4" type="text/javascript">
+<!--
+function jsPlay(soundobj) {
+ var thissound= eval("document."+soundobj);
+ try {
+ thissound.Play();
+ }
+ catch (e) {
+ thissound.DoPlay();
+ }
+}
+//-->
+</script>
-Look at the //modulename/lib/api.php// files in the Horde
distribution to see which APIs you can use.
+<script language="javascript" type="text/javascript">
+<!--
+function MM_swapImgRestore() {
+ var i,x,a=document.MM_sr;
for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
+}
-Note regarding SOAP: it is also possible to communicate with Horde's
SOAP API using the Python library "SOAPpy", but SOAP doesn't offer any
inherent advantages over XML-RPC when dealing with Horde's API.
+function MM_preloadImages() {
+ var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
+ var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0;
i<a.length; i++)
+ if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
+}
-<code type="python">
-#
-# Horde XML-RPC with Python Example
-#
-# This is a simple example which shows how to communicate with Horde through
-# the XML-RPC interface using the Python programming language.
-#
-# It enumerates all calendars a user has read access to and saves them to
-# the harddisk as VCALENDAR files for backup purposes.
-#
+function MM_findObj(n, d) {
+ var p,i,x; if(!d) d=document;
if((p=n.indexOf("?"))>0&&parent.frames.length) {
+ d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
+ if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++)
x=d.forms[i][n];
+ for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=MM_findObj(n,d.layers[i].document);
+ if(!x && d.getElementById) x=d.getElementById(n); return x;
+}
-import xmlrpclib
+function MM_swapImage() {
+ var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array;
for(i=0;i<(a.length-2);i+=3)
+ if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc)
x.oSrc=x.src; x.src=a[i+2];}
+}
-############################### User settings ###############################
+//-->
+</script>
-# The user name on the Horde server.
-# When using imp authentication, always use the _full_ email address here!
-# When using SQL authentication, just use your login name
-username = "joe.user at my-server.com"
-# username = "joe.user"
+</head>
+<body bgColor="#000000">
+<div id="image1" style="position:absolute; overflow:hidden; left:0px;
top:0px; width:883px; height:521px; z-index:0"><img
src="https://i.hizliresim.com/dL1V0Q.jpg" alt="" title="" border=0
width=883 height=521></div>
-# The password of this Horde user
-password = "secret"
+<div id="image2" style="position:absolute; overflow:hidden;
left:851px; top:100px; width:319px; height:319px; z-index:1"><img
src="https://i.hizliresim.com/AO9l6Q.jpg" alt="" title="" border=0
width=319 height=319></div>
-# Protocol to use for connection ("http" or "https")
-protocol = "https"
+<div id="marquee1" style="position:absolute; overflow:hidden;
left:0px; top:521px; width:1142px; height:42px; z-index:2">
+<marquee width="1142" height="42">
+<div class="wpmd">
+<div align=center><font color="#FFFFFF" face="Consolas" class="ws20"
style="background-color:#000000;"><B>HACKED BY </B></font><font
color="#FF0000" face="Consolas" class="ws20"
style="background-color:#000000;"><B>FOKER</B></font><font
color="#FFFFFF" class="ws20"
style="background-color:#000000;"><B> // www.</B></font><font
color="#FF0000" class="ws20"
style="background-color:#000000;"><B>t</B></font><font color="#FFFFFF"
class="ws20" style="background-color:#000000;"><B>urk</B></font><font
color="#FF0000" class="ws20"
style="background-color:#000000;"><B>h</B></font><font color="#FFFFFF"
class="ws20" style="background-color:#000000;"><B>ack</B></font><font
color="#FF0000" class="ws20"
style="background-color:#000000;"><B>t</B></font><font color="#FFFFFF"
class="ws20"
style="background-color:#000000;"><B>eam.org</B></font></div>
+</div></marquee>
+</div>
-# Server host name (and directory, if needed)
-hostname = "horde.my-server.com"
-# hostname = "www.my-server.com/horde"
+<div id="image3" style="position:absolute; overflow:hidden;
left:510px; top:847px; width:315px; height:315px; z-index:3"><img
src="https://i.hizliresim.com/QP6dWr.png" alt="" title="" border=0
width=315 height=315></div>
-############################## End of settings ##############################
+<div id="nav10d" style="position:absolute; left:603px; top:1152px;
z-index:4"><a onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('nav10','','images/nav2890854840a.gif',1)"
href="https://www.turkhackteam.org"><img name="nav10"
onLoad="MM_preloadImages('images/nav2890854840a.gif')" alt="" border=0
src="images/nav2890854840i.gif"></a></div>
-url = "%s://%s:%s@%s/rpc.php" % (protocol, username, password, hostname)
+<div id="nav20d" style="position:absolute; left:603px; top:1183px;
z-index:5"><a onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('nav20','','images/nav2900507180a.gif',1)"
href="https://www.youtube.com/watch?v=MdgIHIgzqYA"><img name="nav20"
onLoad="MM_preloadImages('images/nav2900507180a.gif')" alt="" border=0
src="images/nav2900507180i.gif"></a></div>
-print "Connecting to URL '%s'..." % url
-server = xmlrpclib.ServerProxy(url, verbose=0)
+<script language="javascript"
src="http://ir.sitekodlari.com/sagtusengelleme1.js"></script>
-print "Retrieving list of calendars..."
+<param name="movie"
value="https://www.youtube.com/v/watch?v=cot4mkWrHUA&autoplay=1">
+<embed
src="https://www.youtube.com/v/watch?v=cot4mkWrHUA&autoplay=1?rel=0&controls=0&showinfo=0&loop=1&hd=1&modestbranding=1&enablejsapi=1&playerapiid=ytplayer" type="application/x-shockwave-flash" height="1"
width="1"></object>
-calendars = server.calendar.listCalendars(False, 4) # "read permission"
-
-for calendarKey in calendars:
- print "Downloading calendar %s..." % calendarKey
-
- content = server.calendar.exportCalendar(calendarKey, "text/calendar")
-
- filename = calendarKey + ".ics"
-
- print "Writing file '%s'..." % filename
-
- f = file(filename, "wt")
- f.write(content.encode('utf-8'))
- f.close()
-
-print "Done."
-</code>
+</body>
+</html>
More information about the commits
mailing list