| View previous topic :: View next topic |
| Author |
Message |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Mon Mar 17, 2003 7:50 pm Post subject: auto-ip updater |
|
|
hello all
i was wondering if anyone has made a auto-ip updater meaning if you used www.cjb.net for a re-direct to a server and if you are on cable modem or dsl..and your ip address changes have vds auto-updated the cjb.net with the new ip address have the updater script do a auto updated like every 6 hours or so....I think this could be done...and feedback please post.... _________________ Have a nice day  |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Mon Mar 17, 2003 7:56 pm Post subject: or |
|
|
or better yet have it read your ip address store that number in a ini file then have it re-check the ip address against the one it stored...have it check it like very 6 hours or whatever..if it finds it different have it send a e-mail out WITH new ip address in the e-mail....hummmm _________________ Have a nice day  |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Mon Mar 17, 2003 8:00 pm Post subject: |
|
|
That's easy. Make a FTP client which sends the IP address to a server. Put the IP into a .HTML file like this:
| Code: | <script language="JavaScript">
document.location.href = "http://putipadsresshere/";
</script> |
|
|
| Back to top |
|
 |
X-Tools Valued Contributor

Joined: 20 Sep 2001 Posts: 296 Location: Germany
|
Posted: Mon Mar 17, 2003 8:07 pm Post subject: ip |
|
|
Hi,
i made a vds client for dyndns.org
It can handle unlimited host names and accounts,
checks for updated ip address in configurable
intervall and updates dyndns.org if a new
ip adress is detected.
But this script is beta. |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Mon Mar 17, 2003 8:10 pm Post subject: Re: ip |
|
|
| X-Tools wrote: | Hi,
i made a vds client for dyndns.org
It can handle unlimited host names and accounts,
checks for updated ip address in configurable
intervall and updates dyndns.org if a new
ip adress is detected.
But this script is beta. |
will you be sharing the soruce code? like open source?
thanks _________________ Have a nice day  |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Mon Mar 17, 2003 8:12 pm Post subject: |
|
|
| Skit3000 wrote: | That's easy. Make a FTP client which sends the IP address to a server. Put the IP into a .HTML file like this:
| Code: | <script language="JavaScript">
document.location.href = "http://putipadsresshere/";
</script> |
|
ok but how to get the ip address to a txt file so it can be sent? _________________ Have a nice day  |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Mon Mar 17, 2003 8:13 pm Post subject: |
|
|
| VDSINET.dll has got a function to retrieve the IP address... I think all other internet dlls have that too. |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Mon Mar 17, 2003 8:15 pm Post subject: hummm |
|
|
ohhhhh well think i might just play with that..to see what i can come up with.... _________________ Have a nice day  |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Mon Mar 17, 2003 10:47 pm Post subject: well |
|
|
I have been playing with it..and it harder then it looks ...hhehehe _________________ Have a nice day  |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Tue Mar 18, 2003 1:30 am Post subject: |
|
|
yea i'am having a hard time getting it to work.....if any one has any thing like this please let me know.....
thanks _________________ Have a nice day  |
|
| Back to top |
|
 |
X-Tools Valued Contributor

Joined: 20 Sep 2001 Posts: 296 Location: Germany
|
Posted: Tue Mar 18, 2003 7:27 am Post subject: autoip |
|
|
Hi,
I am using a internet perl-script that gives me my ip address.
This is because I am behind a router and so there is no chance
to get my real online ip (because the router has my online ip).
I will translate the source code messages into english today and
publish it here.
If someone is interested in developing the final version with me, please
tell me.
Bye, Fabian |
|
| Back to top |
|
 |
X-Tools Valued Contributor

