| Author |
CodeBank plain files |
wolfmankurd
Member

Posts: 1519
Location: UK
Joined: 30.05.05 Rank: God |
|
It would be great to have a way to download the code on the codebank in a plain text file. So it's wgetable.
BY READING MY POST, YOU ACCEPT IT AS IS AND AGREE TO MY DISCLAIMER OF ALL WARRANTIES, EXPRESS OR IMPLIED, AS WELL AS DISCLAIMERS OF ALL LIABILITY, DIRECT, INDIRECT, CONSEQUENTIAL OR INCIDENTAL, THAT MAY ARISE FROM THE USE OF THIS (MIS)INFORMATION.

Edited by wolfmankurd on 04-08-10 18:57 |
|
| Author |
RE: CodeBank plain files |
fuser
Member

Posts: 959
Location: in front of a computer (duh)
Joined: 05.04.07 Rank: HBH Guru |
|
I agree. There are some good samples there, like the ones from techb. But maybe implement a system where you can read, and then there's an option for you to copy the code.
Copying code from the bank can be a bit annoying, since if I copy the whole thing it'll show up in one line, so I have to do it again one by one.







Telling modern Internet users to stop whining is like telling them to stop breathing it seems unrealistic and inhumane. Paul Lutus
|
|
| Author |
RE: CodeBank plain files |
ynori7
Future Emperor of Earth

Posts: 1481
Location: #valhalla
Joined: 08.10.07 Rank: Diabolical |
|
Aye, I agree with fuser's suggestion. Maybe something similar to how pastebin does it.
|
|
| Author |
RE: CodeBank plain files |
techb
Member

Posts: 384
Location:
Joined: 15.02.09 Rank: Hacker Level 2 |
|
I don't seem to have that problem. I can copy it all and it stays formatted. Using Windows 7 if that has anything to do with it.
@fuser:
Thanks for liking my code; thought no body would care about it lol.
|
|
| Author |
RE: CodeBank plain files |
only_samurai
[IRC Rockstar]
Posts: 984
Location: idling in some random irc channel
Joined: 18.08.06 Rank: .|unranked|. |
|
Below each bit of displayed code on readcode.php, there is now a link to a plaintext version on wgetcode.php.
Unfortunately, you cant wget this just yet because it requires you to be logged in to HBH to access. I left this in place because the codebank itself is that way. I'll remove the 3 lines of code blocking you as soon as I get some sort of approval from the rest of the staff. This works for an easy copy-paste for now tho.
~samurai
The problem with a fool-proof system, is eliminating the fool.
"His name is Cereal Killer...Like Fruitloops." If you cut me, I bleed binary.
http://blog.psych0tik.net/ |
|
| Author |
RE: CodeBank plain files |
skathgh420
Member

Posts: 418
Location: 127.0.0.1
Joined: 03.03.08 Rank: God |
|
I think you need to fix the xss problem!
edit: link removed 

Edited by skathgh420 on 07-08-10 06:51 |
|
| Author |
RE: CodeBank plain files |
only_samurai
[IRC Rockstar]
Posts: 984
Location: idling in some random irc channel
Joined: 18.08.06 Rank: .|unranked|. |
|
fixed. I forgot to set the content-type to text/plain. >_<
The problem with a fool-proof system, is eliminating the fool.
"His name is Cereal Killer...Like Fruitloops." If you cut me, I bleed binary.
http://blog.psych0tik.net/ |
|
| Author |
RE: CodeBank plain files |
skathgh420
Member

Posts: 418
Location: 127.0.0.1
Joined: 03.03.08 Rank: God |
|
HALLL OF FAME!!!!
 |
|
| Author |
RE: CodeBank plain files |
only_samurai
[IRC Rockstar]
Posts: 984
Location: idling in some random irc channel
Joined: 18.08.06 Rank: .|unranked|. |
|
done. only 10 points because the issue here wasn't that you bypassed a filter or anything of that nature, but rather the Content type of the code returned was one the browser would execute. Pretty much anything you put in there would execute, so it wasn't that difficult.
Fixed this issue by setting the content type to text/plain.
congrats
~samurai
The problem with a fool-proof system, is eliminating the fool.
"His name is Cereal Killer...Like Fruitloops." If you cut me, I bleed binary.
http://blog.psych0tik.net/ |
|
| Author |
RE: CodeBank plain files |
skathgh420
Member

Posts: 418
Location: 127.0.0.1
Joined: 03.03.08 Rank: God |
|
<3 
 |
|
| Author |
RE: CodeBank plain files |
stealth-
Member

Posts: 995
Location: Eh?
Joined: 10.04.09 Rank: God |
|
Awesome, thanks samurai.
While it's not something I see myself using often, other people apparently will, and I'm just happy to see a site admin implement something that quick (or at all).
Few lines of code or not, it's the principle that counts 
The irony of man's condition is that the deepest need is to be free of the anxiety of death and annihilation; but it is life itself which awakens it, and so we must shrink from being fully alive.
http://www.stealth-x.com |
|
| Author |
RE: CodeBank plain files |
wolfmankurd
Member

