Archive for the 'Uncategorized' Category

Page 3 of 6

Western Digital – Mybook World Edition II NAS

Recently I bought a Western Digital Mybook World Edition II NAS, before i purchased it i was sure to find out whether it had an embedded linux distribution installed on it, and if there were hacks available to enable ssh access etc.  Luckily, there were (one doesn’t even need physical access to work).  So, ive been working to get the following going:

- LFTP

- PureFTPD

- Samba

- Screen

and after about 4 or 5 weeks of work, everything is working correctly with compilation problems cropping up every now and then.  One of the WORST errors that was so goddamn annoying was the following (when compiling lftp):

 

./.libs/liblftp-jobs.a(commands.o): In function `cmd_chmod(CmdExec*)’:
commands.cc:(.text+0x5cb0): undefined reference to `mode_compile’
./.libs/liblftp-jobs.a(FileSetOutput.o): In function `FileSetOutput::print(FileSet&, OutputJob*) const’:
FileSetOutput.cc:(.text+0xc4): undefined reference to `rpl_fnmatch’
FileSetOutput.cc:(.text+0×268): undefined reference to `human_readable’
FileSetOutput.cc:(.text+0x4e0): undefined reference to `strmode’
./.libs/liblftp-jobs.a(QueueFeeder.o): In function `QueueFeeder::get_next_match(char const*, QueueFeeder::QueueJob*)’:
QueueFeeder.cc:(.text+0x7f0): undefined reference to `rpl_fnmatch’
./.libs/liblftp-jobs.a(QueueFeeder.o): In function `QueueFeeder::MoveJob(char const*, int, int)’:
QueueFeeder.cc:(.text+0x8c8): undefined reference to `rpl_fnmatch’
./.libs/liblftp-jobs.a(FindJobDu.o): In function `FinderJob_Du::print_size(long long, char const*)’:
FindJobDu.cc:(.text+0x6f8): undefined reference to `human_readable’
./.libs/liblftp-jobs.a(ChmodJob.o): In function `ChmodJob::GetMode(FileInfo const*) const’:
ChmodJob.cc:(.text+0×230): undefined reference to `mode_adjust’
./.libs/liblftp-jobs.a(ChmodJob.o): In function `ChmodJob::CurrentFinished(char const*, FileInfo const*)’:
ChmodJob.cc:(.text+0x2c0): undefined reference to `strmode’
/root/lftp-3.5.12/src/.libs/liblftp-tasks.a(ResMgr.o): In function `ResMgr::Resource::ClosureMatch(char const*)’:
ResMgr.cc:(.text+0x99c): undefined reference to `rpl_fnmatch’
/root/lftp-3.5.12/src/.libs/liblftp-tasks.a(FileSet.o): In function `fnmatch_dir(char const*, FileInfo const*)’:
FileSet.cc:(.text+0x20f0): undefined reference to `rpl_fnmatch’
/root/lftp-3.5.12/src/.libs/liblftp-tasks.a(FileGlob.o): In function `Glob::add(FileInfo const*)’:
FileGlob.cc:(.text+0×264): undefined reference to `rpl_fnmatch’
/root/lftp-3.5.12/src/.libs/liblftp-tasks.a(PatternSet.o): In function `PatternSet::Glob::Match(char const*)’:
PatternSet.cc:(.text+0×314): undefined reference to `rpl_fnmatch’
/root/lftp-3.5.12/src/.libs/proto-http.a(Http.o): In function `Http::CookieClosureMatch(char const*, char const*, char const*)’:
Http.cc:(.text+0x1f60): undefined reference to `rpl_fnmatch’
collect2: ld returned 1 exit status
make[1]: *** [lftp] Error 1
make[1]: Leaving directory `/root/lftp-3.5.12/src’
make: *** [all-recursive] Error 1

and that was fixed by installing gnu-findutils.  Some other stuff also cropped up, which was mainly caused by western digital opting to use ‘ucLibC’ over GlibC (uclibc is a portable c library made for use on portable devices, whereas the latter is made for fullsize linux distributions.  One of the drawbacks is that it doesnt support streams.  Some specs of the device are:

 

[root@storage lftp-3.5.12]# df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 2.8G 981M 1.7G 37% /
/dev/root 2.8G 981M 1.7G 37% /
/dev/md3 950M 20M 883M 3% /var
/dev/md4 455G 111G 344G 25% /shares/internal

[root@storage lftp-3.5.12]# cat /proc/cpuinfo
Processor : ARM926EJ-Sid(wb) rev 5 (v5l)
BogoMIPS : 99.73
Features : swp half thumb fastmult edsp java
CPU implementer : 0×41
CPU architecture: 5TEJ
CPU variant : 0×0
CPU part : 0×926
CPU revision : 5
Cache type : write-back
Cache clean : cp15 c7 ops
Cache lockdown : format C
Cache format : Harvard
I size : 32768
I assoc : 4
I line length : 32
I sets : 256
D size : 32768
D assoc : 4
D line length : 32
D sets : 256

One drawback is that by default, the NAS has a bunch of java crap installed on it (its called mionet, its generally used for ‘worldwide sharing’ which can also be accomplished with an ftp server), and as everyone would know, java chews a hell of a lot of cpu and memory, so the first task was getting rid of that.

Anyway, by this point you’ve noticed that this post is almost nonsensical.  One great resource for the mybook is http://martin.hinner.info/mybook/

Enjoy.

MSN Messenger closing down! PANIC!

Heres a chain email i received the other day about the aforementioned topic:

 

Bcc:
Subject: ATTENTION
Date: Fri, 06 Apr 2007 18:22:47 +1030
Mime-Version: 1.0
Content-Type: text/plain; format=flowed
X-OriginalArrivalTime: 06 Apr 2007 07:52:51.0574 (UTC) FILETIME=[93B4E160:01C77820]
HI  guys
Sorry to break the news, but looks like all of those warnings were real!
The use of msn and mail will cost money from summer 2007. If you send this
message to 18 different people from your list your little msn icon will
become blue and that will make it free for you. If you dont believe me go on
(www.msn.com) and see it yourself. Dont foward this message, copy paste it
so people will actually read it.> Hey it is Andy and john the directors of
MSN, sorry for the interruption but
msn is closing down. this is because too many inconsiderate people are
taking up all the name (eg making up lots of different accounts for just one
person), we only have 578 names left. If you would like to close your
account, DO NOT SEND THIS MESSAGE ON. If you would like to keep your
account, then SEND THIS
MESSAGE
TO EVERYONE ON YOUR CONTACT LIST. This is no
joke, we will be shutting down the servers. Send it on, thanks.
WHO EVER DOES NOT SEND THIS MESSEAGE, YOUR ACCOUNT WILL BE CLOSED AND YOU
WILL COST £10.00 A MONTH TO USE. SEND THIS TO EVERYONE ON YOUR CONTACT LIST.
NOW YOU KNOW WHAT TO DO. PLEASE DO NOT FORWARD THIS or REPLAY. COPY THE
WHOLE EMAIL. GO BACK TO YOUR INBOX AND CLICK ON NEW. AND PASTE THANK YOU FOR
YOUR ATTENTION
hey everyone, i dont normally send this sort of stuff out but had a look on
the internet and its
actually true . On the 30th of november , we will have
to pay for the use of our MSN and email accounts unless we send this message
to at least 18 contacts on your contact list. It’s no joke if you don’t
believe me then go to the site
(http://news.bbc.co.uk/1/hi/business/1189119.stm) and see for yourself.
Anyways once you’ve sent this message to at least 18 contacts, your msn dude
will become blue. please copy and paste don’t forward cos people won’t take
notice of it

My rebuttal:

 

1) You neglected to read the date on that article.  MSN CHAT was the
item to close down in 2001 (it was due to people flooding their chat
rooms and such).
2) MSN is ran by a fucking multinational corporation which makes
BILLIONS of dollars of profit per year and has almost unlimited
computing resources.
3) That parent company makes the worlds most popular operating system
and web browser.
4) There is over 40 billion combinations of email addresses for ONE
domain. So multiply that by four or five, then its simply infinite.
(@live.com, @hotmail.com, @msn.com)
5) Microsoft makes more profit from msn than it costs them to run it.
MSN is also the most popular IM system on the internet.
6) If it really was closing down, there would be a huge fucking
uproar.  Go to http://mess.be  Is msn closing down? No.
7) Once again, http://chat.msn.com/ was what closed down, not Windows
Live Messenger.
Dont forward this shit to me again.
Regards,

Brent

Alls well that ends well.

Download Files Remotely: Followup

Okay, the source for the program/website was in the last post, and a lot has changed since then.  I’ve fixed a lot of bugs and added a ‘singular’ url download form and a ‘force complete’ button.  For some reason BITS doesn’t like to call .Complete() when you have forty or so jobs going.  So, it looks like this is going to be an uphill battle.  As a temporary fix, i’ve made a button that forces .Complete() to be called if BytesTransferred == BytesTotal.  It’s helped a lot recently, but, its only a halfassed hack.   I’ll upload the updated file in the next few hours, since i’m incredibly lazy atm.  But, the remote dl thing is working great for what i need it for.  I need ideas for stuff** to code in ASP.NET.

 

** Editing expletives out so i dont get blocked by my schools filtering.

Download Files Remotely

Post removed: Caused annoying stylesheet error. If you need the code, you can look it up through Google Cache, or The Web Archive (any dates between original post date & 5/12/07).

Counter-Strike: Source Stuff

Here are some cool SS’s.

 

Create User in LDAP

Recently i’ve been playing with WS2003 in a Virtual Machine, and i’ve had to create some stuff to automatically setup a user with a roaming profile, and a home directory (and set the appropriate permissions).  Enjoy.  Save it as createUser.vbs, double click on it and you’re ready to go.  NOTE: You might want to remove some domain specific stuff (and if you have special OU’s, edit the script accordingly.  The script assigns permissions to the users profile/home dir folders, in this script it gives Administrator full control, and the user themselves full control.

 

   1:  Option Explicit
   2:  Dim wshShell
   3:  Dim strUser
   4:  Dim objRootLDAP, objContainer, objNewUser
   5:  Dim fso
   6:  Dim profilePath
   7:  Dim strFullName
   8:  dim strPassword
   9:  Dim homePath
  10:  Set fso = CreateObject("Scripting.FileSystemObject")
  11:   
  12:  Set wshShell = WScript.CreateObject("WScript.Shell")
  13:   
  14:  strUser = InputBox("User Name?", "Prompt", "", 100, 100)
  15:  strFullName = InputBox("Full Name?", "Prompt", "", 100, 100)
  16:  strPassword = InputBox("Password?", "Prompt", "", 100, 100)
  17:   
  18:  ' Bind to Active Directory, Users container.
  19:  Set objRootLDAP = GetObject("LDAP://rootDSE")
  20:  Set objContainer = GetObject("LDAP://cn=Users," & _
  21:  objRootLDAP.Get("defaultNamingContext"))
  22:   
  23:  homePath = "\\HURRICANE\Homes\"+strUser
  24:  profilePath = "\\HURRICANE\Profiles\"+strUser
  25:   
  26:  Dim objFSO
  27:  Set objFSO = CreateObject("Scripting.FileSystemObject")
  28:   
  29:   
  30:  If fso.FolderExists(homePath) = False Then
  31:  fso.CreateFolder(homePath)
  32:  End If
  33:   
  34:  If fso.FolderExists(profilePath) = False Then
  35:  fso.CreateFolder(profilePath)
  36:  End If
  37:   
  38:  ' Build the actual User.
  39:  Set objNewUser = objContainer.Create("User", "cn=" & strUser)
  40:  objNewUser.Put "sAMAccountName", strUser
  41:  objNewUser.Put "userPrincipalName", strUser + "@homegroup.int"
  42:  objNewUser.Put "displayName", strFullName
  43:  objNewUser.Put "HomeDirectory", "\\HURRICANE\Homes\"+strUser
  44:  objNewUser.Put "profilePath", "\\HURRICANE\Profiles\"+strUser
  45:  objNewUser.SetInfo
  46:  objNewUser.SetPassword strPassword
  47:  objNewUser.Put "userAccountControl", 512
  48:  objNewUser.SetInfo
  49:   
  50:  Dim intRunError
  51:  Dim strHomeFolder
  52:  strHomeFolder = "\\HURRICANE\Homes\"+strUser
  53:  If strHomeFolder <> "" Then
  54:  If Not objFSO.FolderExists(strHomeFolder) Then
  55:  On Error Resume Next
  56:  objFSO.CreateFolder strHomeFolder
  57:       If Err.Number <> 0 Then
  58:       On Error GoTo 0
  59:       Wscript.Echo "Cannot create: " & strHomeFolder
  60:       End If
  61:  On Error GoTo 0
  62:  End If
  63:       If objFSO.FolderExists(strHomeFolder) Then
  64:       ' Assign user permission to home folder.
  65:       intRunError = wshShell.Run("%COMSPEC% /c Echo Y| cacls "_
  66:       & strHomeFolder & " /t /c /g Administrators:f "_
  67:       & strUser & ":F", 2, True)
  68:          If intRunError <> 0 Then
  69:          Wscript.Echo "Error assigning permissions for user " _
  70:          & strUser & " to home folder " & strHomeFolder
  71:          End If
  72:      End If
  73:  End If
  74:   
  75:  Dim strProfileFolder
  76:  strProfileFolder = "\\HURRICANE\Profiles\"+strUser
  77:  If strProfileFolder <> "" Then
  78:  If Not objFSO.FolderExists(strProfileFolder) Then
  79:  On Error Resume Next
  80:  objFSO.CreateFolder strProfileFolder
  81:       If Err.Number <> 0 Then
  82:       On Error GoTo 0
  83:       Wscript.Echo "Cannot create: " & strProfileFolder
  84:       End If
  85:  On Error GoTo 0
  86:  End If
  87:       If objFSO.FolderExists(strProfileFolder) Then
  88:       ' Assign user permission to home folder.
  89:       intRunError = wshShell.Run("%COMSPEC% /c Echo Y| cacls "_
  90:       & strProfileFolder & " /t /c /g Administrators:f "_
  91:       & strUser & ":F", 2, True)
  92:          If intRunError <> 0 Then
  93:          Wscript.Echo "Error assigning permissions for user " _
  94:          & strUser & " to profile folder " & strProfileFolder
  95:          End If
  96:      End If
  97:  End If
  98:  WScript.Echo("Done.")
  99:  WScript.Quit

Finally.

Someone is doing something about those goddamn social networking sites. Illinois has introduced a bill to ban ALL social networking websites from their schools and public libraries.

http://politics.slashdot.org/article.pl?sid=07/02/14/0226222&from=rss

Apparently my school has banned those sites. http://securecomputing.com/sfwhere/index.cfm for more info.

Attn: Internet (Specifically Retarded ‘Social Networking’ Sites)

Lately I’ve been getting a LOT of emails from those retarded myspace clone sites & ‘Movie Quiz Websites’. The other day I received a few emails from a site called ‘tagged’, saying that someone had tagged me to be on their friends list. From what I understand (without signing up to the site), people export their WHOLE msn contact lists, and upload them to an unknown site for them to do god-knows-what with them. The worst thing about this tagged site was the fact that they KEPT sending email after email if you did not reply (aka: clicking on a yes/no link). The REALLY ironic thing was that both the yes & no link go to the same page (their signup page). Without further ado, is an email you can send if you get any more of those loser emails.

 

Attn: idiot,

Lately, I’ve been getting pissed by a lot of emails sent from so-called ‘social networking’ websites, and ‘movie quiz’ websites. Google defines ‘socialising’ as “The act of meeting for social purposes”, I therefore submit to you the following question: How do you ‘socialize’ with people that YOU DO NOT KNOW OVER A WEBSITE. There have been numerous cases of people being sexually assaulted (and in one case, a guy even got his car stolen from a crazy-ass teenage chick) from interaction on myspace. Below are my grudges about the websites I have got emails from in the last few days:

First and foremost, tagged.com:

Okay, go do a google search for the word ‘tagged’. The first result will most likely be for tagged.com. Read the blurb. It says that apparently tagged is the PREMIER teen socializing website on the internet. That’s a big claim. I did a quick look around their website and found no page listing the amount of members they have (so, how can they call themselves the premier teen socializing site). My second grudge against them is the obvious fact is that they are a MYSPACE clone. MySpace was the first website that started the phenomenon, and lots of other loser sites started to pop up over the place over time. I’ve been tagged,sliced,diced and zebo’ed(?).

MySpace.com

The site that started it all. Correction: The crappiest site that started it all. Whenever I get a myspace link now, I turn down my volume and make sure my door is shut. That’s because I’m afraid of some retard having lemonparty/tubgirl as their background and having some emo music on their page. Then theres the fact that 52 million out of their 72 million members are probably pedophiles. Theres probably some page on the internet that lists all the rapes caused by myspace, incredible isn’t it? I had NOTHING against the good ol’ msn chat style of service. There was a simple profile page, a fairly comprehensive list of chatrooms and no retarded sounds allowed in the profiles. People bitch about how chatrooms are full of pedophiles and so on, but if they are on IRC, you are able to get their ip address and do something about it, whereas, if there was one looking at your profile on myspace, what can you do? Jack shit. I really doubt myspace would start trying to filter through their 1 million hits a day (probably more) to find one guy. Besides, the laws about this crap aren’t even good enough to prosecute people now-a-days.

Then theres the people that are subscribed to like fucking 12 social networking websites. WHY WOULD YOU NEED TO KNOW ONE HUNDRED THOUSAND FUCKING RANDOM PEOPLE ON TWELVE SITES? That is what infuriates me. This one person that I knew like 3 years ago (the person that triggered this post) ‘tagged’ me for a ‘friend’. A few months prior to that, she sent an email asking me to sign up for ‘zebo’ and theres probably a multitude of other things that one particular person has asked me to sign up for. I really wish gmail had an option to filter out movie quiz’s and social networking site crap.

Just so you know, I DO have a myspace profile (but, I never ever changed it from the defaults, because I only needed to look at someone elses myspace).

I hope this post/email has changed your opinion about those retarded social networking websites.

 

Regards,

Brent

Posting from Office 2007

Testing to see this shiz actually works. Heh.

PS: 24 ftw.

Link Generator V2.0

Okay, some of you out there probably download certain files that are split over many archives (ie: r01, r02 etc) and need to combine them.  This is meant for files that ARE NOT rar files.  Trying to combine rar files with copy /B will fuck up the headers and so on.  You can also use this to generate links for flashget, as flashget does not have a ‘Generate Links’ option, like GetRight does (that i know of yet).  You can make the links in this application, and then copy and paste them, and they can be added to flashget, or you can copy the text and then drag it into the flashget ‘dropzone’.  The program is self explanitory, and i’ll probably upload the code for it at a later date if the demand arises.

Without further ado:

http://brentp.net/CSharp/LinkGenReplace.exe

 

Yes, i know this post could have been written better.