Joined: 20 Sep 2001 Posts: 296 Location: Germany
|
Posted: Tue Mar 18, 2003 7:47 am Post subject: autoip |
|
|
This is the main script
| Code: | %%version = 0.2 alpha
inifile open,@path(%0)config.ini
option scale,96
option fieldsep,|
option decimalsep,.
external vdsipp.dll,DEMO
TIMER STOP,1
TIMER STOP,2
TIMER STOP,3
title cyberDNS
DIALOG CREATE,cyberDNS,-1,0,0,0
DIALOG ADD,TASKICON,TASKICON,,cyberDNS %%version
REM HTTP1 Gets the IP, 2 works on DynDNS (this is for knowing the right events)
INTERNET HTTP,CREATE,1
INTERNET HTTP,THREADS,1,ON
INTERNET HTTP,CREATE,2
INTERNET HTTP,THREADS,2,ON
INTERNET HTTP,PROTOCOL,1,1
INTERNET HTTP,USERAGENT,1,cyberDNS
LIST CREATE,1
LIST LOADFILE,1,@path(%0)log.txt
LIST CREATE,2
LIST ADD,2,4","2
if @equal(@iniread(General,autostart),"1")
goto StartMENU
end
DIALOG SET,TASKICON,cyberDNS %%version :: Waiting
:evloop
wait event
goto @event()
:TaskIconCLICK
if @equal(@click(b),RIGHT)
DIALOG POPUP,Status|Start|Stop|Beenden
else
goto StatusMENU
end
goto evloop
:StopMENU
%%ipaddress =
DIALOG SET,TASKICON,cyberDNS %%version :: Stopped
TIMER STOP,1
info Gestoppt
LIST ADD,1,@datetime(yyyy-mm-dd hh:nn:ss) @tab() Automatic Updating stopped by User
goto evloop
:StatusMENU
RUN @shortname(@path(%0)status.exe)
goto evloop
:TIMER1CTDOWN
:startMENU
DIALOG SET,TASKICON,cyberDNS %%version :: Started
DIALOG SET,TASKICON,,cyberDNS %%version Autorun @iniread(General,refresh)
TIMER START,2,CTDOWN,00-00:00:@iniread(General,timeout)
INTERNET HTTP,GET,1,@iniread(General,ipurl)
LIST ADD,1,@datetime(yyyy-mm-dd hh:nn:ss) @tab() Start
goto evloop
:HTTP1ONGETDONE
TIMER STOP,2
%%hcounter = 1
if @equal(@internet(http,content,1),@iniread(General,ipaddress))
LIST ADD,1,@datetime(yyyy-mm-dd hh:nn:ss) @tab() unchanged"," jump
goto timer
else
INIFILE WRITE,General,ipaddress,@internet(http,content,1)
DIALOG SET,TASKICON,cyberDNS %%version :: IP: @internet(http,content,1)
LIST ADD,1,@datetime(yyyy-mm-dd hh:nn:ss) @tab() IP Adress: @internet(http,content,1)
end
%%ipaddress = @internet(http,content,1)
repeat
if @not(@null(@iniread(Host.%%hcounter,active)))
%%false =
if @equal(@iniread(Host.%%hcounter,active),"1")
%%user = @iniread(Host.%%hcounter,username)
%%password = @iniread(Host.%%hcounter,password)
%%hostname = @iniread(Host.%%hcounter,hostname)
%%domainname = @iniread(Host.%%hcounter,domainname)
%%mx = @iniread(Host.%%hcounter,mx)
%%backmx = @iniread(Host.%%hcounter,backmx)
%%wildcard = @iniread(Host.%%hcounter,wildcard)
LIST ADD,1,@datetime(yyyy-mm-dd hh:nn:ss) @tab() Updating %%hostname"."%%domainname [Host: %%hcounter]
LIST ADD,2,0","%%hcounter","%%hostname"."%%domainname
LIST ADD,2,1","%%hcounter","@datetime(yyyy-mm-dd hh:nn)
LIST ADD,2,2","%%hcounter","%%ipaddress
LIST SEEK,2,0
LIST PUT,2,4","@succ(@succ(%%hcounter))
TIMER START,3,CTDOWN,00-00:00:@iniread(General,timeout)
INTERNET HTTP,AUTHENTICATE,2,%%user,%%password
INTERNET HTTP,GET,2,"http://members.dyndns.org/nic/update?system=dyndns&hostname="%%hostname"."%%domainname"&myip="%%ipaddress"&wildcard="%%wildcard"&mx="%%mx"&backmx="%%backmx
wait event
gosub @event()
end
else
%%false = ok
end
%%hcounter = @succ(%%hcounter)
LIST SAVEFILE,1,@path(%0)log.txt
until @equal(%%false,"ok")
%%hcounter = 1
LIST SAVEFILE,2,@path(%0)status.txt
LIST CLEAR,2
:Timer
if @equal(@iniread(General,auto),"1")
DIALOG SET,TASKICON,cyberDNS %%version :: Wainting @iniread(General,refresh)
TIMER START,1,CTDOWN,"00-00:"@iniread(General,refresh)":00"
LIST ADD,1,@datetime(yyyy-mm-dd hh:nn:ss) @tab() Winting 00-00:@iniread(General,refresh):00 bis zum nächsten Run
LIST SAVEFILE,1,@path(%0)log.txt
DIALOG SET,TASKICON,,Waiting @iniread(General,refresh) Minutes
end
goto evloop
:HTTP2ONGETDONE
TIMER STOP,3
LIST ADD,1,@datetime(yyyy-mm-dd hh:nn:ss) @tab() @internet(http,content,2)
LIST ADD,2,3","%%hcounter","@internet(http,content,2)
exit
:TIMER2CTDOWN
TIMER STOP,1
TIMER START,1,CTDOWN,00-00:@iniread(General,refresh):00
%%hcounter = 1
LIST ADD,1,@datetime(yyyy-mm-dd hh:nn:ss)_ @tab() _Timeout on reading IP Address
LIST ADD,1,@datetime(yyyy-mm-dd hh:nn:ss)_ @tab() _Waiting for next refresh"("@iniread(General,refresh)")"
LIST SAVEFILE,1,@path(%0)log.txt
goto evloop
:TIMER3CTDOWN
TIMER STOP,1
TIMER START,1,CTDOWN,00-00:@iniread(General,refresh):00
LIST ADD,1,@datetime(yyyy-mm-dd hh:nn:ss) @tab() Timeout on updating %%hostname"."%%domainname
LIST ADD,1,@datetime(yyyy-mm-dd hh:nn:ss) @tab() Waiting for next refresh "("@iniread(General,refresh)")"
LIST ADD,2,3","%%hcounter","Timeout
exit
:BeendenMENU
:CLOSE
LIST CLOSE,1
INTERNET HTTP,STOP,1
INTERNET HTTP,DESTROY,1
exit
|
|
|
| Back to top |
|
 |
