User Control Panel
Advertisements

HELP US, HELP YOU!

CPad 1.3

 
Post new topic   Reply to topic    Bot Depot Forum Index -> Commands
View unanswered posts
Author Message
Cer
Upgraded Agent
Upgraded Agent


Joined: 03 Feb 2004
Posts: 3776
Location: Michigan
Reputation: 146.9
votes: 4

PostPosted: Mon Jan 31, 2005 10:20 pm    Post subject: Reply with quote

Here's version 1.3 of CPad, your open-source Perl/HTML/Text editing program!

There's only a few updates in this version:
Quote:
¤ Option to disable extensions (for commercial use, extensions may
     provide security holes and should be disabled).
¤ Open, Save, and Save As now remember the directory you were last
     working in, and what file extension to look for (based on
     what was just open. Default is .TXT).


In past versions of CPad, the "Open", "Save", and "Save As" would always start in the working directory, and always expect to work with only Perl files. This update will start you out in whatever directory you left off in, and will expect to work with whatever file extension you were using (for example, if you open "C:\homepage\index.html", and then do another Open, it will start you at "C:\homepage\" and list all the HTML documents by default).

I downloaded a binary version of CPad at school, and then told a friend how to get it (because we're working with HTML and CPad does syntax highlighting), and then was thinking that extensions could be used for malicious purposes (i.e. if every person in a network, i.e. a school, had access to CPad and extensions, they could hack the network).

So I added the option to disable extensions. The "prefs.ini" file now has an "ext=" variable, the value of this is an MD5-encrypted key. If the key is correct, extensions will be loaded. If the key doesn't exist or has been tampered with, extensions will NOT be loaded (and the "Extensions" menubar item won't even exist either Razz ).

The source is attached. If you would prefer it in binary (compiled EXE) format, you can download that from AiChaos.com: http://www.aichaos.com/index.pl?display=do...&category=4&c=1 ).

_________________
Current Site (2008) http://www.cuvou.com/
Back to top
Addict
Not Yet a God
Not Yet a God


Joined: 21 Jan 2004
Posts: 473

Reputation: 34.4Reputation: 34.4Reputation: 34.4

PostPosted: Mon Jan 31, 2005 11:00 pm    Post subject: Reply with quote

Very Happy Another great creation! Very Happy Tk rocks! Razz
Back to top
darkmonkey
The Merovingian
The Merovingian


Joined: 18 Apr 2004
Posts: 2557
Location: London, England
Reputation: 39.3Reputation: 39.3Reputation: 39.3Reputation: 39.3
votes: 7

PostPosted: Tue Feb 01, 2005 1:30 pm    Post subject: Reply with quote

Excellent. When I get home, I'll test it out.
_________________
~ Josh
[ Need bot hosting on a dedicated server? PM me. ]
Back to top
brother
Senior Member
Senior Member


Joined: 06 Aug 2004
Posts: 156
Location: Belgium
Reputation: 24.5Reputation: 24.5

PostPosted: Tue Feb 01, 2005 2:28 pm    Post subject: Reply with quote

I like the idea of extension disabling... Certainly when it is run in a 'public' place like school or work. But i have my doubts about your method used.

I downloaded the binary version of CPAD 1.3 and checking into the contents of the zip i can see the .ini file is allready included with a MD5 hash inside the ext parameter.

Now, let's suppose the user has deleted this MD5 hash and is now working 'extension less'. Another user logs on to the same system, downloads the CPAD 1.3 zipfile and fetches the ini out, replacing the one that was edited.

I suppose this would just enable extension functions again, making it possible for the malicious user to install some 'tools' and 'suprise' the unwary user coming back to his CPAD and start it.
Back to top
Cer
Upgraded Agent
Upgraded Agent


Joined: 03 Feb 2004
Posts: 3776
Location: Michigan
Reputation: 146.9
votes: 4

PostPosted: Tue Feb 01, 2005 8:01 pm    Post subject: Reply with quote

QUOTE(brother @ Feb 1 2005, 09:28 AM)
I like the idea of extension disabling... Certainly when it is run in a 'public' place like school or work. But i have my doubts about your method used.

I downloaded the binary version of CPAD 1.3 and checking into the contents of the zip i can see the .ini file is allready included with a MD5 hash inside the ext parameter.

Now, let's suppose the user has deleted this MD5 hash and is now working 'extension less'. Another user logs on to the same system, downloads the CPAD 1.3 zipfile and fetches the ini out, replacing the one that was edited.

I suppose this would just enable extension functions again, making it possible for the malicious user to install some 'tools' and 'suprise' the unwary user coming back to his CPAD and start it.

I couldn't come up with any more efficient ways of doing it. If I had tried using the registry (for Windows), that would scare away all *lazy*'all because you know registry editing isn't always safe.

Another idea (which was stated in the directions for disabling extensions), having a file on a different server that the public can't access. But the part that would point to that server would have to be somewhere that CPad could find it.

If I owned a huge public network and put CPad on it, I would put it on a different server, where the public can access the server but they have read-only access to it (so they couldn't modify the prefs.ini file). So even if they had the MD5 key, they wouldn't be able to activate extensions again.

If anybody has any better ideas, post them here.

_________________
Current Site (2008) http://www.cuvou.com/
Back to top
mattaustin
Sentinel
Sentinel


Joined: 19 Jul 2004
Posts: 556
Location: Los Angeles, CA
Reputation: 50.7
votes: 1

PostPosted: Tue Feb 01, 2005 9:35 pm    Post subject: Reply with quote

you could use an md5 for a password used to inablethem them just have the password "password" by default then an admin can change it or something
_________________
[ matt ]
Back to top
brother
Senior Member
Senior Member


Joined: 06 Aug 2004
Posts: 156
Location: Belgium
Reputation: 24.5Reputation: 24.5

PostPosted: Wed Feb 02, 2005 1:07 am    Post subject: Reply with quote

instead of putting a random string in, i suggest putting md5 hashes of the contents of all found tools in the ini. Then; when things don't add up you could put up a little window stating a new (altered) extension found, some info from the informative hashes and yes/no buttons...

Regarding registry... You could use it as a read only base for your 'install md5 hash', use the windows product key; or some other unique reg value to generate a key for your ini file, and therefor a unique ini for that system.
Back to top
mattaustin
Sentinel
Sentinel


Joined: 19 Jul 2004
Posts: 556
Location: Los Angeles, CA
Reputation: 50.7
votes: 1

PostPosted: Wed Feb 02, 2005 1:34 am    Post subject: Reply with quote

registry would make it for windows only...we dont want that do we Razz
_________________
[ matt ]
Back to top
brother
Senior Member
Senior Member


Joined: 06 Aug 2004
Posts: 156
Location: Belgium
Reputation: 24.5Reputation: 24.5

PostPosted: Wed Feb 02, 2005 8:46 am    Post subject: Reply with quote

Not hard to make it multiplatform... Let it check OS then either use registry or /proc to retrieve a unique value for the system. I suggest hashing /proc/cpuinfo on linux.
Back to top
davidk
Senior Member
Senior Member


Joined: 14 Feb 2004
Posts: 195
Location: United Kingdom, Europe, Earth, Solar system, The Milky Way, The Universe, the 3rd Dimension.
Reputation: 31.1Reputation: 31.1Reputation: 31.1

PostPosted: Wed Feb 02, 2005 1:12 pm    Post subject: Reply with quote

You might like to register this at SourceForge.
Back to top
Cer
Upgraded Agent
Upgraded Agent


Joined: 03 Feb 2004
Posts: 3776
Location: Michigan
Reputation: 146.9
votes: 4

PostPosted: Thu Feb 10, 2005 1:11 pm    Post subject: Reply with quote

I've made a few extra useful extensions:

Fatals.cp will show a DialogBox telling you about fatal errors in the application, instead of everything just crashing.

wrap.cp adds Word Wrap options under the Edit menu, so that word wrap can be turned on or off.

Attached. Extract the .CP files to the same folder that CPad is in.

_________________
Current Site (2008) http://www.cuvou.com/
Back to top
Cer
Upgraded Agent
Upgraded Agent


Joined: 03 Feb 2004
Posts: 3776
Location: Michigan
Reputation: 146.9
votes: 4

PostPosted: Fri Mar 11, 2005 8:23 pm    Post subject: Reply with quote

QUOTE(davidk @ Feb 2 2005, 08:12 AM)
You might like to register this at SourceForge.
[right][snapback]45116[/snapback][/right]


I just sent a request to SourceForge to register it. I was working on a Cyan Chat client and registered that there, and so decided to register CPad too. Smile It may not be accepted though since there's so many other text editors like it. Razz

_________________
Current Site (2008) http://www.cuvou.com/
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Bot Depot Forum Index -> Commands All times are GMT
Page 1 of 1

 



Protected by phpBB Security phpBB-TweakS
phpBB Security Has Blocked 9 Exploit Attempts.
Antispam Captcha Mod by phpbb-security.com
Powered by phpBB © 2001, 2005 phpBB Group