One More Thing

Showing posts with label Javascript. Show all posts
Showing posts with label Javascript. Show all posts

Sunday, January 29, 2017

USB Modem Refresh - Auto Connection

3:12 AM Posted by nurmanx , No comments
Trik berikut digunakan untuk mengatur connect atau disconnect modem secara otomatis. Hal ini kadang diperlukan untuk me-refresh modem sehingga memulihkan kecepatan transfer data yang sempat turun. Memang belum ada penjelasan teknis tentang mengapa me-refresh (men-disconnect kemudian meng-connect-kan lagi) modem bisa memulihkan kecepatan transfer data. ( Jika ada yang tau, silahkan dishare di comment :) )

Script berikut juga dapat digunakan oleh Spammer, karena dengan me-refresh modem, kita akan mendapatkan IP address baru, sehingga hal tersebut bisa digunakan untuk mengelabuhi IP address filtering yang diterapkan oleh kebanyakan website. Misalnya, prosedur filtering yang diterapkan oleh www.aweber.com yaitu: posting akan di tolak jika posting tsb berasal dari IP address yang sama lebih dari 7 kali. (mungkin hal ini juga tergantung setting yang diatur oleh client).

Trik ini dijalankan menggunakan kombinasi script VBS dan Javascript berikut

Dim cConnectionName
Dim cUsername
Dim cPassword
Dim oShell
Dim i
'modem setting
cConnectionName = "Wireless Terminal" 'connection name
cUsername = "smart"
cPassword = "smart"
 
Set oShell = WScript.CreateObject ("WScript.shell")
 
for i = 1 to 1000 'number of connection: 1000 times connect/disconnect
oShell.Exec("rasdial /DISCONNECT")
oShell.Exec("rasdial """ & cConnectionName & _
 """ " & cUsername & " " & cPassword)
WScript.Sleep(8000) 'waiting 8 seconds before next connection : it use to uploading your form to target server
oShell.Run "http://localhost/submitform.php" 'change to your own form
WScript.Sleep(20000) 'waiting 20 second before disconnect command
next

(script dimodofikasi dari VBScript: Dialer Anti Mati – Modem EVDO Smart.

File submitform.php dapat berisi form asli yang sudah dimodifikasi untuk meng-upload data ke server target.

Semoga bermanfaat dan dipergunakan dengan bijak :)

Monday, May 05, 2014

jTable Wordpress Integration

9:38 AM Posted by nurmanx 5 comments
In this tutorial, I will show you how to combine a jTable to wordpress's post or page. jTable is a jQuery plugin used to create AJAX based CRUD tables without coding HTML or Javascript. It has so many features that can simplify your "life" when you want to handle a complex table. Let's get started!

Step 1
Requirement:
1. wordpress-3.8.1
2. wordpress plugin : insert-javascript-css, download from www.nutt.net
3. jTable with PHP Samples, download from www.jtable.org

Step 2
1. Install and activate "insert-javascript-css" plugin to your wordpress


2. Create database (separate from wordpress main database) for jTable and create table "people" with data from Samples included (jtabletestdb.sql)


3. Edit SQL connection in "PersonActions.php" with your own setting for example :

$con = mysql_connect("localhost","root","root"); //change with your database connection setting mysql_select_db("jtabletestdb", $con);


4. Put jTable-PHP-Samples folder into wordpress folder



Step 3
1. Find "header.php" in your wordpress themes folder, I'm using hueman themes, so the "header.php" should stored in wp-content\themes\hueman\header.php . Edit "header.php" with inserting the jTable prerequisite script beetween <head></head> like this:


<title><?php wp_title(''); ?></title>
<link href="&lt;?php bloginfo('pingback_url'); ?&gt;" rel="pingback"></link>
<!--START INSERTING JTABLES PREREQUISITE SCRIPT -->
<link href="jTable-PHP-Samples/codes/themes/redmond/jquery-ui-1.8.16.custom.css" rel="stylesheet" type="text/css"></link>
<link href="jTable-PHP-Samples/codes/scripts/jtable/themes/lightcolor/blue/jtable.css" rel="stylesheet" type="text/css"></link>
<script src="jTable-PHP-Samples/codes/scripts/jquery-1.6.4.min.js" type="text/javascript"></script>
<script src="jTable-PHP-Samples/codes/scripts/jquery-ui-1.8.16.custom.min.js" type="text/javascript"></script>
<script src="jTable-PHP-Samples/codes/Scripts/jtable/jquery.jtable.js" type="text/javascript"></script>
<!--END INSERTING-->


Step 4
1. Create a New Post
2. Insert Javascript/CSS (click the plugin icon)



Insert this script in the dialog box above and then "Save" :

<script type="text/javascript">
$(document).ready(function () {
//Prepare jTable
$('#PeopleTableContainer').jtable({
title: 'Table of people',
actions: {
listAction: 'jTable-PHP-Samples/codes/PersonActions.php?action=list',
createAction: 'jTable-PHP-Samples/codes/PersonActions.php?action=create',
updateAction: 'jTable-PHP-Samples/codes/PersonActions.php?action=update',
deleteAction: 'jTable-PHP-Samples/codes/PersonActions.php?action=delete'
},
fields: {
PersonId: {
key: true,
create: false,
edit: false,
list: false
},
Name: {
title: 'Author Name',
width: '40%'
},
Age: {
title: 'Age',
width: '20%'
},
RecordDate: {
title: 'Record date',
width: '30%',
type: 'date',
create: false,
edit: false
}
}
});

//Load person list from server
$('#PeopleTableContainer').jtable('load');
});

</script>

3. Insert in Post Content



<div id="PeopleTableContainer" style="width: 600px;"> </div>

4. View Your Post


Congratulations! You're done. :)