X-Tools Valued Contributor

Joined: 20 Sep 2001 Posts: 296 Location: Germany
|
Posted: Tue Mar 18, 2003 7:48 am Post subject: autoip |
|
|
This is a beta for setting up the hosts (cannot delete for this
moment)
| Code: | INIFILE OPEN,@path(%0)config.ini
Title cyberDNS Hostsetup
DIALOG CREATE,cyberDNS Hostsetup,-1,0,444,204
DIALOG ADD,LIST,hostlist,10,4,106,162,,CLICK
DIALOG ADD,EDIT,hostname,68,134,92,19
DIALOG ADD,COMBO,domainname,68,238,92,21
DIALOG ADD,EDIT,username,25,134,90,19
DIALOG ADD,EDIT,password,25,235,90,19
DIALOG ADD,CHECK,active,24,362,70,18,Activated
DIALOG ADD,EDIT,mx,112,134,180,19
DIALOG ADD,CHECK,backmx,136,134,124,18,Backup MX Entry
DIALOG ADD,CHECK,wildcard,156,134,180,18,Wildcard Subdomains
DIALOG ADD,TEXT,dsc_hostname,52,134,,,Host
DIALOG ADD,TEXT,dsc_domainname,52,236,,,Domain
DIALOG ADD,TEXT,dsc_dot,74,230,,,.
DIALOG ADD,TEXT,dsc_username,10,135,,,Username
DIALOG ADD,TEXT,dsc_password,10,235,,,Password
DIALOG ADD,TEXT,dsc_mx,94,134,,,Mailexchanger
DIALOG ADD,BUTTON,Speichern,84,362,64,24,Save
DIALOG ADD,BUTTON,Neu,57,362,64,24,New
DIALOG ADD,BUTTON,loeschen,111,362,64,24,Delete
DIALOG SHOW
LIST LOADTEXT,domainname,
"ath.cx
"dnsalias.com
"dnsalias.net
"dnsalias.org
"dyndns.biz
"dyndns.info
"dyndns.org
"dyndns.tv
"dyndns.ws
"gotdns.com
"gotdns.org
"homedns.org
"homeftp.net
"homeftp.org
"homeip.net
"homelinux.com
"homelinux.net
"homelinux.org
"homeunix.com
"homeunix.net
"homeunix.org
"kicks-ass.net
"kicks-ass.org
"merseine.nu
"mine.nu
"serveftp.net
"serveftp.org
"shacknet.nu
%%hcounter = 1
repeat
if @not(@null(@iniread(Host.%%hcounter,active)))
%%false =
LIST ADD,hostlist,@iniread(Host.%%hcounter,hostname)"."@iniread(Host.%%hcounter,domainname)
else
%%false = ok
end
%%hcounter = @succ(%%hcounter)
until @equal(%%false,"ok")
:Evloop
wait event
goto @event()
:hostlistCLICK
DIALOG SET,username,@iniread(Host.@succ(@index(hostlist)),username)
DIALOG SET,password,@iniread(Host.@succ(@index(hostlist)),password)
DIALOG SET,hostname,@iniread(Host.@succ(@index(hostlist)),hostname)
DIALOG SET,domainname,@iniread(Host.@succ(@index(hostlist)),domainname)
if @equal(@iniread(Host.@succ(@index(hostlist)),active),"1")
DIALOG SET,active,1
else
DIALOG SET,active,
end
DIALOG SET,mx,@iniread(Host.@succ(@index(hostlist)),mx)
if @equal(@iniread(Host.@succ(@index(hostlist)),backmx),"YES")
DIALOG SET,backmx,1
else
DIALOG SET,backmx,
end
if @equal(@iniread(Host.@succ(@index(hostlist)),wildcard),"YES")
DIALOG SET,wildcard,1
else
DIALOG SET,wildcard,
end
DIALOG SET,wildcard,@iniread(Host.@succ(@index(hostlist)),wildcard)
goto evloop
:loeschenBUTTON
info does not work at the moment
goto evloop
:speichernBUTTON
INIFILE WRITE,Host.@succ(@index(hostlist)),username,@dlgtext(username)
INIFILE WRITE,Host.@succ(@index(hostlist)),password,@dlgtext(password)
INIFILE WRITE,Host.@succ(@index(hostlist)),hostname,@dlgtext(hostname)
INIFILE WRITE,Host.@succ(@index(hostlist)),domainname,@dlgtext(domainname)
if @null(@dlgtext(active))
INIFILE WRITE,Host.@succ(@index(hostlist)),active,0
else
INIFILE WRITE,Host.@succ(@index(hostlist)),active,1
end
INIFILE WRITE,Host.@succ(@index(hostlist)),mx,@dlgtext(mx)
if @null(@dlgtext(backmx))
INIFILE WRITE,Host.@succ(@index(hostlist)),backmx,NO
else
INIFILE WRITE,Host.@succ(@index(hostlist)),backmx,YES
end
if @null(@dlgtext(wildcard))
INIFILE WRITE,Host.@succ(@index(hostlist)),wildcard,NO
else
INIFILE WRITE,Host.@succ(@index(hostlist)),wildcard,YES
end
LIST PUT,hostlist,@dlgtext(hostname)"."@dlgtext(domainname)
goto evloop
:NeuBUTTON
LIST ADD,hostlist,*
%%dummy = @match(hostlist,*)
DIALOG SET,username,
DIALOG SET,password,
DIALOG SET,hostname,
DIALOG SET,domainname,
DIALOG SET,active,
DIALOG SET,mx,
DIALOG SET,backmx,
DIALOG SET,wildcard,
goto evloop
:Close
exit
|
|
|
| Back to top |
|
 |