Posts: 1519
Location: UK
Joined: 30.05.05 Rank: God |
|
whay! awesoem thanks! it does open hbh up to a bit of a problem. People hosting shells on the codebank and wgetting them onto servers
BY READING MY POST, YOU ACCEPT IT AS IS AND AGREE TO MY DISCLAIMER OF ALL WARRANTIES, EXPRESS OR IMPLIED, AS WELL AS DISCLAIMERS OF ALL LIABILITY, DIRECT, INDIRECT, CONSEQUENTIAL OR INCIDENTAL, THAT MAY ARISE FROM THE USE OF THIS (MIS)INFORMATION.

Edited by wolfmankurd on 07-08-10 11:26 |
|
| Author |
RE: CodeBank plain files |
spyware
Member

Posts: 4190
Location: The Netherlands
Joined: 14.04.07 Rank: God Warn Level: 90
|
|
|
wolfmankurd wrote:
whay! awesoem thanks! it does open hbh up to a bit of a problem. People hosting shells on the codebank and wgetting them onto servers
That's not a problem, that's a feature!

"The chowner of property." - Zeph Widespread intellectual and moral docility may be convenient for leaders in the short term,
but it is suicidal for nations in the long term. - Carl Sagan Since the grid is inescapable, what were the earlier lasers about? Does the corridor have a sense of humor? - Ebert |
|
| Author |
RE: CodeBank plain files |
only_samurai
[IRC Rockstar]
Posts: 984
Location: idling in some random irc channel
Joined: 18.08.06 Rank: .|unranked|. |
|
spyware wrote:
wolfmankurd wrote:
whay! awesoem thanks! it does open hbh up to a bit of a problem. People hosting shells on the codebank and wgetting them onto servers
That's not a problem, that's a feature!
well at current, you'd at least have to sign-up/login to hbh to grab that code, so there would at least be some sort of audit trail. Perhaps that's an argument for leaving it as is and not making it public.
Then again, if you have the ability to run a wget on a server, couldnt you just as easily open your favorite text editor and copy/paste? I suppose there are cases where you could use it more easily with file-inclusion, but is it really _that_ hard to host a .txt file somewhere?
The problem with a fool-proof system, is eliminating the fool.
"His name is Cereal Killer...Like Fruitloops." If you cut me, I bleed binary.
http://blog.psych0tik.net/ |
|
| Author |
RE: CodeBank plain files |
wolfmankurd
Member

Posts: 1519
Location: UK
Joined: 30.05.05 Rank: God |
|
Using text editors like nano wreck some tpyes of shell like ones made by the nc listener techniques. heredocs is the best way me thinks.
BY READING MY POST, YOU ACCEPT IT AS IS AND AGREE TO MY DISCLAIMER OF ALL WARRANTIES, EXPRESS OR IMPLIED, AS WELL AS DISCLAIMERS OF ALL LIABILITY, DIRECT, INDIRECT, CONSEQUENTIAL OR INCIDENTAL, THAT MAY ARISE FROM THE USE OF THIS (MIS)INFORMATION.

Edited by wolfmankurd on 07-08-10 19:34 |
|
| Author |
RE: CodeBank plain files |
bl4ckc4t
Member
Posts: 591
Location: /etc/
Joined: 07.03.06 Rank: HBH Guru |
|
|
MoshBat wrote:
Whilst we're at it, why not go wiki? I know, it was suggested a while ago, but still, it could help improve shit.
Surprisingly enough, I agree with Mosh here. It would allow multiple people to implement their own code under one page.
Example:
Person 1 adds code to a port scanner in C++
Person 2 adds code to a faster port scanner in C++
Person 3 adds code to a Java port scanner
Each person can help others to optimize code like this, as well as compare codes in different languages. This might help people decide their own computer language, rather than asking the best.
|
|
| Author |
RE: CodeBank plain files |
spyware
Member

Posts: 4190
Location: The Netherlands
Joined: 14.04.07 Rank: God Warn Level: 90
|
|
|
MoshBat wrote:
...
bl4ckc4t wrote:
...
Please, no. If people want to use a proper version control system let them install git/svn or use online services like github. Lets -not- butcher a wiki to support forking and co-editing and whatnot. Really, the only reason the HBH codebank is useful is because you post some code and that's it. HBH is not in the business of hosting code/entire projects, the codebank is just a way of sharing -some- code, it's not meant to support on-going projects.

"The chowner of property." - Zeph Widespread intellectual and moral docility may be convenient for leaders in the short term,
but it is suicidal for nations in the long term. - Carl Sagan Since the grid is inescapable, what were the earlier lasers about? Does the corridor have a sense of humor? - Ebert |
|