X-Tools Valued Contributor

Joined: 20 Sep 2001 Posts: 296 Location: Germany
|
Posted: Tue Mar 18, 2003 7:49 am Post subject: autoip |
|
|
And this is a status monitor. Uses vdsobj.dll
| Code: | title cyberDNS
external vdsobj.dll,YOURCODEHERE
DIALOG CREATE,cyberDNS Status,-1,0,459,286,CLASS cyberDNS,RESIZABLE
DIALOG SHOW
OBJECT CLASS,cyberDNS
OBJECT ADD,GRID,GRID1,10,6,@diff(@winpos(cyberDNS Status,w),20),@diff(@winpos(cyberDNS Status,h),60),4,2,80,20,READONLY,NOFIXEDCOLUMN
OBJECT SETCELL,GRID1,ROW,0,Host|Letztes Update|Letzte IP Adresse|Letzte Rückmeldung
OBJECT SETCELLSIZE,GRID1,COLUMN,0,100
OBJECT SETCELLSIZE,GRID1,COLUMN,1,90
OBJECT SETCELLSIZE,GRID1,COLUMN,2,110
OBJECT SETCELLSIZE,GRID1,COLUMN,3,150
OBJECT LOADFILE,GRID1,@path(%0)status.txt
goto evloop
:RESIZE
OBJECT SETPOS,GRID1,10,6,@diff(@winpos(cyberDNS Status,w),20),@diff(@winpos(cyberDNS Status,h),60)
:evloop
wait event
goto @event()
:Close
DIALOG CLOSE
EXIT |
|
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Tue Mar 18, 2003 3:21 pm Post subject: |
|
|
X-Tools
thanks for sharing that. WOW i didn't think there would be so much code...hehhehhe
I'am still trying to figure out what all i need...I don't think i need all thoses scripts..BUT what you have posted will give me a good start...
p.s I would be interested in developing the final version with you. BUT i must tell you that i'am stilll learning this VDS code... _________________ Have a nice day  |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|